[FFmpeg-devel] [PATCH] swscale alpha channel support

Michael Niedermayer michaelni
Mon Feb 23 17:16:03 CET 2009


On Mon, Feb 23, 2009 at 05:07:02PM +0100, C?dric Schieli wrote:
> 2009/2/23 Kostya <kostya.shishkov at gmail.com>
> 
> > 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).
> >
> 
> With something like that ?

yes

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

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- 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/ac6eff3a/attachment.pgp>



More information about the ffmpeg-devel mailing list