- March 22, 2011 at 9:15 am #30482
Hi,My query is slightly similar to the following posting:
< ?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />I have a RGBA8888 2048×2048 image which i need to rotate by a certain degrees and get back the rotated image for further processing by the application on OMAP3630. To achieve this i have performed the following steps1. created a texture and loaded the contents using glTexImage2D() :
>This it is taking .5 seconds2. Create a frame buffer object and bind a texture to it and preform render( effect: rotation by x degrees) to texture
>This is taking 1 second for the first execution, the actual rotation taking only 1ms3. Read the FBO attached texture to get the rotated image using glReadPixels()—-> This is taking 1 secondAs it is evident, this is too much of a time for processing. My questions are1. Is it possible to remove these suboptimalities and get down the overal processing time to bellow 0.1 second? The actual rotaiton seems to take only about 1ms.2. Is it possibe to perform rotation on a yuv422ILE image?3. Is texture streaming the solution to this? Is the info provided in the bellow applicable for my problem: http://processors.wiki.ti.com/index.php/OpenGLES_Texture_Streaming_-_bc-cat_User_Guide4. Will even “render to texture” and and glReadPixels() be executed optimally using the “texture streaming” method?March 22, 2011 at 10:11 am #34811
are you creating a FBO for every render?
Reuse it for consequent renders and just make sure to clear the contents (glClear(GL_COLOR_BUFFER_BIT)).
Try to use the texture streaming mechanism if it is available on your platform.
It will allow you to use YUV textures without having to perform the conversion in your application.
Have you tried rotating the image on the CPU? A glReadPixels() will stall the CPU and synchronize with the GPU which you would normally try to avoid at all costs.
As you are only (?) doing a simple rotation you might find software rendering to be faster as all operations are done on the CPU (minimal/no stalling).
But you would have to test to see if the performance is better with software rendering than with GPU rendering.
If you could post your code or send it to firstname.lastname@example.org we could have a closer look and give more specific performance recommendations.
marco 2011-03-22 10:22:37