Ticket #2649: opengl_osd_fixes.diff

File opengl_osd_fixes.diff, 2.3 KB (added by mark_kendall@…, 20 years ago)

Opengl OSD improvements

  • libs/libmythtv/openglvideo.cpp

     
    145145        {
    146146            inputTextures.push_back(yuv12tex);
    147147            inputTextures.push_back(alphatex);
     148            AddFilter(kGLFilterResize);
    148149        }
    149150    }
    150151    else
     
    804805        OpenGLFilterType type = it->first;
    805806        OpenGLFilter *filter = it->second;
    806807
     808        // skip colour conversion for osd already in frame buffer
     809        if (!inputUpdated && type == kGLFilterYUV2RGBA)
     810        {
     811            inputs = filter->frameBufferTextures;
     812            inputsize = videoSize;
     813            continue;
     814        }
     815
    807816        // skip colour conversion for frames already in frame buffer
    808817        if (!inputUpdated && (frame == currentFrameNum) &&
    809818            (type == kGLFilterYUV2RGB) && (frame != 0) &&
     
    968977        }
    969978
    970979        // enable blending for osd
    971         if (type == kGLFilterYUV2RGBA)
     980        if (type == kGLFilterResize && filters.count(kGLFilterYUV2RGBA))
    972981            glEnable(GL_BLEND);
    973982
    974983        // draw quad
     
    980989        glEnd();
    981990
    982991        // disable blending
    983         if (type == kGLFilterYUV2RGBA)
     992        if (type == kGLFilterResize && filters.count(kGLFilterYUV2RGBA))
    984993            glDisable(GL_BLEND);
    985994
    986995        // disable fragment program
  • libs/libmythtv/videoout_xv.cpp

     
    284284                gl_videochain->GetViewPort());
    285285        }
    286286
     287        if (gl_osdchain && gl_osdchain != NULL)
     288        {
     289            gl_osdchain->SetMasterViewport(gl_videochain->GetViewPort());
     290        }
     291
    287292        ok = CreateBuffers(VideoOutputSubType());
    288293    }
    289294
     
    12521257            gl_osdchain = NULL;
    12531258            gl_use_osd_opengl2 = false;
    12541259        }
     1260        else
     1261        {
     1262            if (gl_videochain && gl_videochain != NULL)
     1263            {
     1264                gl_osdchain->SetMasterViewport(gl_videochain->GetViewPort());
     1265            }
     1266        }
    12551267
    12561268        gl_context->MakeCurrent(false);
    12571269    }