faster movie playback

How can I improve my movie playback performance?

I decode each frame to memory then I set my texture data to the new data with glTexSubImage2D and then display the texture. It is a simple 512x512x24bit image.

Unfortunatly glTexSubImage2D takes about 3.5ms on my P4/GF4. Surely there is some way I can do this more effeciently? Are there any extensions to do this quicker?

You should take a look at GL_NV_pixel_data_range extension. One of its purposes is to make glDrawPixels and glTexSubImage to work faster. I haven’t use it though, so I can’t tell if it really gives any boost…

Kuba

3.5 whole milliseconds? That would mean that you can do it 285 times per second. Given that your video is probably 30 fps at most, why do you need to improve the speed?

How did you obtain that 3.5 msec number anyway? OpenGL is a pipelined architecture, so the chances on the operation actually being completed when the function call returns are slim.

– Tom

ARB_texture_compression ?