Low fps rate in 2k/4k video

Hi everyone!

I’m coding a video player app using ofVideoPlayer to run 2K/4K videos on a mac. It will run videos and display various text panels over a constant video background.

Running a video using the videoPlayerExample for testing purposes gives a smooth performance of about 25/30 fps.

Running my app almost halfs that frame rate. I’ve used Xcode’s Instruments to run a time profile and I’ve noticed that this strange function called glgConvertTo_32 takes about a third of the CPU’s running time. This happens in the videoPlayerExample and my app as well.

This function is mentioned in other forums related with openGL and with the same complaint: lowered frame rate/performance. You can check it here: “glReadPixels halts my app”

I’m using the out-of-the-box videoPlayerExample for this trace:

I feel like this function occurs due to a mismatch in the video pixel format and the mac renderer’s pixel format (probably saying something stupid here).

I was thinking about manually using the pixels in a texture and drawing that texture but there are so many GL_nnn formats to use that I’ll be trying this forever.

Hope anyone knows that this could be.

-Ran with similar results on a:
Mac mini - Intel Core i5 2,6 GHz - 2014 model currently still for sale
Macbook pro 13’ - i7 - Late 2011
Macbook pro 13’ - i5 - Mid 2014
-Video information (1920x1080, currently scaled)