Hello,
I'd like to have some more specific information about the function glTexDirectVIVMap from the OpenGL extension support.
In the i.MX 6 Graphics User's Guide, I can see that the fourth parameter of this function (GLenum format) can be either YUV or RGBA format. In my case I need to send image data in Bayer format to this function but since this format is not supported, I chose the GL_VIV_YV12 format instead and somehow tried to arrange the bytes of my Bayer image as if they were constituting the Y plane of the image data I have. I made some tests assuming that the bytes of the Y plane are stored first for an image in GL_VIV_YV12 format but I got bad results in my application.
Could you indicate me what is the proper pixel arrangement for an image in GL_VIV_YV12 format ?
Thanks.
Hi,
RGB565 and RGB formats are supported according to the driver code in the function glTextDirectVIVMap
switch (format)
{
case GL_VIV_YV12:
case GL_VIV_I420:
case GL_VIV_NV12:
case GL_VIV_NV21:
case GL_VIV_YUY2:
case GL_VIV_UYVY:
case GL_RGB565:
case GL_RGB:
case GL_RGBA:
case GL_BGRA_EXT:
case GL_RG8_EXT:
case GL_ALPHA:
case GL_LUMINANCE8_ALPHA8_EXT:
return GL_TRUE;
I guess you can try to convert your bayer with V4L2 driver
Regards
The glTextDirectVIVMap API is able to load UYVY texture.
What is the accurate algorithm that API convert UYVY to RGB ?
I found this algorithm for G2D from Processor Reference Manual.
16 <= Y <= 235
16 <= U <= 240
16 <= V <= 240
A = Y - 16
B = U - 128
C = V - 128
R = clip(( 298*A + 410*C + 128) >> 8)
G = clip((298*A - 101*B - 209*C + 128) >> 8)
B = clip((298*A + 519*B + 128) >> 8)
Is glTextDirectVIVMap API the same as G2D ?
I want to get a precise calculation of the GPU.