Ticket #9507: 101-bicubic_rect_fix.patch

File 101-bicubic_rect_fix.patch, 1.7 KB (added by Jiri Fojtasek <jiri.fojtasek@…>, 10 years ago)

the patch

  • libs/libmythtv/openglvideo.cpp

    diff -u -r -p mythtv.100/libs/libmythtv/openglvideo.cpp mythtv/libs/libmythtv/openglvideo.cpp
    old new bool OpenGLVideo::Init(MythRenderOpenGL  
    205205    }
    206206
    207207    // decide on best input texture type
    208     if ((GL_RGBA != videoTextureType) && (defaultUpsize != kGLFilterBicubic) &&
    209         (gl_features & kGLExtRect))
    210     {
     208    if ((GL_RGBA != videoTextureType) && (gl_features & kGLExtRect))
    211209        textureType = gl_context->GetTextureType(textureRects);
    212     }
    213210
    214211    // Create initial input texture and associated filter stage
    215212    GLuint tex = CreateVideoTexture(video_dim, inputTextureSize);
    yadif_setup + 
    14451442
    14461443static const QString bicubic =
    14471444"TEMP coord, coord2, cdelta, parmx, parmy, a, b, c, d;\n"
    1448 "MAD coord.xy, fragment.texcoord[0], {%6, %7}, {-0.5, -0.5};\n"
     1445"MAD coord.xy, fragment.texcoord[0], {%6, %7}, {0.5, 0.5};\n"
    14491446"TEX parmx, coord.x, texture[1], 1D;\n"
    14501447"TEX parmy, coord.y, texture[1], 1D;\n"
    14511448"MUL cdelta.xz, parmx.rrgg, {-%5, 0, %5, 0};\n"
    14521449"MUL cdelta.yw, parmy.rrgg, {0, -%3, 0, %3};\n"
    14531450"ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;\n"
    14541451"ADD coord2, fragment.texcoord[0].xyxy, cdelta.zyzw;\n"
    1455 "TEX a, coord.xyxy, texture[0], 2D;\n"
    1456 "TEX b, coord.zwzw, texture[0], 2D;\n"
    1457 "TEX c, coord2.xyxy, texture[0], 2D;\n"
    1458 "TEX d, coord2.zwzw, texture[0], 2D;\n"
     1452"TEX a, coord.xyxy, texture[0], %1;\n"
     1453"TEX b, coord.zwzw, texture[0], %1;\n"
     1454"TEX c, coord2.xyxy, texture[0], %1;\n"
     1455"TEX d, coord2.zwzw, texture[0], %1;\n"
    14591456"LRP a, parmy.b, a, b;\n"
    14601457"LRP c, parmy.b, c, d;\n"
    14611458"LRP result.color, parmx.b, a, c;\n";