[FFmpeg-devel] [PATCH] swscale alpha channel support
Michael Niedermayer
michaelni
Mon Feb 23 16:59:27 CET 2009
On Mon, Feb 23, 2009 at 06:39:38PM +0200, Kostya wrote:
> 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).
its set to 255 in that patch IIRC
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090223/1d7b899b/attachment.pgp>
More information about the ffmpeg-devel
mailing list