[MPlayer-dev-eng] [PATCH] RGB/BGR big-endian fixes

Michael Niedermayer michaelni at gmx.at
Thu Feb 9 12:50:59 CET 2006


Hi

On Thu, Feb 09, 2006 at 11:13:28AM +0100, Diego Biurrun wrote:
> On Thu, Feb 09, 2006 at 02:14:36AM -0500, Alan Curry wrote:
> > Diego Biurrun writes the following:
> > >
> > >>   mplayer -vo x11 -vf format=bgr24,scale movie.avi
> > >>   mplayer -vo x11 -vf format=rgb24,scale movie.avi
> > >> 
> > >> both produce wrong colors while vo_xv is fine.  This problem is not
> > >> caused by this patch, though, it was present before.  Disabling AltiVec
> > >> does not make a difference.
> > >
> > >I tested some more with vo_png, vo_jpeg, vo_pnm and vo_tga.  vo_tga and
> > >rgb24 create a blue picture, but this occurs with and without the patch.
> > >Everything else is fine.
> > 
> > There are several non-altivec-related big-endian bugs in rgb2rgb.c and
> > rgb2rgb_template.c, which probably explains these color problems. Red and
> > blue can be reversed, or in a 32 bit format the 8 unused/alpha bits can be on
> > the wrong side of the other 24 bits. Exactly which kind of color permutation
> > you get depends on what depth your X server is running in.
> > 
> > Here's a patch that will hopefully fix those problems. I haven't tested any
> > of the 16bpp-or-less formats, but the 24bpp and 32bpp ones are Definitely
> > Good (ready the brown paper bag...)
> 
> This patch fixes both bgr16 and rgb24 with vo_x11.
> 
> Michael, OK to commit?

ok, except maybe the indention of the preprocessor directives could be
hmm changed somewhat ...

[...]

-- 
Michael




More information about the MPlayer-dev-eng mailing list