Permalink
Browse files

vdpau: make interop gl default and remove setting, rename and intvert…

… interop yuv
  • Loading branch information...
1 parent 23b5c11 commit 4036d019c345bc4544cf1c85e1eb38c8047d841c @FernetMenta committed Dec 12, 2012
@@ -5121,7 +5121,7 @@ msgid "Allow Vdpau OpenGL interop"
msgstr ""
msgctxt "#13436"
-msgid "Allow Vdpau OpenGL interop YUV"
+msgid "Prefer VDPAU Video Mixer"
msgstr ""
msgctxt "#13437"
@@ -365,12 +365,15 @@ bool CDecoder::Supports(EINTERLACEMETHOD method)
|| method == VS_INTERLACEMETHOD_AUTO)
return true;
- if (g_guiSettings.GetBool("videoplayer.usevdpauinteropyuv"))
+ if (!m_vdpauConfig.usePixmaps)
{
if (method == VS_INTERLACEMETHOD_RENDER_BOB)
return true;
}
+ if (method == VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE)
+ return false;
+
for(SInterlaceMapping* p = g_interlace_mapping; p->method != VS_INTERLACEMETHOD_NONE; p++)
{
if(p->method == method)
@@ -1847,7 +1850,7 @@ void CMixer::SetDeinterlacing()
SetDeintSkipChroma();
- m_config.useInteropYuv = g_guiSettings.GetBool("videoplayer.usevdpauinteropyuv");
+ m_config.useInteropYuv = !g_guiSettings.GetBool("videoplayer.usevdpaumixer");
}
void CMixer::SetDeintSkipChroma()
@@ -2039,7 +2042,7 @@ void CMixer::Init()
m_vdpError = false;
m_config.upscale = g_advancedSettings.m_videoVDPAUScaling;
- m_config.useInteropYuv = g_guiSettings.GetBool("videoplayer.usevdpauinteropyuv");
+ m_config.useInteropYuv = !g_guiSettings.GetBool("videoplayer.usevdpaumixer");
CreateVdpauMixer();
}
@@ -2149,11 +2152,12 @@ void CMixer::InitCycle()
DVP_FLAG_INTERLACED);
m_config.useInteropYuv = false;
}
- else if (method == VS_INTERLACEMETHOD_RENDER_BOB && m_config.useInteropYuv)
+ else if (method == VS_INTERLACEMETHOD_RENDER_BOB)
{
m_mixersteps = 1;
m_mixerfield = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME;
m_mixerInput[1].DVDPic.format = RENDER_FMT_VDPAU_420;
+ m_config.useInteropYuv = true;
}
else
{
@@ -3185,7 +3189,7 @@ bool COutput::GLInit()
glVDPAUGetSurfaceivNV = NULL;
#endif
- m_config.usePixmaps = !g_guiSettings.GetBool("videoplayer.usevdpauinterop");
+ m_config.usePixmaps = false;
#ifdef GL_NV_vdpau_interop
if (glewIsSupported("GL_NV_vdpau_interop"))
@@ -3217,8 +3221,7 @@ bool COutput::GLInit()
#endif
{
m_config.usePixmaps = true;
- g_guiSettings.SetBool("videoplayer.usevdpauinterop",false);
- g_guiSettings.SetBool("videoplayer.usevdpauinteropyuv",false);
+ g_guiSettings.SetBool("videoplayer.usevdpaumixer",true);
}
if (!glXBindTexImageEXT)
glXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)glXGetProcAddress((GLubyte *) "glXBindTexImageEXT");
@@ -690,8 +690,7 @@ void CGUISettings::Initialize()
#ifdef HAVE_LIBVDPAU
AddBool(vp, "videoplayer.usevdpau", 13425, true);
- AddBool(vp, "videoplayer.usevdpauinterop", 13435, true);
- AddBool(vp, "videoplayer.usevdpauinteropyuv", 13436, false);
+ AddBool(vp, "videoplayer.usevdpaumixer", 13436, true);
#endif
#ifdef HAVE_LIBVA
AddBool(vp, "videoplayer.usevaapi", 13426, true);
@@ -602,9 +602,9 @@ void CGUIWindowSettingsCategory::UpdateSettings()
pControl->SetEnabled(true);
}
}
- else if (strSetting.Equals("videoplayer.usevdpauinteropyuv"))
+ else if (strSetting.Equals("videoplayer.usevdpaumixer"))
{
- bool hasInterop = g_guiSettings.GetBool("videoplayer.usevdpauinterop");
+ bool hasInterop = true;
#ifndef GL_NV_vdpau_interop
hasInterop = false;
#endif
@@ -616,24 +616,7 @@ void CGUIWindowSettingsCategory::UpdateSettings()
else
{
pControl->SetEnabled(false);
- g_guiSettings.SetBool("videoplayer.usevdpauinteropyuv",false);
- }
- }
- else if (strSetting.Equals("videoplayer.usevdpauinterop"))
- {
- bool hasInterop = g_guiSettings.GetBool("videoplayer.usevdpau");
-#ifndef GL_NV_vdpau_interop
- hasInterop = false;
-#endif
- CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
- if (pControl && hasInterop && glewIsSupported("GL_NV_vdpau_interop"))
- {
- pControl->SetEnabled(true);
- }
- else
- {
- pControl->SetEnabled(false);
- g_guiSettings.SetBool("videoplayer.usevdpauinterop",false);
+ g_guiSettings.SetBool("videoplayer.usevdpaumixer",true);
}
}
else

0 comments on commit 4036d01

Please sign in to comment.