diff options
Diffstat (limited to 'libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h')
-rw-r--r-- | libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h index de9acf8..87f4095 100644 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h +++ b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h | |||
@@ -10,11 +10,15 @@ | |||
10 | "varying vec2 tex_c, tex_c2, tex_c3;\n" | 10 | "varying vec2 tex_c, tex_c2, tex_c3;\n" |
11 | "void main()\n" | 11 | "void main()\n" |
12 | "{\n" | 12 | "{\n" |
13 | " const mat4 yuv2rgb = mat4( 1.16400, 1.16400, 1.16400, 0.00000,\n" | 13 | " float r, g, b, y, u, v;\n" |
14 | " 0.00000, -0.34410, 1.77200, 0.00000,\n" | 14 | " y = texture2D(tex, tex_c.xy).r;\n" |
15 | " 1.40200, -0.71410, 0.00000, 0.00000,\n" | 15 | " u = texture2D(texu, tex_c2.xy).r;\n" |
16 | " -0.77380, 0.45630, -0.95880, 1.00000);\n" | 16 | " v = texture2D(texv, tex_c3.xy).r;\n" |
17 | " gl_FragColor = (yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,\n" | 17 | " y = (y - 0.0625) * 1.164;\n" |
18 | " texture2D(texu, tex_c2.xy).r,\n" | 18 | " u = u - 0.5;\n" |
19 | " texture2D(texv, tex_c3.xy).r, 1.0)) * col;\n" | 19 | " v = v - 0.5;\n" |
20 | " r = y + (1.402 * v);\n" | ||
21 | " g = y - (0.34414 * u) - (0.71414 * v);\n" | ||
22 | " b = y + (1.772 * u);\n" | ||
23 | " gl_FragColor = vec4(r, g, b, 1.0) * col;\n" | ||
20 | "}\n" | 24 | "}\n" |