Tutorial :image format best for display



Question:

I am working on an image processing application. I have to display an image sequence. I would like to avoid any extra overhead for {internal} format conversions.

I believe RGB should be the optimal format for display. But SDL accepts various YUV formats and there is no native{to SDL} support for RGB. Whereas Qt does not accept YUV format at all. X accepts RGBX format {native}. Images can be generated in any desired format for display. But CPU/GPU cycles for format conversion should be avoided. Any suggestion on what's the right way of displaying image sequences would be great.


Solution:1

The output format is ARGB. SDL works with RGB surfaces, so I don't understand your claim that "there is no native{to SDL} support for RGB.".

The native video acceleration interface of X only supports YUV input however. The YUV->RGB conversion on the GPU comes for free if you use the video acceleration interface. No "cycles" wasted here.

Perhaps you should go into more detail about your purposes. What is the framerate we are dealing with here?


Solution:2

I think you should use any uncompressed image + QPixmap.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »