OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gl/builders/GrGLProgramBuilder.h" | 8 #include "gl/builders/GrGLProgramBuilder.h" |
9 #include "GrYUVtoRGBEffect.h" | 9 #include "GrYUVtoRGBEffect.h" |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 typedef GrEffect INHERITED; | 126 typedef GrEffect INHERITED; |
127 }; | 127 }; |
128 | 128 |
129 const GrGLfloat YUVtoRGBEffect::GLEffect::kJPEGConversionMatrix[16] = { | 129 const GrGLfloat YUVtoRGBEffect::GLEffect::kJPEGConversionMatrix[16] = { |
130 1.0f, 0.0f, 1.402f, -0.701f, | 130 1.0f, 0.0f, 1.402f, -0.701f, |
131 1.0f, -0.34414f, -0.71414f, 0.529f, | 131 1.0f, -0.34414f, -0.71414f, 0.529f, |
132 1.0f, 1.772f, 0.0f, -0.886f, | 132 1.0f, 1.772f, 0.0f, -0.886f, |
133 0.0f, 0.0f, 0.0f, 1.0}; | 133 0.0f, 0.0f, 0.0f, 1.0}; |
134 const GrGLfloat YUVtoRGBEffect::GLEffect::kRec601ConversionMatrix[16] = { | 134 const GrGLfloat YUVtoRGBEffect::GLEffect::kRec601ConversionMatrix[16] = { |
135 1.164f, 0.0f, 1.596f, -1.08175f, | 135 1.164f, 0.0f, 1.596f, -0.87075f, |
136 1.164f, -0.391f, -0.813f, 0.529f, | 136 1.164f, -0.391f, -0.813f, 0.52925f, |
137 1.164f, 2.018f, 0.0f, -1.08175f, | 137 1.164f, 2.018f, 0.0f, -1.08175f, |
138 0.0f, 0.0f, 0.0f, 1.0}; | 138 0.0f, 0.0f, 0.0f, 1.0}; |
139 } | 139 } |
140 | 140 |
141 ////////////////////////////////////////////////////////////////////////////// | 141 ////////////////////////////////////////////////////////////////////////////// |
142 | 142 |
143 GrEffect* GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrT
exture* vTexture, | 143 GrEffect* GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrT
exture* vTexture, |
144 SkYUVColorSpace colorSpace) { | 144 SkYUVColorSpace colorSpace) { |
145 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); | 145 return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, colorSpace); |
146 } | 146 } |
OLD | NEW |