YUV to RGB Conversion by Hardware

Has anyone had this problem before?

Converting every pixel from YUV to RGB is
extremely slow.
Is it possible that the Geforce2 does that for me?

And I don’t exactly understand the use of
"SDL_Overlay – YUV video overlay"
can SDL also do the conversion?

Thanks a lot,

Joe

I don’t know if you can get hardware to do it, but if you know what
processor you’re running the code on you can optimize the conversion
using MMX/SSE/whatever equivalent type code. Here’s a tutorial for MMX
on the Intel site:

http://cedar.intel.com/cgi-bin/ids.dll/content/content.jsp?cntKey=Legacy::irtm_AP548_9996&cntType=IDS_EDITORIAL

I’ve used something similar before, and it’s much faster than doing a
single pixel at a time. I imagine it would be faster still if you could
do it in hardware, but this should at least get you some more desirable
framerates :slight_smile:

-MikeOn Tue, 2003-07-22 at 08:03, redwhitered at gmx.net wrote:

Has anyone had this problem before?

Converting every pixel from YUV to RGB is
extremely slow.
Is it possible that the Geforce2 does that for me?

And I don’t exactly understand the use of
"SDL_Overlay – YUV video overlay"
can SDL also do the conversion?

Thanks a lot,

Joe

I’m not sure about withing SDL, but several other libraries provide good
example code for this. You might take a look at libavcodec (part of
ffmpeg) for fast colorspace conversions. You can either grab the source
that applies to your situation (assuming the LGPL license isn’t a
problem), or just use the library routines.

-JustinOn Tue, 2003-07-22 at 08:03, redwhitered at gmx.net wrote:

Has anyone had this problem before?

Converting every pixel from YUV to RGB is
extremely slow.
Is it possible that the Geforce2 does that for me?

And I don’t exactly understand the use of
"SDL_Overlay – YUV video overlay"
can SDL also do the conversion?

Thanks a lot,

Joe