Ticket #13230: 20180402-yuv-greenline-interlaced.patch

File 20180402-yuv-greenline-interlaced.patch, 2.4 KB (added by Mark Spieth, 15 months ago)
  • mythtv/libs/libmythtv/openglvideo.cpp

    diff --git a/mythtv/libs/libmythtv/openglvideo.cpp b/mythtv/libs/libmythtv/openglvideo.cpp
    index fdfa3adc86..ec9b4303d9 100644
    a b static const QString OneFieldShader[2] = { 
    15691581"varying vec2 v_texcoord0;\n"
    15701582"void main(void)\n"
    15711583"{\n"
    1572 "    float field = v_texcoord0.y + (step(0.5, fract(v_texcoord0.y * %2)) * %3);\n"
     1584"    float field = v_texcoord0.y - (step(0.5, fract(v_texcoord0.y * %2)) * %3);\n"
    15731585"    field       = clamp(field, 0.0, %9);\n"
    15741586"    vec4 yuva   = GLSL_TEXTURE(s_texture0, vec2(v_texcoord0.x, field));\n"
    15751587"SELECT_COLUMN"
    static const QString LinearBlendShader[2] = { 
    16011613"    vec4 yuva  = GLSL_TEXTURE(s_texture0, v_texcoord0);\n"
    16021614"    vec4 above = GLSL_TEXTURE(s_texture0, line2);\n"
    16031615"    vec4 below = GLSL_TEXTURE(s_texture0, line1);\n"
    1604 "    if (fract(v_texcoord0.y * %2) >= 0.5)\n"
     1616"    if (fract(v_texcoord0.y * %2) < 0.5)\n"
    16051617"        yuva = mix(above, below, 0.5);\n"
    16061618"SELECT_COLUMN"
    16071619"    gl_FragColor = vec4(yuva.arb, 1.0) * COLOUR_UNIFORM;\n"
    static const QString LinearBlendShader[2] = { 
    16181630"    vec4 yuva  = GLSL_TEXTURE(s_texture0, v_texcoord0);\n"
    16191631"    vec4 above = GLSL_TEXTURE(s_texture0, line2);\n"
    16201632"    vec4 below = GLSL_TEXTURE(s_texture0, line1);\n"
    1621 "    if (fract(v_texcoord0.y * %2) < 0.5)\n"
     1633"    if (fract(v_texcoord0.y * %2) >= 0.5)\n"
    16221634"        yuva = mix(above, below, 0.5);\n"
    16231635"SELECT_COLUMN"
    16241636"    gl_FragColor = vec4(yuva.arb, 1.0) * COLOUR_UNIFORM;\n"
    static const QString KernelShader[2] = { 
    16341646"void main(void)\n"
    16351647"{\n"
    16361648"    vec4 yuva    = GLSL_TEXTURE(s_texture0, v_texcoord0);\n"
    1637 "    if (fract(v_texcoord0.y * %2) >= 0.5)\n"
     1649"    if (fract(v_texcoord0.y * %2) < 0.5)\n"
    16381650"    {\n"
    16391651"        vec2 twoup   = vec2(v_texcoord0.x, clamp(v_texcoord0.y - %4, 0.0, %9));\n"
    16401652"        vec2 twodown = vec2(v_texcoord0.x, clamp(v_texcoord0.y + %4, 0.0, %9));\n"
    static const QString KernelShader[2] = { 
    16681680"void main(void)\n"
    16691681"{\n"
    16701682"    vec4 yuva    = GLSL_TEXTURE(s_texture1, v_texcoord0);\n"
    1671 "    if (fract(v_texcoord0.y * %2) < 0.5)\n"
     1683"    if (fract(v_texcoord0.y * %2) >= 0.5)\n"
    16721684"    {\n"
    16731685"        vec2 twoup   = vec2(v_texcoord0.x, clamp(v_texcoord0.y - %4, 0.0, %9));\n"
    16741686"        vec2 twodown = vec2(v_texcoord0.x, clamp(v_texcoord0.y + %4, 0.0, %9));\n"