Backed out changeset a2cfe189c828 (bug 1215089)

This commit is contained in:
Sebastian Hengst
2017-10-04 16:25:34 +02:00
parent 45551308ec
commit e8544f3c85
5 changed files with 13 additions and 49 deletions

View File

@@ -114,13 +114,6 @@ ShaderConfigOGL::SetYCbCr(bool aEnabled)
MOZ_ASSERT(!(mFeatures & ENABLE_TEXTURE_NV12));
}
void
ShaderConfigOGL::SetColorMultiplier(uint32_t aMultiplier)
{
MOZ_ASSERT(mFeatures & ENABLE_TEXTURE_YCBCR, "Multiplier only supported with YCbCr!");
mMultiplier = aMultiplier;
}
void
ShaderConfigOGL::SetNV12(bool aEnabled)
{
@@ -448,12 +441,11 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
fs << " COLOR_PRECISION float cr = " << texture2D << "(uCbTexture, coord).a;" << endl;
}
}
fs << " y = y - 0.06275;" << endl;
fs << " cb = cb - 0.50196;" << endl;
fs << " cr = cr - 0.50196;" << endl;
fs << " vec3 yuv = vec3(y, cb, cr);" << endl;
if (aConfig.mMultiplier != 1) {
fs << " yuv *= " << aConfig.mMultiplier << ".0;" << endl;
}
fs << " vec3 coeff = vec3(0.06275, 0.50196, 0.50196 );" << endl;
fs << " yuv -= coeff;" << endl;
fs << " color.rgb = uYuvColorMatrix * yuv;" << endl;
fs << " color.a = 1.0;" << endl;
} else if (aConfig.mFeatures & ENABLE_TEXTURE_COMPONENT_ALPHA) {