[Intel-gfx] Optimal configuration for video frames to OpenGL Texture
Mark Newiger
Mark.Newiger at seefront.com
Mon Jun 18 17:31:55 CEST 2012
Hello,
We are using an MiniPC with the following configuration:
- Intel SandyBridge PC Mainboard DH61AG and integrated Intel HD Graphics 3000
- OS: Ubuntu 12.04 32bit
Our application processes video frames and displays the result on the screen(1920x1080).
The video frames have the format RGBA32 and are delivered via the v4l2 interface with 1280x1470 at 60fps. The processing takes place in an OpenGL fragment shader and the frames are read from texture objects via the usual texture(2D) commands. Therefore the application must transfer the frames to OpenGL texture objects.
Because the processing takes about 13ms, the transfer of the video frames to the graphics device should be configured in the most optimal way.
I did lots of tests and experiments but did not really find a satisfying result. Basically the questions are:
- In which format should the texture be created. E.g. the parameters internalFormat, format and type of the glTexImage2D() function ?
- Which is the best way to transfer the pixel data to the texture. E.g. using the traditional glTexSubImage2D() or using pixel buffer objects (http://www.songho.ca/opengl/gl_pbo.html).
Currently I am using the following format: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1280, 1470, 0, GL_RGBA, GL_UNSIGNED_BYTE, ...)
For the transfer I use glTexSubImage2D(). For some reasons this has a better performance than the pixel buffer objects.
Doing some time measurements (by calling glReadPixel before and after the pixel transfer) it still takes about 2-3ms.
So is there an optimal configuration with the least delay for this hardware ?
Every help is much appreciated.
Thanks and best regards
Mark
Best regards,
Mark Newiger | Senior Software Engineer
SeeFront GmbH
Esplanade 41 | D-20354 Hamburg, Germany
Office: +49 40 416 22 64-83
mark.newiger at seefront.com<mailto:mark.newiger at seefront.com> | www.seefront.com<http://www.seefront.com>
Managing Director: Christoph Grossmann
Registered seat of the company: Hamburg
Register Court: Amtsgericht Hamburg HRB 98205 VAT-ID-No. DE248406189
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120618/af36f5ba/attachment.html>
More information about the Intel-gfx
mailing list