[Mplayer-advusers] pre-bugreport

D Richard Felker III dalias at aerifal.cx
Tue Mar 16 09:23:26 CET 2004


On Mon, Mar 15, 2004 at 07:13:50PM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Monday 15 March 2004 18:55, Arpi wrote:
> > Hi,
> >
> > > > if you cannot reproduce, i'll investigate further...
> > >
> > > its known problem, the last line is converted with the c converter while
> > > the rest is done in mmx, alex changed the rgb<->bgr behavior of the c
> > > code sometime ago, and after some complaints by me, alex summarized how
> > > rgb and bgr should be defined, and IMHO the definition is good its just
> > > not what most of the code in mplayer currently uses, so IIRC the mmx code
> > > matches your definition of rgb/bgr while the c code matches alexs :)
> >
> > "cool".
> > any chance to fix it anyway?
> patch attached, i wont commit, as i dont want to be flamed :)

Are you sure this patch is correct? IMO the depth reading is
incorrect:

> -    const int isRgb = IMGFMT_IS_RGB(c->dstFormat);
> +    const int isRgb = !IMGFMT_IS_RGB(c->dstFormat);
>      const int bpp = isRgb?IMGFMT_RGB_DEPTH(c->dstFormat):IMGFMT_BGR_DEPTH(c->dstFormat);

The last line should be:

     const int bpp = isRgb?IMGFMT_BGR_DEPTH(c->dstFormat):IMGFMT_RGB_DEPTH(c->dstFormat);

Or better yet, rename the "isRgb" variable to "isBgr" so it's
consistent.

Rich




More information about the MPlayer-advusers mailing list