Index: src/gpu/effects/GrYUVtoRGBEffect.cpp |
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp |
index a46cb920777ca99d174ad7c2c56d482555ab869e..dd1b48082c6bd1487c835c4e0328014b6b876a48 100644 |
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp |
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp |
@@ -54,6 +54,7 @@ public: |
public: |
static const GrGLfloat kJPEGConversionMatrix[16]; |
static const GrGLfloat kRec601ConversionMatrix[16]; |
+ static const GrGLfloat kRec709ConversionMatrix[16]; |
// this class always generates the same code. |
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*) {} |
@@ -91,6 +92,9 @@ public: |
case kRec601_SkYUVColorSpace: |
pdman.setMatrix4f(fMatrixUni, kRec601ConversionMatrix); |
break; |
+ case kRec709_SkYUVColorSpace: |
+ pdman.setMatrix4f(fMatrixUni, kRec709ConversionMatrix); |
+ break; |
} |
} |
@@ -161,6 +165,11 @@ const GrGLfloat YUVtoRGBEffect::GLProcessor::kRec601ConversionMatrix[16] = { |
1.164f, -0.391f, -0.813f, 0.52925f, |
1.164f, 2.018f, 0.0f, -1.08175f, |
0.0f, 0.0f, 0.0f, 1.0}; |
+const GrGLfloat YUVtoRGBEffect::GLProcessor::kRec709ConversionMatrix[16] = { |
+ 1.164f, 0.0f, 1.793f, -0.96925f, |
+ 1.164f, -0.213f, -0.533f, 0.30025f, |
+ 1.164f, 2.112f, 0.0f, -1.12875f, |
+ 0.0f, 0.0f, 0.0f, 1.0f}; |
} |
////////////////////////////////////////////////////////////////////////////// |