cconvYUY2.c revision 6035a3d1ce01a78c316578f23393c0b7edca0548
/* texture internalFormat: 4
* size: width/2 X height
* data format: GL_BGRA_EXT
* YUYV ->
* U = G
* V = A
* for even -> Y = B
* for odd -> Y = R
/* UYVY-rgb888 conversion shader */
/* this is also YUNV, V422 and YUYV */
{
float x = srcCoord.x;
float u = srcClr.g;
float v = srcClr.a;
int pix = int(x);
float y;
if(part < 0.5)
{
y = srcClr.b;
}
else
{
y = srcClr.r;
}
/* convert it to AYUV (for the GL_BGRA_EXT texture this is mapped as follows:
* A -> B
* Y -> G
* U -> R
* V -> A */
}