[Qt-interest] [OT] RE: Fast displaying of 8bit images

Pavel Koshevoy pavel at aragog.com
Wed Apr 1 17:44:34 CEST 2009


Oliver.Knoll at comit.ch wrote:

>> ...  On some platforms (OSX) there exist OpenGL
>> extensions that avoid copying texture data from main memory to the
>> graphics card memory, you may want to use that.     
>>     
>
> I am also investigating how to use OpenGL to accelerate image scaling: my first naive approach - using a QPainter on top of an OGLWidget - showed that the bottleneck is the actual data transfer from CPU <-> GPU (I was testing with images up to 4096 x 4096).
>
> I know that there are ways like http://www.songho.ca/opengl/gl_pbo.html (Pixel Buffer Object) to transer memory between the CPU <-> GPU.
>
>   

Hi Oliver,

Since you need to read back the scaled image then PBO is the correct 
approach.

> Do you remember these extension names you where mentioning? Are they part of OpenGL 3.0 now by any chance? Or are they at least available on Windows and Linux as well (for certain drivers at least)?
>   

It has been over 2 years since I've last looked into this.  I have found 
sample code on the Apple web site, and in the VideoLAN VLC player (which 
can use OpenGL for frame rendering).

Here is the link for APPLE_client_storage extension:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/opengl_texturedata.html#//apple_ref/doc/uid/TP40001987-CH407-SW24

Apple OpenGL docs are pretty good even if you aren't writing Mac software.



> And does that only help for "displaying" such "textures", or could they also remain in the GPU memory for scaling (I don't even need to display the scaled images, all I want is to scale a photo as quickly as possible, and then write it to disk [in batch mode: one photo after another])?
>
>   

Don't know, but you should be able to test this yourself.

> Some hints and links to relevant pages highly appreciated.
>   Oliver
>   




More information about the Qt-interest-old mailing list