[Ffmpeg-devel] swscale and regression tests
Michael Niedermayer
michaelni
Fri Aug 18 09:20:50 CEST 2006
Hi
On Fri, Aug 18, 2006 at 08:38:09AM +0200, Luca Abeni wrote:
> Hi Michael,
>
> On Wed, 2006-08-16 at 09:47 +0200, Michael Niedermayer wrote:
> [...]
> > wait, thinking about it again, theres really no sense in compiling with
> > both enabled, what rather should be done is
> > * always use swscale but disable the optimized scalers if CONFIG_GPL is not
> > set
> > * add a BITEXACT flag to disable optimized code which isnt binary identical
> > to the c counterparts in swscale
> > * make all formats which work currently work in swscale
> > * update the regression test checksums to the swscale case
> Ok, I started with the easy thing: disable the optimized scalers if
> CONFIG_GPL is not set
>
> It seems to me that this is quite easy for swscale.c, but it is more
> difficult to do for rgb2rgb.c and yuv2rgb.c (swscale.c use those
> COMPILE_* macros, while it seems to me that rgb2rgb.c always compile the
> simd version on the X86 architecture, and yuv2rgb.c compiles both MMX2
> and MMX if HAVE_MMX is defined).
>
> So, I was thinking about using some COMPILE_* macros in rgb2rgb.c and
> yuv2rgb.c too (that looks like the cleanest solution).
> Something like the attached introduce-compile_.diff.
> WARNING: it's only lightly tested, and it probably breaks things in very
> interesting ways... I am posting it to know if people agree that this is
> the way to go, and so that interested people can help in testing it.
>
> If that is ok, then the attached gpled-simd.diff should disable SIMD
> instructions if CONFIG_GPL is not defined (this is ok for mplayer too,
> because CONFIG_GPL is always 1 in mplayer's config.h). I tested it by
> putting some "#error" in the *_template.c files, and it seems to do the
> trick.
>
> If something like introduce-compile_.diff is not ok, then I can add some
> "&& defined(CONFIG_GPL)" to all the "#ifdef" in the swscale code.
yes, && defined(CONFIG_GPL) seems to be much clearer and flexible, some
of these functions where written by authors other then me and they might
not mind to switch to lgpl
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list