[MPlayer-dev-eng] [PATCH] RGB/BGR bug in yuv2rgb_altivec.c

Luca Barbato lu_zero at gentoo.org
Thu Nov 4 12:22:56 CET 2004


Marcus Comstedt wrote:
> Hi.
> 
> I found a bug i yuv2rgb_altivec.c.  The thing is that the macros
> out_rgb24() and out_bgr24() will actually _both_ output BGR!
> The reason for this is that vec_merge3() has the in parameters
> x0,x1,x2 declared in the wrong order.  Thus vec_mstrgb24(), which
> calls it with the parameters in the order x0,x1,x2, will have the
> colors swapped and actually generate BGR.  Conversely, vec_mstbgr24()
> which calls vec_merge() with the parameters in the x2,x1,x0 order will
> _not_ have the colors swapped, and output RGB!  The last problem is
> compensated for in the out_bgr24() macro by again swapping the order
> of the parameters though.  However, out_rgb24() does not swap the
> parameters and thus gives incorrect output.
> 

Should be already fixed in cvs...

lu

-- 
Luca Barbato
Developer
Gentoo Linux				http://www.gentoo.org/~lu_zero





More information about the MPlayer-dev-eng mailing list