I am attempting to convert YV12 to RGB using the following fragment shader:
precision mediump float; uniform sampler2D tex0, tex1, tex2; varying vec2 v_texCoord; void main(void) { float r, g, b, y, u, v; y = texture2D(tex0, v_texCoord).x; u = texture2D(tex1, v_texCoord).x; v = texture2D(tex2, v_texCoord).x; y = 1.1643 * (y - 0.0625); u = u - 0.5; v = v - 0.5; r = y + 1.5958 * v; g = y - 0.39173 * u - 0.81290 * v; b = y + 2.017 * u; gl_FragColor = vec4(r, g, b, 1.0); } Below is the original image followed by the converted image. Based on the output, can you determine where I might look to determine what is causing the improper decoding?
