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

Unified Diff: webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java

Issue 1862003002: Android: Fix chroma sampling bug when converting from texture to YUV (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change 2 to 2.0f Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
diff --git a/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java b/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
index 4d75d6891d698739b0c90770e700b3e17034f622..5a54e904ad5062e7a699174fcefba1b4a04e86f0 100644
--- a/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
+++ b/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
@@ -251,10 +251,10 @@ class SurfaceTextureHelper {
// Draw U
GLES20.glViewport(0, height, uv_width, uv_height);
- // Matrix * (1;0;0;0) / (2*width). Note that opengl uses column major order.
+ // Matrix * (1;0;0;0) / (width / 2). Note that opengl uses column major order.
GLES20.glUniform2f(xUnitLoc,
- transformMatrix[0] / (2.0f*width),
- transformMatrix[1] / (2.0f*width));
+ 2.0f * transformMatrix[0] / width,
+ 2.0f * transformMatrix[1] / width);
GLES20.glUniform4f(coeffsLoc, -0.169f, -0.331f, 0.499f, 0.5f);
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698