[FFmpeg-devel] [PATCH] swscale alpha channel support
Kostya
kostya.shishkov
Mon Feb 23 17:39:38 CET 2009
On Mon, Feb 23, 2009 at 04:22:23PM +0100, Michael Niedermayer wrote:
> On Mon, Feb 23, 2009 at 04:16:44PM +0100, C?dric Schieli wrote:
[...]
> > Index: ffmpeg/libswscale/yuv2rgb2.c
> > ===================================================================
> > --- ffmpeg.orig/libswscale/yuv2rgb2.c 2009-02-23 15:14:39.409161445 +0100
> > +++ ffmpeg/libswscale/yuv2rgb2.c 2009-02-23 15:17:36.861446441 +0100
> > @@ -83,11 +83,11 @@
> > g = (void *)(c->table_gU[U] + c->table_gV[V]); \
> > b = (void *)c->table_bU[U];
> >
> > -#define PUTRGB(dst,src,i,o) \
> > - Y = src[2*i+o]; \
> > - dst[2*i ] = r[Y] + g[Y] + b[Y]; \
> > - Y = src[2*i+1-o]; \
> > - dst[2*i+1] = r[Y] + g[Y] + b[Y];
> > +#define PUTRGB(dst,src,i,o,a) \
> > + Y = src[2*i+o]; \
> > + dst[2*i ] = r[Y] + g[Y] + b[Y] + (a); \
> > + Y = src[2*i+1-o]; \
> > + dst[2*i+1] = r[Y] + g[Y] + b[Y] + (a);
> >
> > #define PUTRGB24(dst,src,i) \
> > Y = src[2*i]; \
>
> alpha can be merged in the table i think which avoids that 1 add per pixel
I don't think so - it's independent channel that is copied between different
formats (YUV, RGB, whatever).
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
More information about the ffmpeg-devel
mailing list