cconvYV12.c revision 073b23b4ae48ce7c105b28442f47c9a0c7a1110f
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsync#extension GL_ARB_texture_rectangle : enable
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsyncuniform sampler2DRect uSrcTex;
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsyncuniform sampler2DRect uVTex;
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsyncuniform sampler2DRect uUTex;
64082f4699f276693cf5b1ec5886ac12234af115vboxsyncfloat vboxSplitBGRA(vec4 color, float coord);
64082f4699f276693cf5b1ec5886ac12234af115vboxsyncvoid vboxCConvApplyAYUV(vec4 color);
9fc488be77be11a4dcb83feb09cdee11bb160746vboxsyncvoid vboxCConv()
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsync{
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync vec2 clrCoordY = vec2(gl_TexCoord[0]);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync vec2 clrCoordV = vec2(gl_TexCoord[1]);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync int ix = int(clrCoordY.x);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync vec2 coordY = vec2(float(ix), clrCoordY.y);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync ix = int(clrCoordV.x);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync vec2 coordV = vec2(float(ix), clrCoordV.y);
64082f4699f276693cf5b1ec5886ac12234af115vboxsync vec4 clrY = texture2DRect(uSrcTex, vec2(coordY));
64082f4699f276693cf5b1ec5886ac12234af115vboxsync vec4 clrV = texture2DRect(uVTex, vec2(coordV));
9fc488be77be11a4dcb83feb09cdee11bb160746vboxsync vec4 clrU = texture2DRect(uUTex, vec2(coordV));
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync float y = vboxSplitBGRA(clrY, clrCoordY.x);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync float v = vboxSplitBGRA(clrV, clrCoordV.x);
073b23b4ae48ce7c105b28442f47c9a0c7a1110fvboxsync float u = vboxSplitBGRA(clrU, clrCoordV.x);
64082f4699f276693cf5b1ec5886ac12234af115vboxsync vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
6035a3d1ce01a78c316578f23393c0b7edca0548vboxsync}