Commit 95b648a8 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Improve color accuracy of preview (backported from Shotcut)

parent 0cff6005
...@@ -314,9 +314,9 @@ void GLWidget::createYUVTextureProjectFragmentProg() ...@@ -314,9 +314,9 @@ void GLWidget::createYUVTextureProjectFragmentProg()
"varying highp vec2 coordinates;" "varying highp vec2 coordinates;"
"void main(void) {" "void main(void) {"
" mediump vec3 texel;" " mediump vec3 texel;"
" texel.r = texture2D(Ytex, coordinates).r - 0.0625;" // Y " texel.r = texture2D(Ytex, coordinates).r - 16.0/255.0;" // Y
" texel.g = texture2D(Utex, coordinates).r - 0.5;" // U " texel.g = texture2D(Utex, coordinates).r - 128.0/255.0;" // U
" texel.b = texture2D(Vtex, coordinates).r - 0.5;" // V " texel.b = texture2D(Vtex, coordinates).r - 128.0/255.0;" // V
" mediump mat3 coefficients;" " mediump mat3 coefficients;"
" if (colorspace == 601) {" " if (colorspace == 601) {"
" coefficients = mat3(" " coefficients = mat3("
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment