Henning Haaland Kulander wrote:
> On Wed, 3 Dec 2003, IOhannes zmoelnig wrote:
>
>
> I have tried setting m_image.image.upsidedown to 1 and 0, but there is no
> change. Still upsidedown.
i tried it too. it worked for me.
>>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)
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.
i am afraid, these changes will not make it into the next release.
mfg.as.dr
IOhannes