[SDL] YUV to RGB Conversion by Hardware

Mike Shal marf at psu.edu
Tue Jul 22 10:25:01 PDT 2003


On 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 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 :)

-Mike





More information about the SDL mailing list