0
votes

I have an Android application that displays VGA (640x480) frames using OpenGL ES. The application reads each frame from a movie file and updates the texture accordingly.

My problem is that, it is taking almost 30 ms. to draw each frame using OpenGL. Similar test using the Canvas/drawBitmap was around 6 ms on the same device.

I'm following the same OpenGL calls that VLC Media Player is using, so I'm assuming that those are optimized for this purpose.

I just wanted to hear your thoughts and ideas about it?

2
Do you have any idea of the breakdown in time between the video frame->texture versus the rendering of the texture to the polygon? I suspect a large part of the cost is the video decompression. If you just draw the same frame over and over again, does it change the time spent? - dash-tom-bang

2 Answers

0
votes

Are you sure that the bitmap are loaded with RBG_565?Try this :

BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.RGB_565;
bm = BitmapFactory.decodeByteArray(temp, 0, temp.length,opt);

Let me know!

0
votes

Which are the calls you are using ? make sure that u create texture only once (glTexImage2D) and next time just update it with new buffer.You can also disable other gl things like depthbuffer,stencil,accumulation,lighting, etc... If none of these helps , check you opengl implementation. make sure that that uses hardware(gpu)