[GEM-dev] Re: FFMPEG in GEM
Henning Haaland Kulander
hennikul at ifi.uio.no
Thu Dec 4 19:01:27 CET 2003
On Thu, 4 Dec 2003, IOhannes zmoelnig wrote:
> >>the other problem is BGR-colorspace (or BGRA) vs RGB(A).
> >>(pix_* processing in) Gem supports 3 different colorspaces: GL_RGBA,
> >>yuv422 (UYVY) and Greyscale (GL_LUMINANCE). the [pix_texture] just
> >>passes the current-colorspace to the renderer, thus supporting other
> >>formats like GL_BGR too.
> >
> >
> > I don't get this either. The ffmpeg streams I've tried are YUV420, and the
> > ressult should be GL_RGBA. The plugins tries to use img_convert with the
> > correct colorspaces as paramters, but the output is still wrong. I haven't
> > tried the fromBGR hack yet. It seems wrong to first convert from YUV to
> > BGR and then from BGR to RGB...
>
> this turned out to be a bit complicated
> PIX_FMT_RGBA32 is not RGBA (as i would have thought) but it is really
> BGRA (on intel and friends: little_endian) and ARGB (on big-endians)
That's nice... :)
> and although it seems wrong to do too much conversion, it is the easiest
> for now.
> Gem supports a lot of conversion-routines by itself, so we could use
> these (but this needs time, as to find out what ffmpeg means with it's
> formats (like RGBA32 beeing anything but RGBA (in this order))
> the attached files make this double conversion for convenience.
The attached files look identical to the CVS-version...
But I added this myself to test, and it worked. So thanks!
Regards,
Henning Kulander
More information about the GEM-dev
mailing list