0

I am writing a video player, I decoded the video frames and use 3 sampler2Ds for receiving the YUV format frame data, it renders perfectly fine.

But it has serious performance issue with glTexSubImage2D. I observed strange behaviors:

  1. Uploading YUV data in an order of Y, U, V, then uploading U is randomly slow(1ms to 100ms).
  2. Uploading YUV data in an order of Y, V, U, then uploading V is randomly slow(1ms to 100ms).
  3. Uploading YUV data in an order of U, V, Y, then uploading Y is constantly slow(10ms to 50ms).

For other components that are not slow to upload, they take less than 1ms. I use glTexSubImage2D with internalFormat=GL_RED, format=GL_RED, dataType=GL_UNSIGNED_BYTE.

What could be the possible cause of these strange behaviors?

neevek
  • 11,760
  • 8
  • 55
  • 73
  • Those who suggests closing this question please leave your reason here, how is this question **OFF TOPIC**? – neevek Aug 28 '17 at 12:02
  • The problem with your question is that you're not asking in regards to a specific programming problem, but rather your question is too general. I mean, we have no way to understand why it is 'slow'. You haven't shown a single line of code.Neitgher we have any idea regarding your environment. What type of CPU/GPU. In short, you must provide detailed info ,including a source code, if you want us to try helping you. – Michael IV Aug 28 '17 at 21:22
  • I did provide all the information that I considered matter the most, the API I used, the execution time of the API, the way I called the API, the relevant parameters. Yes, I didn't mention the environment, sorry for that. But the environment is not special, and that's the reason why I didn't include it in the question. I run the code on MacOS(MacBook 2016) and an Android device with CPU `Qualcomm® Snapdragon™ 821`, and GPU `Adreno™ 530`. They both yield the same result. – neevek Aug 29 '17 at 04:52
  • You must show actual code. This is not enough info. Also how did you measure your timing? – Michael IV Aug 29 '17 at 07:03

0 Answers0