<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Poor GPU performance in imx515 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208359#M12184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I´m not wrong, you can get this header with the GPU SDK package at the i.MX51 home page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2012 16:29:39 GMT</pubDate>
    <dc:creator>andre_silva</dc:creator>
    <dc:date>2012-10-25T16:29:39Z</dc:date>
    <item>
      <title>Poor GPU performance in imx515</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208356#M12181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;We are trying to use IMX515's GPU to perform some post-&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN&gt;processing of video streams. But the GPU seems to be too slow&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN&gt;for even just the simplest rendering task, for example just display&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN&gt;a 800x480 video frame on the screen. The rendering time per-frame is&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN&gt;about 60-70 ms that is to slow and will cause noticeable lag&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;artifacts. Has any one done this before, fps rate under any benchmarks are appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For Nenamark, we get about 17-20 fps which is akin to others reports, but &amp;nbsp;isn't it too slow for a game or any meaningful 3D application?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Feb 2012 03:25:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208356#M12181</guid>
      <dc:creator>QZHua</dc:creator>
      <dc:date>2012-02-05T03:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Poor GPU performance in imx515</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208357#M12182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which method are you using for texturing ? the glTexture2D function ? check this approach of writing the GPU buffers directly in this post:&lt;/P&gt;&lt;P&gt;&lt;A href="http://imxcv.blogspot.com/2011/10/video-to-texture-streaming-imx53.html" target="_blank"&gt;http://imxcv.blogspot.com/2011/10/video-to-texture-streaming-imx53.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 12:38:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208357#M12182</guid>
      <dc:creator>andre_silva</dc:creator>
      <dc:date>2012-02-06T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Poor GPU performance in imx515</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208358#M12183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 class="post-title entry-title"&gt;&amp;nbsp;I know this method, I hope if I could use it. But it requires eglfslext.h and some other so files which is released in the linux driver amd-gpu-bin-mx51. Currently, I don't have any idea to use them under Android. &amp;nbsp;And I can't understand why they don't release a Android version of GPUSDK. As I have tested, glTexture2D is not the major problem, since it only take about 0.01 sec and also the eglSwapBuffer. The pure rendering &amp;nbsp;time of a 800x480 image in rgb565 format takes about 0.06-0.07 sec. &amp;nbsp;I hope this&amp;nbsp;phenomena&amp;nbsp;is also cause by the problem which can be solved by the suggested method.&amp;nbsp;But I doubt that if the Freescale engineers had done this in Android before.&amp;nbsp;&lt;/H3&gt;&lt;H3 class="post-title entry-title"&gt;Since not everyone would have seen that solution, I copied the solution here.&lt;/H3&gt;&lt;H3 class="post-title entry-title"&gt;---------------------------------------------------------------------------------------&lt;/H3&gt;&lt;H3 class="post-title entry-title"&gt;Video to Texture Streaming - i.MX53 processor&lt;/H3&gt;&lt;DIV class="post-header"&gt;&lt;DIV class="post-header-line-1"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="post-body entry-content" id="post-body-2330594776438991203"&gt;The low fps when streaming&amp;nbsp;a video to texture is due to the glTexture2D function, which is highly used for most programmers. This function is relatively slow, since&amp;nbsp;it writes some buffers before actually copying the data to the GPU, which is processed and then displayed.&lt;BR /&gt;&lt;BR /&gt;When I was working on an Augmented Reality demo, it was running on about 15 fps with images with resolution of 320x240, if I wanted to display higher resolution for a better look of the application, it dropped to 7fps, pretty bad.&lt;BR /&gt;&lt;BR /&gt;On a recent research on how to improve the frame rate of my application I found that we can write our data (image) directly to the GPU buffer and displays it without using the glTexture2D function.&lt;BR /&gt;&lt;BR /&gt;The application used&amp;nbsp;for this test (the video can be found at the end of this post) simply get image from the webcam and use it as a texture to a plane. The webcam captures a live youtube video stream being displayed on my desktop monitor and send the data for processing at 30fps (maximum speed at 800x640). This application has 2 threads: one for video capturing and the another one for rendering. While running the render thread, it now reaches 80 fps for a 800x640 images !&lt;BR /&gt;&lt;BR /&gt;Freescale´s OpenGL ES API gives you some extra functions that allows to write directly to the GPU buffer.&lt;BR /&gt;&lt;BR /&gt;Below you can find a piece of code, which do all the magic:&lt;BR /&gt;&lt;BR /&gt;void LoadGLTextures (EGLDisplay egldisplay, IplImage *texture)&lt;BR /&gt;{&lt;BR /&gt;//Setup eglImage&lt;BR /&gt;char* imageBuffer = NULL;&lt;BR /&gt;static int start = 0;&lt;BR /&gt;&lt;BR /&gt;EGLint attribs[] = { EGL_WIDTH, TEXTURE_W,&lt;BR /&gt;EGL_HEIGHT, TEXTURE_H,&lt;BR /&gt;EGL_IMAGE_FORMAT_FSL, EGL_FORMAT_BGRA_8888_FSL, EGL_NONE};&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;if (! start)&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;g_imgHandle = eglCreateImageKHR(egldisplay, EGL_NO_CONTEXT, EGL_NEW_IMAGE_FSL, NULL, attribs);&lt;BR /&gt;glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, g_imgHandle);&lt;BR /&gt;start = 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;//printf ("init --&amp;gt; g_imgHandle: 0x%08x\n", (int)g_imgHandle);&amp;nbsp;&lt;BR /&gt;eglQueryImageFSL(egldisplay, g_imgHandle, EGL_CLIENTBUFFER_TYPE_FSL, (EGLint *)&amp;amp;imageBuffer);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;memcpy (imageBuffer, texture-&amp;gt;imageData, texture-&amp;gt;imageSize);&lt;BR /&gt;&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;As you can see it is pretty simple, we create an Image and it is passed to g_imageHandle and&amp;nbsp;then we initialize the texture for this image handle, note that it is only initialized&amp;nbsp;once.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Once got the image and texture initialized, we use the function eglQueryImageFSL which gives&amp;nbsp;us the pointer to the GPU buffer, and then, the data is written to the GPU buffer using memcpy.&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;CITE&gt;Andre Luiz Vieira da Silva said:&lt;/CITE&gt;&lt;/P&gt;&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/poor-gpu-performance-in-imx515?groupUrl=computervisionusingtheimx&amp;amp;commentId=4103961%3AComment%3A58599&amp;amp;xg_source=msg_com_gr_forum#4103961Comment58599"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Which method are you using for texturing ? the glTexture2D function ? check this approach of writing the GPU buffers directly in this post:&lt;/P&gt;&lt;P&gt;&lt;A href="http://imxcv.blogspot.com/2011/10/video-to-texture-streaming-imx53.html" rel="nofollow" target="_blank"&gt;http://imxcv.blogspot.com/2011/10/video-to-texture-streaming-imx53....&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 14:16:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208358#M12183</guid>
      <dc:creator>QZHua</dc:creator>
      <dc:date>2012-02-06T14:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Poor GPU performance in imx515</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208359#M12184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I´m not wrong, you can get this header with the GPU SDK package at the i.MX51 home page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 16:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Poor-GPU-performance-in-imx515/m-p/208359#M12184</guid>
      <dc:creator>andre_silva</dc:creator>
      <dc:date>2012-10-25T16:29:39Z</dc:date>
    </item>
  </channel>
</rss>

