diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2010-04-29 03:55:20 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2010-04-29 03:55:20 +0400 |
commit | 25d1ca947c7254d3b2bc5d8e6246119936bf4788 (patch) | |
tree | 53939d1c5071aecd1b04d2a939ff3b991eab1070 /src | |
parent | 10d1492f63cd2793ce19084d65f0f143967364ab (diff) |
Correct : Level@5.1 check for Ati(remove check for video width);
Add : MPCVIdeoDecoder, disable DXVA(H.264) for SD video(width < 1280);
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1820 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
28 files changed, 81 insertions, 37 deletions
diff --git a/src/apps/mplayerc/mplayerc.br.rc b/src/apps/mplayerc/mplayerc.br.rc Binary files differindex 085abe368..6515b9250 100644 --- a/src/apps/mplayerc/mplayerc.br.rc +++ b/src/apps/mplayerc/mplayerc.br.rc diff --git a/src/apps/mplayerc/mplayerc.by.rc b/src/apps/mplayerc/mplayerc.by.rc Binary files differindex 618109d27..bc91fbf9e 100644 --- a/src/apps/mplayerc/mplayerc.by.rc +++ b/src/apps/mplayerc/mplayerc.by.rc diff --git a/src/apps/mplayerc/mplayerc.cz.rc b/src/apps/mplayerc/mplayerc.cz.rc Binary files differindex 33161bef4..214d8599b 100644 --- a/src/apps/mplayerc/mplayerc.cz.rc +++ b/src/apps/mplayerc/mplayerc.cz.rc diff --git a/src/apps/mplayerc/mplayerc.de.rc b/src/apps/mplayerc/mplayerc.de.rc Binary files differindex 313b8415d..73355de8a 100644 --- a/src/apps/mplayerc/mplayerc.de.rc +++ b/src/apps/mplayerc/mplayerc.de.rc diff --git a/src/apps/mplayerc/mplayerc.es.rc b/src/apps/mplayerc/mplayerc.es.rc Binary files differindex f3d53a7e6..018fb7dd4 100644 --- a/src/apps/mplayerc/mplayerc.es.rc +++ b/src/apps/mplayerc/mplayerc.es.rc diff --git a/src/apps/mplayerc/mplayerc.fr.rc b/src/apps/mplayerc/mplayerc.fr.rc Binary files differindex 6df626b20..5417d563f 100644 --- a/src/apps/mplayerc/mplayerc.fr.rc +++ b/src/apps/mplayerc/mplayerc.fr.rc diff --git a/src/apps/mplayerc/mplayerc.hu.rc b/src/apps/mplayerc/mplayerc.hu.rc Binary files differindex 686b92632..6e1ce426c 100644 --- a/src/apps/mplayerc/mplayerc.hu.rc +++ b/src/apps/mplayerc/mplayerc.hu.rc diff --git a/src/apps/mplayerc/mplayerc.it.rc b/src/apps/mplayerc/mplayerc.it.rc Binary files differindex 4f092bb26..efbaadfb4 100644 --- a/src/apps/mplayerc/mplayerc.it.rc +++ b/src/apps/mplayerc/mplayerc.it.rc diff --git a/src/apps/mplayerc/mplayerc.kr.rc b/src/apps/mplayerc/mplayerc.kr.rc Binary files differindex a31e18ae5..533625ad6 100644 --- a/src/apps/mplayerc/mplayerc.kr.rc +++ b/src/apps/mplayerc/mplayerc.kr.rc diff --git a/src/apps/mplayerc/mplayerc.nl.rc b/src/apps/mplayerc/mplayerc.nl.rc Binary files differindex 0dbb0520e..6c901352d 100644 --- a/src/apps/mplayerc/mplayerc.nl.rc +++ b/src/apps/mplayerc/mplayerc.nl.rc diff --git a/src/apps/mplayerc/mplayerc.pl.rc b/src/apps/mplayerc/mplayerc.pl.rc Binary files differindex 6d4b856f2..8572ac7fb 100644 --- a/src/apps/mplayerc/mplayerc.pl.rc +++ b/src/apps/mplayerc/mplayerc.pl.rc diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc Binary files differindex b06c4babb..77c22e960 100644 --- a/src/apps/mplayerc/mplayerc.rc +++ b/src/apps/mplayerc/mplayerc.rc diff --git a/src/apps/mplayerc/mplayerc.ru.rc b/src/apps/mplayerc/mplayerc.ru.rc Binary files differindex e6d34637f..28c8422a3 100644 --- a/src/apps/mplayerc/mplayerc.ru.rc +++ b/src/apps/mplayerc/mplayerc.ru.rc diff --git a/src/apps/mplayerc/mplayerc.sc.rc b/src/apps/mplayerc/mplayerc.sc.rc Binary files differindex eda7f0563..909252ff7 100644 --- a/src/apps/mplayerc/mplayerc.sc.rc +++ b/src/apps/mplayerc/mplayerc.sc.rc diff --git a/src/apps/mplayerc/mplayerc.sk.rc b/src/apps/mplayerc/mplayerc.sk.rc Binary files differindex 745f781fa..d439303c6 100644 --- a/src/apps/mplayerc/mplayerc.sk.rc +++ b/src/apps/mplayerc/mplayerc.sk.rc diff --git a/src/apps/mplayerc/mplayerc.sv.rc b/src/apps/mplayerc/mplayerc.sv.rc Binary files differindex d124049a0..1ac9ff76e 100644 --- a/src/apps/mplayerc/mplayerc.sv.rc +++ b/src/apps/mplayerc/mplayerc.sv.rc diff --git a/src/apps/mplayerc/mplayerc.tc.rc b/src/apps/mplayerc/mplayerc.tc.rc Binary files differindex b266af156..99bc95148 100644 --- a/src/apps/mplayerc/mplayerc.tc.rc +++ b/src/apps/mplayerc/mplayerc.tc.rc diff --git a/src/apps/mplayerc/mplayerc.tr.rc b/src/apps/mplayerc/mplayerc.tr.rc Binary files differindex db3534b23..d88213e40 100644 --- a/src/apps/mplayerc/mplayerc.tr.rc +++ b/src/apps/mplayerc/mplayerc.tr.rc diff --git a/src/apps/mplayerc/mplayerc.ua.rc b/src/apps/mplayerc/mplayerc.ua.rc Binary files differindex f38877555..1e789ed61 100644 --- a/src/apps/mplayerc/mplayerc.ua.rc +++ b/src/apps/mplayerc/mplayerc.ua.rc diff --git a/src/apps/mplayerc/resource.h b/src/apps/mplayerc/resource.h Binary files differindex dbe3e9b74..00104894c 100644 --- a/src/apps/mplayerc/resource.h +++ b/src/apps/mplayerc/resource.h diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.c b/src/filters/transform/MPCVideoDec/FfmpegContext.c index 92c61d74e..812d6a923 100644 --- a/src/filters/transform/MPCVideoDec/FfmpegContext.c +++ b/src/filters/transform/MPCVideoDec/FfmpegContext.c @@ -226,21 +226,24 @@ int FFH264CheckCompatibility(int nWidth, int nHeight, struct AVCodecContext* pAV if (supportLevel51 == 1)
{
// 11 refs as absolute max, but for Nvidia(Vista, HD) - 16
- if(IsVista())
+ if(PCIV_nVidia)
{
- if(nWidth>1279)
+ if(IsVista())
{
- if (cur_sps->ref_frame_count > 16)
- return 2; // Too much ref frames
- }
- else
- {
- if (cur_sps->ref_frame_count > 11)
+ if(nWidth>1279)
+ {
+ if (cur_sps->ref_frame_count > 16)
+ return 2; // Too much ref frames
+ }
+ else
+ {
+ if (cur_sps->ref_frame_count > 11)
+ return 2; // Too much ref frames
+ }
+ } else {
+ if (cur_sps->ref_frame_count > 14)
return 2; // Too much ref frames
}
- } else {
- if (cur_sps->ref_frame_count > 14)
- return 2; // Too much ref frames
}
}
else
diff --git a/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h b/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h index 444a0268d..63c8bf54f 100644 --- a/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h +++ b/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h @@ -71,4 +71,7 @@ interface IMPCVideoDecFilter : public IUnknown STDMETHOD(SetDXVACheckCompatibility(int nValue)) = 0;
STDMETHOD_(int, GetDXVACheckCompatibility()) = 0;
+
+ STDMETHOD(SetDXVA_SD(int nValue)) = 0;
+ STDMETHOD_(int, GetDXVA_SD()) = 0;
};
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp index 7e0ed8612..db188d44e 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp @@ -611,6 +611,7 @@ CMPCVideoDecFilter::CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr) m_nARMode = 1;
m_nDXVACheckCompatibility = 0;
+ m_nDXVA_SD = 0;
m_nPosB = 1;
m_sar.SetSize(1,1);
@@ -625,6 +626,7 @@ CMPCVideoDecFilter::CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr) if(ERROR_SUCCESS == key.QueryDWORDValue(_T("ActiveCodecs"), dw)) m_nActiveCodecs = dw;
if(ERROR_SUCCESS == key.QueryDWORDValue(_T("ARMode"), dw)) m_nARMode = dw;
if(ERROR_SUCCESS == key.QueryDWORDValue(_T("DXVACheckCompatibility"), dw)) m_nDXVACheckCompatibility = dw;
+ if(ERROR_SUCCESS == key.QueryDWORDValue(_T("DisableDXVA_SD"), dw)) m_nDXVA_SD = dw;
}
if(m_nDXVACheckCompatibility>3) m_nDXVACheckCompatibility = 0;
@@ -1108,22 +1110,29 @@ HRESULT CMPCVideoDecFilter::SetMediaType(PIN_DIRECTION direction,const CMediaTyp switch (ffCodecs[m_nCodecNb].nFFCodec)
{
case CODEC_ID_H264 :
- int nCompat;
- nCompat = FFH264CheckCompatibility (PictWidthRounded(), PictHeightRounded(), m_pAVCtx, (BYTE*)m_pAVCtx->extradata, m_pAVCtx->extradata_size, m_nPCIVendor, m_VideoDriverVersion);
-
- if(nCompat>0)
+ if((m_nDXVA_SD) && (PictWidthRounded() < 1280))
{
- switch(m_nDXVACheckCompatibility)
+ m_bDXVACompatible = false;
+ }
+ else
+ {
+ int nCompat;
+ nCompat = FFH264CheckCompatibility (PictWidthRounded(), PictHeightRounded(), m_pAVCtx, (BYTE*)m_pAVCtx->extradata, m_pAVCtx->extradata_size, m_nPCIVendor, m_VideoDriverVersion);
+
+ if(nCompat>0)
{
- case 0 :
- m_bDXVACompatible = false;
- break;
- case 1 :
- if(nCompat == 2) m_bDXVACompatible = false;
- break;
- case 2 :
- if(nCompat == 1) m_bDXVACompatible = false;
- break;
+ switch(m_nDXVACheckCompatibility)
+ {
+ case 0 :
+ m_bDXVACompatible = false;
+ break;
+ case 1 :
+ if(nCompat == 2) m_bDXVACompatible = false;
+ break;
+ case 2 :
+ if(nCompat == 1) m_bDXVACompatible = false;
+ break;
+ }
}
}
break;
@@ -2321,6 +2330,7 @@ STDMETHODIMP CMPCVideoDecFilter::Apply() key.SetDWORDValue(_T("ActiveCodecs"), m_nActiveCodecs);
key.SetDWORDValue(_T("ARMode"), m_nARMode);
key.SetDWORDValue(_T("DXVACheckCompatibility"), m_nDXVACheckCompatibility);
+ key.SetDWORDValue(_T("DisableDXVA_SD"), m_nDXVA_SD);
}
return S_OK;
}
@@ -2414,3 +2424,15 @@ STDMETHODIMP_(int) CMPCVideoDecFilter::GetDXVACheckCompatibility() CAutoLock cAutoLock(&m_csProps);
return m_nDXVACheckCompatibility;
}
+STDMETHODIMP CMPCVideoDecFilter::SetDXVA_SD(int nValue)
+{
+ CAutoLock cAutoLock(&m_csProps);
+ m_nDXVA_SD = nValue;
+ return S_OK;
+}
+STDMETHODIMP_(int) CMPCVideoDecFilter::GetDXVA_SD()
+{
+ CAutoLock cAutoLock(&m_csProps);
+ return m_nDXVA_SD;
+}
+
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h index 7e8febb37..139487571 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h @@ -92,6 +92,7 @@ protected: int m_nActiveCodecs;
int m_nARMode;
int m_nDXVACheckCompatibility;
+ int m_nDXVA_SD;
// === FFMpeg variables
AVCodec* m_pAVCodec;
@@ -228,6 +229,8 @@ public: STDMETHOD(SetDXVACheckCompatibility(int nValue));
STDMETHOD_(int, GetDXVACheckCompatibility());
+ STDMETHOD(SetDXVA_SD(int nValue));
+ STDMETHOD_(int, GetDXVA_SD());
// === DXVA common functions
BOOL IsSupportedDecoderConfig(const D3DFORMAT nD3DFormat, const DXVA2_ConfigPictureDecode& config, bool& bIsPrefered);
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.rc b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.rc index 1df5c35b1..e1f690060 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.rc +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.rc @@ -130,8 +130,8 @@ BEGIN IDS_VDF_ERR_VERYAGGRESSIVE "Very aggressive"
IDS_VDF_IDCT_ALGO "IDCT Algorithm"
IDS_VDF_IDCT_AUTO "Auto"
- IDS_VDF_IDCT_LIBMPEG2 "libmpeg2 MMX"
- IDS_VDF_AR_MODE "Read AR from stream"
+ IDS_VDF_IDCT_LIBMPEG2 "libmpeg2 MMX"
+ IDS_VDF_AR_MODE "Read AR from stream"
END
STRINGTABLE
@@ -141,15 +141,16 @@ BEGIN IDS_VDF_IDCT_SIMPLE "Simple"
IDS_VDF_DXVA_SETTING "DXVA settings"
IDS_VDF_DXVA_MODE "DXVA Mode"
+ IDS_VDF_DXVA_SD "Disable DXVA for SD"
END
STRINGTABLE
BEGIN
- IDS_VDF_DXVACOMPATIBILITY "DXVA(H.264) Compatibility check"
- IDS_VDF_DXVA_FULLCHECK "Full check"
- IDS_VDF_DXVA_REFONLY "Ref frames only"
- IDS_VDF_DXVA_SARONLY "SAR only"
- IDS_VDF_DXVA_NOCHECK "No check"
+ IDS_VDF_DXVACOMPATIBILITY "DXVA(H.264) Compatibility check"
+ IDS_VDF_DXVA_FULLCHECK "Full check"
+ IDS_VDF_DXVA_REFONLY "Ref frames only"
+ IDS_VDF_DXVA_SARONLY "SAR only"
+ IDS_VDF_DXVA_NOCHECK "No check"
END
#endif // French (France) resources
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp index b9fbc40e4..35cbddebd 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp @@ -148,7 +148,7 @@ bool CMPCVideoDecSettingsWnd::OnActivate() nPosY = 170;
#endif /* INCLUDE_MPC_VIDEO_DECODER */
- m_grpDXVA.Create (ResStr (IDS_VDF_DXVA_SETTING), WS_VISIBLE|WS_CHILD | BS_GROUPBOX, CRect (10, nPosY, 330, nPosY+110), this, IDC_STATIC);
+ m_grpDXVA.Create (ResStr (IDS_VDF_DXVA_SETTING), WS_VISIBLE|WS_CHILD | BS_GROUPBOX, CRect (10, nPosY, 330, nPosY+135), this, IDC_STATIC);
// DXVA Compatibility check
nPosY += VERTICAL_SPACING;
@@ -159,6 +159,10 @@ bool CMPCVideoDecSettingsWnd::OnActivate() m_cbDXVACompatibilityCheck.AddString(ResStr (IDS_VDF_DXVA_SARONLY));
m_cbDXVACompatibilityCheck.AddString(ResStr (IDS_VDF_DXVA_NOCHECK));
+ nPosY += VERTICAL_SPACING;
+ m_cbDXVA_SD.Create (ResStr (IDS_VDF_DXVA_SD), WS_VISIBLE|WS_CHILD|BS_AUTOCHECKBOX|BS_LEFTTEXT, CRect (LEFT_SPACING, nPosY, 315, nPosY+15), this, IDC_PP_DXVA_SD);
+ m_cbDXVA_SD.SetCheck(FALSE);
+
// DXVA mode
nPosY += VERTICAL_SPACING;
m_txtDXVAMode.Create (ResStr (IDS_VDF_DXVA_MODE), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING, nPosY, 120, nPosY+15), this, IDC_STATIC);
@@ -200,6 +204,7 @@ bool CMPCVideoDecSettingsWnd::OnActivate() #endif /* INCLUDE_MPC_VIDEO_DECODER */
m_cbDXVACompatibilityCheck.SetCurSel(m_pMDF->GetDXVACheckCompatibility());
+ m_cbDXVA_SD.SetCheck(m_pMDF->GetDXVA_SD());
}
return true;
@@ -228,6 +233,8 @@ bool CMPCVideoDecSettingsWnd::OnApply() m_pMDF->SetDXVACheckCompatibility(m_cbDXVACompatibilityCheck.GetCurSel());
+ m_pMDF->SetDXVA_SD(m_cbDXVA_SD.GetCheck());
+
m_pMDF->Apply();
}
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h index 01979df3f..5cac8534b 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h @@ -52,6 +52,8 @@ class CMPCVideoDecSettingsWnd : public CInternalPropertyPageWnd CStatic m_txtDXVACompatibilityCheck;
CComboBox m_cbDXVACompatibilityCheck;
+ CButton m_cbDXVA_SD;
+
enum
{
IDC_PP_THREAD_NUMBER = 10000,
@@ -59,7 +61,8 @@ class CMPCVideoDecSettingsWnd : public CInternalPropertyPageWnd IDC_PP_DISCARD_MODE,
IDC_PP_ERROR_RECOGNITION,
IDC_PP_AR,
- IDC_PP_DXVA_CHECK
+ IDC_PP_DXVA_CHECK,
+ IDC_PP_DXVA_SD
};
public:
@@ -72,7 +75,7 @@ public: bool OnApply();
static LPCTSTR GetWindowTitle() {return _T("Settings");}
- static CSize GetWindowSize() {return CSize(320, 300);}
+ static CSize GetWindowSize() {return CSize(320, 325);}
DECLARE_MESSAGE_MAP()
};
diff --git a/src/filters/transform/MPCVideoDec/resource.h b/src/filters/transform/MPCVideoDec/resource.h index 0965ded12..f0d85b8e5 100644 --- a/src/filters/transform/MPCVideoDec/resource.h +++ b/src/filters/transform/MPCVideoDec/resource.h @@ -27,12 +27,14 @@ #define IDS_VDF_VIDEOCARD 33194
#define IDS_VDF_AR_MODE 33211
-#define IDS_VDF_DXVACOMPATIBILITY 41100
-#define IDS_VDF_DXVA_FULLCHECK 41101
+#define IDS_VDF_DXVACOMPATIBILITY 41100
+#define IDS_VDF_DXVA_FULLCHECK 41101
#define IDS_VDF_DXVA_REFONLY 41102
#define IDS_VDF_DXVA_SARONLY 41103
#define IDS_VDF_DXVA_NOCHECK 41104
+#define IDS_VDF_DXVA_SD 41106
+
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
|