[FFmpeg-devel] [PATCH] sws flags for ffmpeg
Ivo
ivop
Tue May 22 11:58:32 CEST 2007
On Tuesday 22 May 2007 07:32, mark cox wrote:
> > [...]
> >
> > > +static void opt_sws_type(const char *arg) {
> > > + struct sws_flags_list sws_type_list[] = {
> > > + { "fast_bilinear", SWS_FAST_BILINEAR },
> > > + { "bilinear", SWS_BILINEAR },
> > > + { "bicubic", SWS_BICUBIC },
> > > + { "experimental", SWS_X },
> > > + { "neighbor", SWS_POINT },
> > > + { "area", SWS_AREA },
> > > + { "bicubic_bilinear", SWS_BICUBLIN },
> > > + { "gauss", SWS_GAUSS },
> > > + { "sinc", SWS_SINC },
> > > + { "lanczos", SWS_LANCZOS },
> > > + { "spline", SWS_SPLINE },
> > > + { NULL, 0 }
> > > + };
>
> Is it possible to add a 'none' option so that the regression tests will
> pass when swscale is used?
I believe the reason the regression tests fail is that the colourspace
conversions of swscale do not always match imgconvert. Some are more
accurate, others are not. For example, one could 'upgrade' a 5-bit
R-component to 8-bits by just doing R<<=3; or one could do R<<=3; R+=R>>5;
The former is faster, the latter is more accurate. The algorithms in
libswscale are not always exactly the same as they are in imgconvert.
I don't think the regression tests fail because of scaling issues, only
because of colourspace conversions. And if there is any scaling involved in
the tests, we should use an swscaler that matches imgresample, although I
am not sure if that is possible.
--Ivo
More information about the ffmpeg-devel
mailing list