Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-12-14 20:43:54 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-12-14 20:43:54 +0400
commitbfcd6db4a257b62a44be5867c953af6d64fa9914 (patch)
tree935fe3cf5df4aa4c6c6d851c4bd56e7d6d340404
parent9dc20f40b6cb0c99f795d6a0629a31eab89d09d6 (diff)
Disable interlaced flags when using the Overlay Mixer.
Based on a patch by clsid.
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp9
-rw-r--r--decoder/LAVVideo/LAVVideo.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index 00cc34f2..d280ca45 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -58,6 +58,7 @@ CLAVVideo::CLAVVideo(LPUNKNOWN pUnk, HRESULT* phr)
, m_hrDeliver(S_OK)
, m_LAVPinInfoValid(FALSE)
, m_bMadVR(-1)
+ , m_bOverlayMixer(-1)
, m_bMTFiltering(FALSE)
, m_bFlushing(FALSE)
, m_evFilterInput(TRUE)
@@ -887,10 +888,16 @@ HRESULT CLAVVideo::ReconnectOutput(int width, int height, AVRational ar, DXVA2_E
if (m_bMadVR == -1)
m_bMadVR = FilterInGraph(PINDIR_OUTPUT, CLSID_madVR);
+ if (m_bOverlayMixer == -1)
+ m_bOverlayMixer = !m_bMadVR && FilterInGraph(PINDIR_OUTPUT, CLSID_OverlayMixer);
+
// Only madVR really knows how to deal with these flags, disable them for everyone else
if (m_bDXVAExtFormatSupport == -1)
m_bDXVAExtFormatSupport = m_bMadVR;
+ // Determine Interlaced flags
+ // - madVR handles the flags properly, so properly indicate forced deint, adaptive deint and progressive
+ // - The OverlayMixer fails at interlaced support, so completely disable interlaced flags for it
BOOL bInterlaced = IsInterlaced();
DWORD dwInterlacedFlags = 0;
if (m_bMadVR) {
@@ -901,7 +908,7 @@ HRESULT CLAVVideo::ReconnectOutput(int width, int height, AVRational ar, DXVA2_E
} else {
dwInterlacedFlags = 0;
}
- } else {
+ } else if (!m_bOverlayMixer) {
dwInterlacedFlags = bInterlaced ? AMINTERLACE_IsInterlaced | AMINTERLACE_DisplayModeBobOrWeave : 0;
}
diff --git a/decoder/LAVVideo/LAVVideo.h b/decoder/LAVVideo/LAVVideo.h
index 03b7a0cf..cf3419c6 100644
--- a/decoder/LAVVideo/LAVVideo.h
+++ b/decoder/LAVVideo/LAVVideo.h
@@ -216,6 +216,7 @@ private:
DWORD m_bDXVAExtFormatSupport;
DWORD m_bMadVR;
+ DWORD m_bOverlayMixer;
DWORD m_dwDecodeFlags;
BOOL m_bInDVDMenu;