[FFmpeg-devel] [PATCH] Yet another stab at RGB48 support

Kostya kostya.shishkov
Sat May 23 06:25:04 CEST 2009

On Sat, May 23, 2009 at 03:47:46AM +0200, Michael Niedermayer wrote:
> On Fri, May 22, 2009 at 08:31:41AM +0300, Kostya wrote:
> > > these functions will be duplicated as swscale_template is included multiple
> > > times
> > 
> > Theoretically someone can adapt MMX counterpart from rgb24to{Y,UV}
> > Anyway, what do you suggest to avoid that? 
> if its not building different variants then t doesnt belong in the template
> > That's an issue with most of
> > non-YUV functions there.
> sws needs some cleanup ...

As I understand current situation, it works like that:

swscale.c uses different #defines for RENAME and HAVE_SOME_SIMD to
include swscale_template.c

for x86 it may be included several times for MMX and 3DNOW
(in practice it compiles only C version for me)

many of the functions there look like:
static inline void RENAME(func)
 some asm
 C version that will be called nevertheless - usually for bitexact cases

for almost all non-YUV converters (with the only exception being
rgb24To{Y,UV} and bgr24To{Y,UV}) there's only C code

So it's up to you to decide how to deal with this.

> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

More information about the ffmpeg-devel mailing list