diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-01-19 14:53:52 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-01-19 20:08:34 +0400 |
commit | 275c1330e4bc210d36909e71fe52600c011c1f2c (patch) | |
tree | f41bcbe3b8b68c368dae814e500d2ad001bb0cba /src/filters | |
parent | 371fa2107b41cd4a6014efab7acab1f93a6d85d1 (diff) |
MPC Video Decoder: Fix low merit internal filter.
Diffstat (limited to 'src/filters')
-rw-r--r-- | src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp | 15 | ||||
-rw-r--r-- | src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h | 9 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp index 068896533..c9c9812ea 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp @@ -502,9 +502,6 @@ const AMOVIESETUP_MEDIATYPE CMPCVideoDecFilter::sudPinTypesIn[] = { const int CMPCVideoDecFilter::sudPinTypesInCount = _countof(CMPCVideoDecFilter::sudPinTypesIn);
-const bool* CMPCVideoDecFilter::FFmpegFilters = NULL;
-const bool* CMPCVideoDecFilter::DXVAFilters = NULL;
-
const AMOVIESETUP_MEDIATYPE CMPCVideoDecFilter::sudPinTypesOut[] = {
{&MEDIATYPE_Video, &MEDIASUBTYPE_NV12},
{&MEDIATYPE_Video, &MEDIASUBTYPE_NV24}
@@ -778,36 +775,36 @@ int CMPCVideoDecFilter::FindCodec(const CMediaType* mtIn) switch (ffCodecs[i].nFFCodec) {
case AV_CODEC_ID_H264:
#if INTERNAL_DECODER_H264_DXVA
- m_bUseDXVA = DXVAFilters && DXVAFilters[TRA_DXVA_H264];
+ m_bUseDXVA = m_DXVAFilters && m_DXVAFilters[TRA_DXVA_H264];
#else
m_bUseDXVA = false;
#endif
#if INTERNAL_DECODER_H264
- m_bUseFFmpeg = FFmpegFilters && FFmpegFilters[FFM_H264];
+ m_bUseFFmpeg = m_FFmpegFilters && m_FFmpegFilters[FFM_H264];
#else
m_bUseFFmpeg = false;
#endif
break;
case AV_CODEC_ID_VC1:
#if INTERNAL_DECODER_VC1_DXVA
- m_bUseDXVA = DXVAFilters && DXVAFilters[TRA_DXVA_VC1];
+ m_bUseDXVA = m_DXVAFilters && m_DXVAFilters[TRA_DXVA_VC1];
#else
m_bUseDXVA = false;
#endif
#if INTERNAL_DECODER_VC1
- m_bUseFFmpeg = FFmpegFilters && FFmpegFilters[FFM_VC1];
+ m_bUseFFmpeg = m_FFmpegFilters && m_FFmpegFilters[FFM_VC1];
#else
m_bUseFFmpeg = false;
#endif
break;
case AV_CODEC_ID_WMV3:
#if INTERNAL_DECODER_WMV3_DXVA
- m_bUseDXVA = DXVAFilters && DXVAFilters[TRA_DXVA_WMV3];
+ m_bUseDXVA = m_DXVAFilters && m_DXVAFilters[TRA_DXVA_WMV3];
#else
m_bUseDXVA = false;
#endif
#if INTERNAL_DECODER_WMV
- m_bUseFFmpeg = FFmpegFilters && FFmpegFilters[FFM_WMV];
+ m_bUseFFmpeg = m_FFmpegFilters && m_FFmpegFilters[FFM_WMV];
#else
m_bUseFFmpeg = false;
#endif
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h index 0e0ce1790..fe6a823f3 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h @@ -96,6 +96,9 @@ protected: CCpuId* m_pCpuId;
CCritSec m_csProps;
+ CAutoPtr<bool> m_DXVAFilters;
+ CAutoPtr<bool> m_FFmpegFilters;
+
// === Persistants parameters (registry)
int m_nThreadNumber;
int m_nDiscardMode;
@@ -207,9 +210,6 @@ public: const static AMOVIESETUP_MEDIATYPE sudPinTypesOut[];
const static int sudPinTypesOutCount;
- static const bool* FFmpegFilters;
- static const bool* DXVAFilters;
-
CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr);
virtual ~CMPCVideoDecFilter();
@@ -222,6 +222,9 @@ public: void UpdateFrameTime(REFERENCE_TIME& rtStart, REFERENCE_TIME& rtStop, bool b_repeat_pict = false);
CString GetFileExtension();
+ void SetDXVAFilters(CAutoPtr<bool> DXVAFilters) { m_DXVAFilters = DXVAFilters; };
+ void SetFFmpegFilters(CAutoPtr<bool> FFmpegFilters) { m_FFmpegFilters = FFmpegFilters; };
+
// === Overriden DirectShow functions
HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType* pmt);
HRESULT CheckInputType(const CMediaType* mtIn);
|