I have YV12 format pictures (or video data) and i would like to use them with OpenGl (texture).
Can OpenGl texture YV12 without any conversion (eg. to RGB)?
So, basically, is it possible to use YV12 format with OpenGl, please?
Thanks a lot for your answer/help.
Wish you a nice day.
core OpenGL does not have external formats handling YUV planar formats like YV12 and I420. Regarding YUV external formats, the Apple and Mesa OpenGL implementations have extensions for handling YUV packed formats like YUYV and UYVY that are respectively called GL_APPLE_ycbcr_422 and GL_MESA_ycbcr_texture.
For the planar formats, the best solution is to use a pixel shader converting from YUV to RGB. Here is a fragment program that can do that using multitexturing with a texture for each three planes: