Optimal texture processing operations

This topic contains 2 replies, has 2 voices, and was last updated by  akp123 6 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30482

    akp123
    Member

    Hi,

    My query is slightly similar to the following posting:

    https://www.imgtec.com/forum/forum_posts.asp?TID=955

    < ?: 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 steps

    1. created a texture and loaded the contents using glTexImage2D() :


    >This it is taking .5 seconds

    2. 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 1ms

     

    3. Read the FBO attached texture to get the rotated image using glReadPixels()

    —-> This is taking 1 second

     

    As it is evident, this is too much of a time for processing. My questions are

     

    1. 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_Guide 

    4.  Will even “render to texture” and  and glReadPixels() be executed optimally using the “texture streaming” method?

     

     

     

     

     

     

     
    #34811

    marco
    Member

    Hi,

    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 devtech@imgtec.com we could have a closer look and give more specific performance recommendations. marco2011-03-22 10:22:37

    #34813

    akp123
    Member

    Hi,

     

    The  FBO is created only once and contents are cleared every time. Requirement is a transformation and not just a simple rotation. I have emailed the code to devtech@imgtec.com

     

     

     

     
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.