title: Displaying YUV420 data using Opengles shader is too slow
body: <p>I have a child thread called A to decode video using ffmpeg on iPhone 3GS, another thread called B to display yuv data, in thread B, I used glSubTexImage2D to upload Y U V textures, and then convert yuv data to RGB in shader, but the frame rate in the decode thread is only 15fps.Why?</p>
  
  <p><strong>Update:</strong>
  The frame size is 720 * 576.
  I also found something interesting that if I didn't start the thread displaying the YUV data, the frame rate calculated in the decode thread is 22 fps,otherwise 15 fps.So I think that my displaying  method must be inefficient.the code as below.</p>
  
  <p>I have a callback in the decode thread:</p>
  
  <pre><code>typedef struct _DVDVideoPicture
  {
     char *plane[4];
     int iLineSize[4];
  }DVDVideoPicture;
  
  void YUVCallBack(void *pYUVData, void *pContext)
  {
     VideoView *view = (VideoView *)pContext;
     [view.glView copyYUVData:(DVDVideoPicture *)pData];
     [view calculateFrameRate];
  }
  </code></pre>
  
  <p>The copyYUVData method extract the y u v planes separately. The following is displaying thread method.</p>