Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: client/deps/glbench/src/yuv2rgb_2.glslf

Issue 2757001: Refactored YUV test. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/deps/glbench/src/yuv2rgb_1.glslv ('k') | client/deps/glbench/src/yuv2rgb_2.glslv » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/yuv2rgb_2.glslf
diff --git a/client/deps/glbench/src/yuv2rgb_2.glslf b/client/deps/glbench/src/yuv2rgb_2.glslf
index 81c7a17a662177b6d978707b9b1e2f6e7cc60345..bf3b0bbf190447f578e735bc6e81573f96fc9c3b 100644
--- a/client/deps/glbench/src/yuv2rgb_2.glslf
+++ b/client/deps/glbench/src/yuv2rgb_2.glslf
@@ -43,6 +43,10 @@ varying vec2 yPlane;
varying vec2 uPlane;
varying vec2 vPlane;
+#if defined (USE_UNIFORM_MATRIX)
+uniform mat4 conversion;
+#endif
+
void main() {
/*
* If the height of the original image is even, offset_odd is not needed.
@@ -70,10 +74,12 @@ void main() {
* [0,1] to [-.5,.5] as part of the transform.
*/
vec4 channels = vec4(yChannel, uChannel, vChannel, 1.0);
+#if !defined(USE_UNIFORM_MATRIX)
mat4 conversion = mat4( 1.0, 1.0, 1.0, 0.0,
0.0, -0.344, 1.772, 0.0,
1.402, -0.714, 0.0, 0.0,
-0.701, 0.529, -0.886, 1.0);
+#endif
gl_FragColor = conversion * channels;
}
« no previous file with comments | « client/deps/glbench/src/yuv2rgb_1.glslv ('k') | client/deps/glbench/src/yuv2rgb_2.glslv » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698