diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-06 14:51:13 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-07-06 14:51:13 +0400 |
commit | 828fbbe1301bf1d9002d2d7d98bcc0ca1ec0e7b4 (patch) | |
tree | 979833818d32ef7b60ab25d332fbbfbdb355a79f /src/filters/transform/MPCVideoDec | |
parent | 3b108c46fd6ae1bd9e9bc12dc104eafd992589df (diff) |
VSFilter, MPCVideoDec: astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2108 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec')
29 files changed, 486 insertions, 416 deletions
diff --git a/src/filters/transform/MPCVideoDec/CpuId.cpp b/src/filters/transform/MPCVideoDec/CpuId.cpp index 8b09ebe04..4473d34bc 100644 --- a/src/filters/transform/MPCVideoDec/CpuId.cpp +++ b/src/filters/transform/MPCVideoDec/CpuId.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
diff --git a/src/filters/transform/MPCVideoDec/CpuId.h b/src/filters/transform/MPCVideoDec/CpuId.h index d8e356f49..15a280032 100644 --- a/src/filters/transform/MPCVideoDec/CpuId.h +++ b/src/filters/transform/MPCVideoDec/CpuId.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -48,8 +48,12 @@ public: CCpuId();
- int GetFeatures() const { return m_nCPUFeatures; };
- PROCESSOR_TYPE GetType() const { return m_nType; };
+ int GetFeatures() const {
+ return m_nCPUFeatures;
+ };
+ PROCESSOR_TYPE GetType() const {
+ return m_nType;
+ };
int GetProcessorNumber();
private :
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoder.cpp b/src/filters/transform/MPCVideoDec/DXVADecoder.cpp index fa359f275..7d85b990e 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoder.cpp +++ b/src/filters/transform/MPCVideoDec/DXVADecoder.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -32,7 +32,7 @@ extern "C"
{
- #include "FfmpegContext.h"
+#include "FfmpegContext.h"
}
#define MAX_RETRY_ON_PENDING 50
@@ -58,7 +58,7 @@ CDXVADecoder::CDXVADecoder (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* p }
-CDXVADecoder::CDXVADecoder (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config)
+CDXVADecoder::CDXVADecoder (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config)
{
m_nEngine = ENGINE_DXVA2;
m_pDirectXVideoDec = pDirectXVideoDec;
@@ -178,7 +178,7 @@ HRESULT CDXVADecoder::ConfigureDXVA1() AMVAUncompDataInfo DataInfo;
DWORD dwNum = COMP_BUFFER_COUNT;
DataInfo.dwUncompWidth = m_pFilter->PictWidthRounded();
- DataInfo.dwUncompHeight = m_pFilter->PictHeightRounded();
+ DataInfo.dwUncompHeight = m_pFilter->PictHeightRounded();
memcpy (&DataInfo.ddUncompPixelFormat, m_pFilter->GetPixelFormat(), sizeof (DDPIXELFORMAT));
hr = m_pAMVideoAccelerator->GetCompBufferInfo (m_pFilter->GetDXVADecoderGuid(), &DataInfo, &dwNum, m_ComBufferInfo);
}
@@ -447,18 +447,18 @@ HRESULT CDXVADecoder::BeginFrame(int nSurfaceIndex, IMediaSample* pSampleToDeliv break;
case ENGINE_DXVA2 :
+ {
+ CComQIPtr<IMFGetService> pSampleService;
+ CComPtr<IDirect3DSurface9> pDecoderRenderTarget;
+ pSampleService = pSampleToDeliver;
+ if (pSampleService)
{
- CComQIPtr<IMFGetService> pSampleService;
- CComPtr<IDirect3DSurface9> pDecoderRenderTarget;
- pSampleService = pSampleToDeliver;
- if (pSampleService)
- {
- hr = pSampleService->GetService (MR_BUFFER_SERVICE, __uuidof(IDirect3DSurface9), (void**) &pDecoderRenderTarget);
- if (SUCCEEDED (hr))
- DO_DXVA_PENDING_LOOP (m_pDirectXVideoDec->BeginFrame(pDecoderRenderTarget, NULL));
- }
+ hr = pSampleService->GetService (MR_BUFFER_SERVICE, __uuidof(IDirect3DSurface9), (void**) &pDecoderRenderTarget);
+ if (SUCCEEDED (hr))
+ DO_DXVA_PENDING_LOOP (m_pDirectXVideoDec->BeginFrame(pDecoderRenderTarget, NULL));
}
- break;
+ }
+ break;
default :
ASSERT (FALSE);
break;
@@ -502,9 +502,9 @@ HRESULT CDXVADecoder::EndFrame(int nSurfaceIndex) }
// === Picture store functions
-bool CDXVADecoder::AddToStore (int nSurfaceIndex, IMediaSample* pSample, bool bRefPicture,
- REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, bool bIsField,
- FF_FIELD_TYPE nFieldType, FF_SLICE_TYPE nSliceType, int nCodecSpecific)
+bool CDXVADecoder::AddToStore (int nSurfaceIndex, IMediaSample* pSample, bool bRefPicture,
+ REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, bool bIsField,
+ FF_FIELD_TYPE nFieldType, FF_SLICE_TYPE nSliceType, int nCodecSpecific)
{
if (bIsField && (m_nFieldSurface == -1))
{
@@ -556,7 +556,7 @@ void CDXVADecoder::RemoveRefFrame (int nSurfaceIndex) m_pPictureStore[nSurfaceIndex].bRefPicture = false;
if (m_pPictureStore[nSurfaceIndex].bDisplayed)
- FreePictureSlot (nSurfaceIndex);
+ FreePictureSlot (nSurfaceIndex);
}
@@ -653,19 +653,19 @@ HRESULT CDXVADecoder::DisplayNextFrame() #if defined(_DEBUG) && 0
static REFERENCE_TIME rtLast = 0;
- TRACE ("Deliver : %10I64d - %10I64d (Dur = %10I64d) {Delta = %10I64d} Ind = %02d Codec=%d Ref=%d\n",
- m_pPictureStore[nPicIndex].rtStart,
- m_pPictureStore[nPicIndex].rtStop,
- m_pPictureStore[nPicIndex].rtStop - m_pPictureStore[nPicIndex].rtStart,
- m_pPictureStore[nPicIndex].rtStart - rtLast, nPicIndex,
- m_pPictureStore[nPicIndex].nCodecSpecific,
- m_pPictureStore[nPicIndex].bRefPicture);
+ TRACE ("Deliver : %10I64d - %10I64d (Dur = %10I64d) {Delta = %10I64d} Ind = %02d Codec=%d Ref=%d\n",
+ m_pPictureStore[nPicIndex].rtStart,
+ m_pPictureStore[nPicIndex].rtStop,
+ m_pPictureStore[nPicIndex].rtStop - m_pPictureStore[nPicIndex].rtStart,
+ m_pPictureStore[nPicIndex].rtStart - rtLast, nPicIndex,
+ m_pPictureStore[nPicIndex].nCodecSpecific,
+ m_pPictureStore[nPicIndex].bRefPicture);
rtLast = m_pPictureStore[nPicIndex].rtStart;
#endif
}
m_pPictureStore[nPicIndex].bDisplayed = true;
- if (!m_pPictureStore[nPicIndex].bRefPicture)
+ if (!m_pPictureStore[nPicIndex].bRefPicture)
FreePictureSlot (nPicIndex);
}
@@ -696,14 +696,14 @@ HRESULT CDXVADecoder::GetFreeSurfaceIndex(int& nSurfaceIndex, IMediaSample** ppS nPos = i;
}
}
-
+
if (nPos != -1)
{
nSurfaceIndex = nPos;
return S_OK;
}
- // Ho ho...
+ // Ho ho...
ASSERT (FALSE);
Flush();
break;
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoder.h b/src/filters/transform/MPCVideoDec/DXVADecoder.h index c919d8618..c06f3bbd6 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoder.h +++ b/src/filters/transform/MPCVideoDec/DXVADecoder.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -81,11 +81,17 @@ class CDXVADecoder {
public :
// === Public functions
- virtual ~CDXVADecoder();
- DXVAMode GetMode() const { return m_nMode; };
- DXVA_ENGINE GetEngine() const { return m_nEngine; };
+ virtual ~CDXVADecoder();
+ DXVAMode GetMode() const {
+ return m_nMode;
+ };
+ DXVA_ENGINE GetEngine() const {
+ return m_nEngine;
+ };
void AllocExecuteParams (int nSize);
- void SetDirectXVideoDec (IDirectXVideoDecoder* pDirectXVideoDec) { m_pDirectXVideoDec = pDirectXVideoDec; };
+ void SetDirectXVideoDec (IDirectXVideoDecoder* pDirectXVideoDec) {
+ m_pDirectXVideoDec = pDirectXVideoDec;
+ };
virtual HRESULT DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop) = NULL;
virtual void SetExtraData (BYTE* pDataIn, UINT nSize);
@@ -120,8 +126,12 @@ protected : HRESULT QueryStatus(PVOID LPDXVAStatus, UINT nSize);
BYTE GetConfigIntraResidUnsigned();
BYTE GetConfigResidDiffAccelerator();
- DXVA_ConfigPictureDecode* GetDXVA1Config() { return &m_DXVA1Config; };
- DXVA2_ConfigPictureDecode* GetDXVA2Config() { return &m_DXVA2Config; };
+ DXVA_ConfigPictureDecode* GetDXVA1Config() {
+ return &m_DXVA1Config;
+ };
+ DXVA2_ConfigPictureDecode* GetDXVA2Config() {
+ return &m_DXVA2Config;
+ };
// === Picture store functions
bool AddToStore (int nSurfaceIndex, IMediaSample* pSample, bool bRefPicture, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, bool bIsField, FF_FIELD_TYPE nFieldType, FF_SLICE_TYPE nSliceType, int nCodecSpecific);
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderH264.cpp b/src/filters/transform/MPCVideoDec/DXVADecoderH264.cpp index c219a86ae..0599a52a1 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderH264.cpp +++ b/src/filters/transform/MPCVideoDec/DXVADecoderH264.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -30,19 +30,19 @@ extern "C"
{
- #include "FfmpegContext.h"
+#include "FfmpegContext.h"
}
CDXVADecoderH264::CDXVADecoderH264 (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* pAMVideoAccelerator, DXVAMode nMode, int nPicEntryNumber)
- : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
+ : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
{
m_bUseLongSlice = (GetDXVA1Config()->bConfigBitstreamRaw != 2);
Init();
}
CDXVADecoderH264::CDXVADecoderH264 (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config)
- : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
+ : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
{
m_bUseLongSlice = (m_pFilter->GetDXVA2Config()->ConfigBitstreamRaw != 2);
Init();
@@ -60,7 +60,7 @@ void CDXVADecoderH264::Init() memset (&m_pSliceShort, 0, sizeof (DXVA_Slice_H264_Short)*MAX_SLICES);
m_DXVAPicParams.MbsConsecutiveFlag = 1;
- if(m_pFilter->GetPCIVendor() == PCIV_Intel)
+ if(m_pFilter->GetPCIVendor() == PCIV_Intel)
m_DXVAPicParams.Reserved16Bits = 0x534c;
else
m_DXVAPicParams.Reserved16Bits = 0;
@@ -113,7 +113,8 @@ void CDXVADecoderH264::CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSi case NALU_TYPE_SLICE:
case NALU_TYPE_IDR:
// For AVC1, put startcode 0x000001
- pDXVABuffer[0]=pDXVABuffer[1]=0;pDXVABuffer[2]=1;
+ pDXVABuffer[0]=pDXVABuffer[1]=0;
+ pDXVABuffer[2]=1;
// Copy NALU
memcpy (pDXVABuffer+3, Nalu.GetDataBuffer(), Nalu.GetDataLength());
@@ -145,7 +146,8 @@ void CDXVADecoderH264::CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSi case NALU_TYPE_SLICE:
case NALU_TYPE_IDR:
// For AVC1, put startcode 0x000001
- pDXVABuffer[0]=pDXVABuffer[1]=0;pDXVABuffer[2]=1;
+ pDXVABuffer[0]=pDXVABuffer[1]=0;
+ pDXVABuffer[2]=1;
// Copy NALU
memcpy (pDXVABuffer+3, Nalu.GetDataBuffer(), Nalu.GetDataLength());
@@ -197,8 +199,8 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME int nOutPOC;
REFERENCE_TIME rtOutStart;
- Nalu.SetBuffer (pDataIn, nSize, m_nNALLength);
- FFH264DecodeBuffer (m_pFilter->GetAVCtx(), pDataIn, nSize, &nFramePOC, &nOutPOC, &rtOutStart);
+ Nalu.SetBuffer (pDataIn, nSize, m_nNALLength);
+ FFH264DecodeBuffer (m_pFilter->GetAVCtx(), pDataIn, nSize, &nFramePOC, &nOutPOC, &rtOutStart);
while (Nalu.ReadNext())
{
@@ -206,20 +208,20 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME {
case NALU_TYPE_SLICE:
case NALU_TYPE_IDR:
- if(m_bUseLongSlice)
- {
- m_pSliceLong[nSlices].BSNALunitDataLocation = nNalOffset;
- m_pSliceLong[nSlices].SliceBytesInBuffer = Nalu.GetDataLength()+3; //.GetRoundedDataLength();
- m_pSliceLong[nSlices].slice_id = nSlices;
- FF264UpdateRefFrameSliceLong(&m_DXVAPicParams, &m_pSliceLong[nSlices], m_pFilter->GetAVCtx());
-
- if (nSlices>0)
- m_pSliceLong[nSlices-1].NumMbsForSlice = m_pSliceLong[nSlices].NumMbsForSlice = m_pSliceLong[nSlices].first_mb_in_slice - m_pSliceLong[nSlices-1].first_mb_in_slice;
- }
- nSlices++;
- nNalOffset += (UINT)(Nalu.GetDataLength() + 3);
- if (nSlices > MAX_SLICES) break;
- break;
+ if(m_bUseLongSlice)
+ {
+ m_pSliceLong[nSlices].BSNALunitDataLocation = nNalOffset;
+ m_pSliceLong[nSlices].SliceBytesInBuffer = Nalu.GetDataLength()+3; //.GetRoundedDataLength();
+ m_pSliceLong[nSlices].slice_id = nSlices;
+ FF264UpdateRefFrameSliceLong(&m_DXVAPicParams, &m_pSliceLong[nSlices], m_pFilter->GetAVCtx());
+
+ if (nSlices>0)
+ m_pSliceLong[nSlices-1].NumMbsForSlice = m_pSliceLong[nSlices].NumMbsForSlice = m_pSliceLong[nSlices].first_mb_in_slice - m_pSliceLong[nSlices-1].first_mb_in_slice;
+ }
+ nSlices++;
+ nNalOffset += (UINT)(Nalu.GetDataLength() + 3);
+ if (nSlices > MAX_SLICES) break;
+ break;
}
}
if (nSlices == 0) return S_FALSE;
@@ -272,13 +274,13 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME #endif
bool bAdded = AddToStore (nSurfaceIndex, pSampleToDeliver, m_DXVAPicParams.RefPicFlag, rtStart, rtStop,
- m_DXVAPicParams.field_pic_flag, (FF_FIELD_TYPE)nFieldType,
+ m_DXVAPicParams.field_pic_flag, (FF_FIELD_TYPE)nFieldType,
(FF_SLICE_TYPE)nSliceType, nFramePOC);
FFH264UpdateRefFramesList (&m_DXVAPicParams, m_pFilter->GetAVCtx());
ClearUnusedRefFrames();
- if (bAdded)
+ if (bAdded)
{
hr = DisplayNextFrame();
@@ -350,11 +352,11 @@ HRESULT CDXVADecoderH264::DisplayStatus() CHECK_HR (hr = CDXVADecoder::QueryStatus(&Status, sizeof(Status)));
- TRACE ("CDXVADecoderH264 : Status for the frame %u : bBufType = %u, bStatus = %u, wNumMbsAffected = %u\n",
- Status.StatusReportFeedbackNumber,
- Status.bBufType,
- Status.bStatus,
- Status.wNumMbsAffected);
+ TRACE ("CDXVADecoderH264 : Status for the frame %u : bBufType = %u, bStatus = %u, wNumMbsAffected = %u\n",
+ Status.StatusReportFeedbackNumber,
+ Status.bBufType,
+ Status.bStatus,
+ Status.wNumMbsAffected);
return hr;
}
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderH264.h b/src/filters/transform/MPCVideoDec/DXVADecoderH264.h index 861fa72b4..97e2980d6 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderH264.h +++ b/src/filters/transform/MPCVideoDec/DXVADecoderH264.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -50,7 +50,7 @@ private: DXVA_PicParams_H264 m_DXVAPicParams;
DXVA_Qmatrix_H264 m_DXVAScalingMatrix;
DXVA_Slice_H264_Short m_pSliceShort[MAX_SLICES];
- DXVA_Slice_H264_Long m_pSliceLong[MAX_SLICES];
+ DXVA_Slice_H264_Long m_pSliceLong[MAX_SLICES];
UINT m_nMaxSlices;
int m_nNALLength;
bool m_bUseLongSlice;
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.cpp b/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.cpp index 44d3b73f6..45407755a 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.cpp +++ b/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -26,26 +26,26 @@ extern "C"
{
- #include "FfmpegContext.h"
+#include "FfmpegContext.h"
}
#if 0
- #define TRACE_MPEG2 TRACE
+#define TRACE_MPEG2 TRACE
#else
- #define TRACE_MPEG2(...)
+#define TRACE_MPEG2(...)
#endif
CDXVADecoderMpeg2::CDXVADecoderMpeg2 (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* pAMVideoAccelerator, DXVAMode nMode, int nPicEntryNumber)
- : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
+ : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
{
Init();
}
CDXVADecoderMpeg2::CDXVADecoderMpeg2 (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config)
- : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
+ : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
{
Init();
}
@@ -86,7 +86,7 @@ HRESULT CDXVADecoderMpeg2::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIM int nFieldType;
int nSliceType;
- FFMpeg2DecodeFrame (&m_PictureParams, &m_QMatrixData, m_SliceInfo, &m_nSliceCount, m_pFilter->GetAVCtx(),
+ FFMpeg2DecodeFrame (&m_PictureParams, &m_QMatrixData, m_SliceInfo, &m_nSliceCount, m_pFilter->GetAVCtx(),
m_pFilter->GetFrame(), &m_nNextCodecIndex, &nFieldType, &nSliceType, pDataIn, nSize);
// Wait I frame after a flush
@@ -120,7 +120,7 @@ HRESULT CDXVADecoderMpeg2::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIM CHECK_HR (Execute());
CHECK_HR (EndFrame(nSurfaceIndex));
- AddToStore (nSurfaceIndex, pSampleToDeliver, (m_PictureParams.bPicBackwardPrediction != 1), rtStart, rtStop,
+ AddToStore (nSurfaceIndex, pSampleToDeliver, (m_PictureParams.bPicBackwardPrediction != 1), rtStart, rtStop,
false,(FF_FIELD_TYPE)nFieldType, (FF_SLICE_TYPE)nSliceType, FFGetCodedPicture(m_pFilter->GetAVCtx()));
m_bFlushed = false;
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.h b/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.h index d87cea541..4bee4c74d 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.h +++ b/src/filters/transform/MPCVideoDec/DXVADecoderMpeg2.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -46,7 +46,7 @@ protected : virtual int FindOldestFrame();
private:
DXVA_PictureParameters m_PictureParams;
- DXVA_QmatrixData m_QMatrixData;
+ DXVA_QmatrixData m_QMatrixData;
WORD m_wRefPictureIndex[2];
DXVA_SliceInfo m_SliceInfo[MAX_SLICE];
int m_nSliceCount;
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderVC1.cpp b/src/filters/transform/MPCVideoDec/DXVADecoderVC1.cpp index a8a32a074..2d55d0e84 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderVC1.cpp +++ b/src/filters/transform/MPCVideoDec/DXVADecoderVC1.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -26,13 +26,13 @@ extern "C"
{
- #include "FfmpegContext.h"
+#include "FfmpegContext.h"
}
#if 0
- #define TRACE_VC1 TRACE
+#define TRACE_VC1 TRACE
#else
- #define TRACE_VC1(...)
+#define TRACE_VC1(...)
#endif
@@ -45,14 +45,14 @@ inline void SwapRT(REFERENCE_TIME& rtFirst, REFERENCE_TIME& rtSecond) CDXVADecoderVC1::CDXVADecoderVC1 (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* pAMVideoAccelerator, DXVAMode nMode, int nPicEntryNumber)
- : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
+ : CDXVADecoder (pFilter, pAMVideoAccelerator, nMode, nPicEntryNumber)
{
Init();
}
CDXVADecoderVC1::CDXVADecoderVC1 (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config)
- : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
+ : CDXVADecoder (pFilter, pDirectXVideoDec, nMode, nPicEntryNumber, pDXVA2Config)
{
Init();
}
@@ -174,7 +174,7 @@ HRESULT CDXVADecoderVC1::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME }
}
- AddToStore (nSurfaceIndex, pSampleToDeliver, (m_PictureParams.bPicBackwardPrediction != 1), rtStart, rtStop,
+ AddToStore (nSurfaceIndex, pSampleToDeliver, (m_PictureParams.bPicBackwardPrediction != 1), rtStart, rtStop,
false,(FF_FIELD_TYPE)nFieldType, (FF_SLICE_TYPE)nSliceType, 0);
m_bFlushed = false;
@@ -260,7 +260,9 @@ void CDXVADecoderVC1::CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSiz if ( (*((DWORD*)pBuffer) & 0x00FFFFFF) != 0x00010000)
{
// Some splitter have remove startcode (Haali)
- pDXVABuffer[0]=pDXVABuffer[1]=0; pDXVABuffer[2]=1; pDXVABuffer[3]=0x0D;
+ pDXVABuffer[0]=pDXVABuffer[1]=0;
+ pDXVABuffer[2]=1;
+ pDXVABuffer[3]=0x0D;
pDXVABuffer +=4;
// Copy bitstream buffer, with zero padding (buffer is rounded to multiple of 128)
memcpy (pDXVABuffer, (BYTE*)pBuffer, nSize);
@@ -279,7 +281,7 @@ void CDXVADecoderVC1::CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSiz nSize = nPacketSize;
}
}
-
+
nDummy = 128 - (nSize %128);
pDXVABuffer += nSize;
@@ -313,11 +315,11 @@ HRESULT CDXVADecoderVC1::DisplayStatus() {
Status.StatusReportFeedbackNumber = 0x00FF & Status.StatusReportFeedbackNumber;
- TRACE_VC1 ("CDXVADecoderVC1 : Status for the frame %u : bBufType = %u, bStatus = %u, wNumMbsAffected = %u\n",
- Status.StatusReportFeedbackNumber,
- Status.bBufType,
- Status.bStatus,
- Status.wNumMbsAffected);
+ TRACE_VC1 ("CDXVADecoderVC1 : Status for the frame %u : bBufType = %u, bStatus = %u, wNumMbsAffected = %u\n",
+ Status.StatusReportFeedbackNumber,
+ Status.bBufType,
+ Status.bStatus,
+ Status.wNumMbsAffected);
}
return hr;
diff --git a/src/filters/transform/MPCVideoDec/DXVADecoderVC1.h b/src/filters/transform/MPCVideoDec/DXVADecoderVC1.h index 7bd953892..d08a6ffea 100644 --- a/src/filters/transform/MPCVideoDec/DXVADecoderVC1.h +++ b/src/filters/transform/MPCVideoDec/DXVADecoderVC1.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -66,10 +66,10 @@ public: VC1_SCAN_ZIGZAG = 0,
VC1_SCAN_ALTERNATE_VERTICAL = 1,
VC1_SCAN_ALTERNATE_HORIZONTAL = 2,
- VC1_SCAN_ARBITRARY = 3 // Use when bConfigHostInverseScan = 1
+ VC1_SCAN_ARBITRARY = 3 // Use when bConfigHostInverseScan = 1
} VC1_PIC_SCAN_METHOD;
- typedef enum // Values for bPicDeblockConfined when bConfigBitstreamRaw = 1
+ typedef enum // Values for bPicDeblockConfined when bConfigBitstreamRaw = 1
{
VC1_EXTENDED_DMV = 0x0001,
VC1_PSF = 0x0002,
@@ -81,7 +81,7 @@ public: VC1_POSTPROCFLAG = 0x0080
} VC1_DEBLOCK_CONFINED;
- typedef enum // Values for bPicSpatialResid8
+ typedef enum // Values for bPicSpatialResid8
{
VC1_VSTRANSFORM = 0x0001,
VC1_DQUANT = 0x0002,
@@ -105,8 +105,8 @@ private: REFERENCE_TIME m_rtStopDelayed;
// Private functions
- void Init();
- HRESULT DisplayStatus();
- BYTE* FindNextStartCode(BYTE* pBuffer, UINT nSize, UINT& nPacketSize);
+ void Init();
+ HRESULT DisplayStatus();
+ BYTE* FindNextStartCode(BYTE* pBuffer, UINT nSize, UINT& nPacketSize);
};
diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.c b/src/filters/transform/MPCVideoDec/FfmpegContext.c index 64ce837f7..f2f902dd4 100644 --- a/src/filters/transform/MPCVideoDec/FfmpegContext.c +++ b/src/filters/transform/MPCVideoDec/FfmpegContext.c @@ -55,16 +55,16 @@ const byte ZZ_SCAN8[64] = // FIXME : remove duplicate declaration with ffmpeg ??
typedef struct Mpeg1Context {
- MpegEncContext mpeg_enc_ctx;
- int mpeg_enc_ctx_allocated; /* true if decoding context allocated */
- int repeat_field; /* true if we must repeat the field */
- AVPanScan pan_scan; /** some temporary storage for the panscan */
- int slice_count;
- int swap_uv;//indicate VCR2
- int save_aspect_info;
- int save_width, save_height, save_progressive_seq;
- AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
- int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
+ MpegEncContext mpeg_enc_ctx;
+ int mpeg_enc_ctx_allocated; /* true if decoding context allocated */
+ int repeat_field; /* true if we must repeat the field */
+ AVPanScan pan_scan; /** some temporary storage for the panscan */
+ int slice_count;
+ int swap_uv;//indicate VCR2
+ int save_aspect_info;
+ int save_width, save_height, save_progressive_seq;
+ AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
+ int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
DXVA_SliceInfo* pSliceInfo;
} Mpeg1Context;
@@ -188,8 +188,12 @@ int FFH264CheckCompatibility(int nWidth, int nHeight, struct AVCodecContext* pAV no_level51_support = 0;
// max ref frames is 16 for HD and 11 otherwise
- if(nWidth >= 1280) { max_ref_frames = 16; }
- else { max_ref_frames = 11; }
+ if(nWidth >= 1280) {
+ max_ref_frames = 16;
+ }
+ else {
+ max_ref_frames = 11;
+ }
}
}
else
@@ -313,26 +317,26 @@ HRESULT FFH264BuildPicParams (DXVA_PicParams_H264* pDXVAPicParams, DXVA_Qmatrix_ *nSliceType = h->slice_type;
if (cur_sps->mb_width==0 || cur_sps->mb_height==0) return VFW_E_INVALID_FILE_FORMAT;
- pDXVAPicParams->wFrameWidthInMbsMinus1 = cur_sps->mb_width - 1; // pic_width_in_mbs_minus1;
- pDXVAPicParams->wFrameHeightInMbsMinus1 = cur_sps->mb_height * (2 - cur_sps->frame_mbs_only_flag) - 1; // pic_height_in_map_units_minus1;
- pDXVAPicParams->num_ref_frames = cur_sps->ref_frame_count; // num_ref_frames;
- pDXVAPicParams->field_pic_flag = field_pic_flag;
- pDXVAPicParams->MbaffFrameFlag = (h->sps.mb_aff && (field_pic_flag==0));
- pDXVAPicParams->residual_colour_transform_flag = cur_sps->residual_color_transform_flag;
- pDXVAPicParams->sp_for_switch_flag = h->sp_for_switch_flag;
- pDXVAPicParams->chroma_format_idc = cur_sps->chroma_format_idc;
- pDXVAPicParams->RefPicFlag = h->ref_pic_flag;
- pDXVAPicParams->constrained_intra_pred_flag = cur_pps->constrained_intra_pred;
- pDXVAPicParams->weighted_pred_flag = cur_pps->weighted_pred;
- pDXVAPicParams->weighted_bipred_idc = cur_pps->weighted_bipred_idc;
- pDXVAPicParams->frame_mbs_only_flag = cur_sps->frame_mbs_only_flag;
- pDXVAPicParams->transform_8x8_mode_flag = cur_pps->transform_8x8_mode;
- pDXVAPicParams->MinLumaBipredSize8x8Flag = h->sps.level_idc >= 31;
- pDXVAPicParams->IntraPicFlag = (h->slice_type == FF_I_TYPE );
-
- pDXVAPicParams->bit_depth_luma_minus8 = cur_sps->bit_depth_luma - 8; // bit_depth_luma_minus8
- pDXVAPicParams->bit_depth_chroma_minus8 = cur_sps->bit_depth_chroma - 8; // bit_depth_chroma_minus8
- // pDXVAPicParams->StatusReportFeedbackNumber = SET IN DecodeFrame;
+ pDXVAPicParams->wFrameWidthInMbsMinus1 = cur_sps->mb_width - 1; // pic_width_in_mbs_minus1;
+ pDXVAPicParams->wFrameHeightInMbsMinus1 = cur_sps->mb_height * (2 - cur_sps->frame_mbs_only_flag) - 1; // pic_height_in_map_units_minus1;
+ pDXVAPicParams->num_ref_frames = cur_sps->ref_frame_count; // num_ref_frames;
+ pDXVAPicParams->field_pic_flag = field_pic_flag;
+ pDXVAPicParams->MbaffFrameFlag = (h->sps.mb_aff && (field_pic_flag==0));
+ pDXVAPicParams->residual_colour_transform_flag = cur_sps->residual_color_transform_flag;
+ pDXVAPicParams->sp_for_switch_flag = h->sp_for_switch_flag;
+ pDXVAPicParams->chroma_format_idc = cur_sps->chroma_format_idc;
+ pDXVAPicParams->RefPicFlag = h->ref_pic_flag;
+ pDXVAPicParams->constrained_intra_pred_flag = cur_pps->constrained_intra_pred;
+ pDXVAPicParams->weighted_pred_flag = cur_pps->weighted_pred;
+ pDXVAPicParams->weighted_bipred_idc = cur_pps->weighted_bipred_idc;
+ pDXVAPicParams->frame_mbs_only_flag = cur_sps->frame_mbs_only_flag;
+ pDXVAPicParams->transform_8x8_mode_flag = cur_pps->transform_8x8_mode;
+ pDXVAPicParams->MinLumaBipredSize8x8Flag = h->sps.level_idc >= 31;
+ pDXVAPicParams->IntraPicFlag = (h->slice_type == FF_I_TYPE );
+
+ pDXVAPicParams->bit_depth_luma_minus8 = cur_sps->bit_depth_luma - 8; // bit_depth_luma_minus8
+ pDXVAPicParams->bit_depth_chroma_minus8 = cur_sps->bit_depth_chroma - 8; // bit_depth_chroma_minus8
+ // pDXVAPicParams->StatusReportFeedbackNumber = SET IN DecodeFrame;
// pDXVAPicParams->CurrFieldOrderCnt = SET IN UpdateRefFramesList;
@@ -340,7 +344,7 @@ HRESULT FFH264BuildPicParams (DXVA_PicParams_H264* pDXVAPicParams, DXVA_Qmatrix_ // pDXVAPicParams->FrameNumList = SET IN UpdateRefFramesList;
// pDXVAPicParams->UsedForReferenceFlags = SET IN UpdateRefFramesList;
// pDXVAPicParams->NonExistingFrameFlags
- pDXVAPicParams->frame_num = h->frame_num;
+ pDXVAPicParams->frame_num = h->frame_num;
// pDXVAPicParams->SliceGroupMap
@@ -500,25 +504,25 @@ void FF264UpdateRefFrameSliceLong(DXVA_PicParams_H264* pDXVAPicParams, DXVA_Slic unsigned int i,j,k;
for(i=0; i<32; i++)
- { pSlice->RefPicList[0][i].AssociatedFlag = 1;
- pSlice->RefPicList[0][i].bPicEntry = 255;
- pSlice->RefPicList[0][i].Index7Bits = 127;
- pSlice->RefPicList[1][i].AssociatedFlag = 1;
- pSlice->RefPicList[1][i].bPicEntry = 255;
- pSlice->RefPicList[1][i].Index7Bits = 127;
+ { pSlice->RefPicList[0][i].AssociatedFlag = 1;
+ pSlice->RefPicList[0][i].bPicEntry = 255;
+ pSlice->RefPicList[0][i].Index7Bits = 127;
+ pSlice->RefPicList[1][i].AssociatedFlag = 1;
+ pSlice->RefPicList[1][i].bPicEntry = 255;
+ pSlice->RefPicList[1][i].Index7Bits = 127;
}
if(h->slice_type != FF_I_TYPE && h->slice_type != FF_SI_TYPE)
{
- if(h->ref_count[0] > 0){
- for(i=0; i < h->ref_count[0]; i++){
+ if(h->ref_count[0] > 0) {
+ for(i=0; i < h->ref_count[0]; i++) {
pSlice->RefPicList[0][i].Index7Bits = FFH264FindRefFrameIndex (h->ref_list[0][i].frame_num, pDXVAPicParams);
pSlice->RefPicList[0][i].AssociatedFlag = 0;
- if((h->s.picture_structure != PICT_FRAME)){
+ if((h->s.picture_structure != PICT_FRAME)) {
if((h->sei_pic_struct == SEI_PIC_STRUCT_BOTTOM_FIELD) ||
(h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM) ||
- (h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP)){
- pSlice->RefPicList[0][i].AssociatedFlag = 1;
+ (h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP)) {
+ pSlice->RefPicList[0][i].AssociatedFlag = 1;
}
}
}
@@ -529,15 +533,15 @@ void FF264UpdateRefFrameSliceLong(DXVA_PicParams_H264* pDXVAPicParams, DXVA_Slic if(h->slice_type == FF_B_TYPE || h->slice_type == FF_S_TYPE || h->slice_type == FF_BI_TYPE)
{
- if(h->ref_count[1] > 0){
- for(i=0; i < h->ref_count[1]; i++){
+ if(h->ref_count[1] > 0) {
+ for(i=0; i < h->ref_count[1]; i++) {
pSlice->RefPicList[1][i].Index7Bits = FFH264FindRefFrameIndex (h->ref_list[1][i].frame_num, pDXVAPicParams);
pSlice->RefPicList[1][i].AssociatedFlag = 0;
- if((h->s.picture_structure != PICT_FRAME)){
+ if((h->s.picture_structure != PICT_FRAME)) {
if((h->sei_pic_struct == SEI_PIC_STRUCT_BOTTOM_FIELD) ||
(h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM) ||
- (h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP)){
- pSlice->RefPicList[1][i].AssociatedFlag = 1;
+ (h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP)) {
+ pSlice->RefPicList[1][i].AssociatedFlag = 1;
}
}
}
@@ -557,7 +561,7 @@ void FF264UpdateRefFrameSliceLong(DXVA_PicParams_H264* pDXVAPicParams, DXVA_Slic h->slice_type ==FF_SP_TYPE || h->slice_type == FF_SI_TYPE)
{
for(i = 0; i < 16; i++)
- pSlice->RefPicList[1][i].bPicEntry = 0xff;
+ pSlice->RefPicList[1][i].bPicEntry = 0xff;
}
}
@@ -671,12 +675,12 @@ HRESULT FFMpeg2DecodeFrame (DXVA_PictureParameters* pPicParams, DXVA_QmatrixData pPicParams->bBPPminus1 = 7; // It is equal to “7” for MPEG-1, MPEG-2, H.261, and H.263
pPicParams->bPicStructure = s->picture_structure;
-// pPicParams->bSecondField;
+ //pPicParams->bSecondField;
pPicParams->bPicIntra = (s->current_picture.pict_type == FF_I_TYPE);
pPicParams->bPicBackwardPrediction = (s->current_picture.pict_type == FF_B_TYPE);
pPicParams->bBidirectionalAveragingMode = 0; // The value “0” indicates MPEG-1 and MPEG-2 rounded averaging (//2),
- // pPicParams->bMVprecisionAndChromaRelation = 0; // Indicates that luminance motion vectors have half-sample precision and that chrominance motion vectors are derived from luminance motion vectors according to the rules in MPEG-2
+ //pPicParams->bMVprecisionAndChromaRelation = 0; // Indicates that luminance motion vectors have half-sample precision and that chrominance motion vectors are derived from luminance motion vectors according to the rules in MPEG-2
pPicParams->bChromaFormat = 0x01; // For MPEG-1, MPEG-2 “Main Profile,” H.261 and H.263 bitstreams, this value shall always be set to ‘01’, indicating "4:2:0" format
// pPicParams->bPicScanFixed = 1; // set in UpdatePicParams
@@ -804,7 +808,7 @@ BOOL FFGetAlternateScan(struct AVCodecContext* pAVCtx) #ifdef _WIN64
// Stupid : MSVC "forgot" to link toupper (referenced in ffmpeg and compile with Gcc) in x64
-// for standalone decoder without this dummy function !
+// for standalone decoder without this dummy function !
void DummyX64Link ()
{
toupper('X');
diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.h b/src/filters/transform/MPCVideoDec/FfmpegContext.h index 879733d4e..e817a8f2d 100644 --- a/src/filters/transform/MPCVideoDec/FfmpegContext.h +++ b/src/filters/transform/MPCVideoDec/FfmpegContext.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
diff --git a/src/filters/transform/MPCVideoDec/H264QuantizationMatrix.h b/src/filters/transform/MPCVideoDec/H264QuantizationMatrix.h index 80dde2a89..3cdf547b1 100644 --- a/src/filters/transform/MPCVideoDec/H264QuantizationMatrix.h +++ b/src/filters/transform/MPCVideoDec/H264QuantizationMatrix.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -42,107 +42,121 @@ const byte ZZ_SCAN8[64] = 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63
};
-const DXVA_Qmatrix_H264 g_QMatrixH264[] =
+const DXVA_Qmatrix_H264 g_QMatrixH264[] =
{
// 1) #flat 16
{
{
// INTRA4X4_LUMA =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 },
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ },
// INTRA4X4_CHROMAU =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 },
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ },
// INTRA4X4_CHROMAV =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 },
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ },
// INTER4X4_LUMA =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 },
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ },
// INTER4X4_CHROMAU =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 },
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ },
// INTER4X4_CHROMAV =
- { 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16,
- 16,16,16,16 }
+ { 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16,
+ 16,16,16,16
+ }
},
{
// INTRA8X8_LUMA =
- { 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16 },
+ { 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16
+ },
// INTER8X8_LUMA =
- { 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16 }
+ { 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16
+ }
}
},
// 2) The JVT Matrix
{
{
// INTRA4X4_LUMA
- { 6,13,20,28,
+ { 6,13,20,28,
13,20,28,32,
20,28,32,37,
- 28,32,37,42 },
+ 28,32,37,42
+ },
// INTRA4X4_CHROMAU
{ 6,13,20,28,
13,20,28,32,
20,28,32,37,
- 28,32,37,42 },
+ 28,32,37,42
+ },
// INTRA4X4_CHROMAV
{ 6,13,20,28,
13,20,28,32,
20,28,32,37,
- 28,32,37,42 },
+ 28,32,37,42
+ },
// INTER4X4_LUMA
{ 10,14,20,24,
14,20,24,27,
20,24,27,30,
- 24,27,30,34 },
+ 24,27,30,34
+ },
// INTER4X4_CHROMAU
{ 10,14,20,24,
14,20,24,27,
20,24,27,30,
- 24,27,30,34 },
+ 24,27,30,34
+ },
// INTER4X4_CHROMAV
{ 10,14,20,24,
14,20,24,27,
20,24,27,30,
- 24,27,30,34 }
+ 24,27,30,34
+ }
},
{
// INTRA8X8_LUMA
@@ -153,7 +167,8 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = 18,23,25,27,29,31,33,36,
23,25,27,29,31,33,36,38,
25,27,29,31,33,36,38,40,
- 27,29,31,33,36,38,40,42 },
+ 27,29,31,33,36,38,40,42
+ },
// INTER8X8_LUMA
{ 9,13,15,17,19,21,22,24,
@@ -163,7 +178,8 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = 19,21,22,24,25,27,28,30,
21,22,24,25,27,28,30,32,
22,24,25,27,28,30,32,33,
- 24,25,27,28,30,32,33,35 }
+ 24,25,27,28,30,32,33,35
+ }
}
},
@@ -174,37 +190,43 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = { 6,12,19,26,
12,19,26,31,
19,26,31,35,
- 26,31,35,39 },
+ 26,31,35,39
+ },
// INTRA4X4_CHROMAU =
{ 6,12,19,26,
12,19,26,31,
19,26,31,35,
- 26,31,35,39 },
+ 26,31,35,39
+ },
// INTRA4X4_CHROMAV =
{ 6,12,19,26,
12,19,26,31,
19,26,31,35,
- 26,31,35,39 },
+ 26,31,35,39
+ },
// INTER4X4_LUMA =
{ 9,13,18,21,
13,18,21,24,
18,21,24,27,
- 21,24,27,30 },
+ 21,24,27,30
+ },
// INTER4X4_CHROMAU =
{ 9,13,18,21,
13,18,21,24,
18,21,24,27,
- 21,24,27,30 },
+ 21,24,27,30
+ },
// INTER4X4_CHROMAV =
{ 9,13,18,21,
13,18,21,24,
18,21,24,27,
- 21,24,27,30 }
+ 21,24,27,30
+ }
},
{
// INTRA8X8_LUMA =
@@ -215,7 +237,8 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = 19,24,26,28,31,33,35,37,
24,26,28,31,33,35,37,39,
26,28,31,33,35,37,39,42,
- 28,31,33,35,37,39,42,44 },
+ 28,31,33,35,37,39,42,44
+ },
// INTER8X8_LUMA =
{ 9,12,14,16,18,19,21,22,
@@ -225,7 +248,8 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = 18,19,21,22,24,25,27,28,
19,21,22,24,25,27,28,30,
21,22,24,25,27,28,30,31,
- 22,24,25,27,28,30,31,33 }
+ 22,24,25,27,28,30,31,33
+ }
}
},
@@ -233,61 +257,69 @@ const DXVA_Qmatrix_H264 g_QMatrixH264[] = {
{
// INTRA4X4_LUMA =
- { 7,16,22,24,
- 16,22,24,28,
- 18,22,27,33,
- 22,24,32,47 },
+ { 7,16,22,24,
+ 16,22,24,28,
+ 18,22,27,33,
+ 22,24,32,47
+ },
// INTRA4X4_CHROMAU =
- { 7,16,22,24,
- 16,22,24,28,
- 18,22,27,33,
- 22,24,32,47 },
+ { 7,16,22,24,
+ 16,22,24,28,
+ 18,22,27,33,
+ 22,24,32,47
+ },
// INTRA4X4_CHROMAV =
- { 7,16,22,24,
- 16,22,24,28,
- 18,22,27,33,
- 22,24,32,47 },
+ { 7,16,22,24,
+ 16,22,24,28,
+ 18,22,27,33,
+ 22,24,32,47
+ },
// INTER4X4_LUMA =
- {13,15,17,18,
- 15,17,18,20,
- 17,18,21,22,
- 18,20,22,25 },
+ { 13,15,17,18,
+ 15,17,18,20,
+ 17,18,21,22,
+ 18,20,22,25
+ },
// INTER4X4_CHROMAU =
- {13,15,17,18,
- 15,17,18,20,
- 17,18,21,22,
- 18,20,22,25 },
+ { 13,15,17,18,
+ 15,17,18,20,
+ 17,18,21,22,
+ 18,20,22,25
+ },
// INTER4X4_CHROMAV =
- {13,15,17,18,
- 15,17,18,20,
- 17,18,21,22,
- 18,20,22,25 }
+ { 13,15,17,18,
+ 15,17,18,20,
+ 17,18,21,22,
+ 18,20,22,25
+ }
},
{
// INTRA8X8_LUMA =
- { 7,13,16,18,22,22,24,28,
- 13,13,18,20,22,24,28,31,
- 16,18,22,22,24,28,28,32,
- 18,18,22,22,24,28,31,33,
- 18,22,22,24,27,29,33,40,
- 22,22,24,27,29,33,40,48,
- 22,22,24,28,32,38,47,57,
- 22,24,29,32,38,47,57,69 },
+ { 7,13,16,18,22,22,24,28,
+ 13,13,18,20,22,24,28,31,
+ 16,18,22,22,24,28,28,32,
+ 18,18,22,22,24,28,31,33,
+ 18,22,22,24,27,29,33,40,
+ 22,22,24,27,29,33,40,48,
+ 22,22,24,28,32,38,47,57,
+ 22,24,29,32,38,47,57,69
+ },
// INTER8X8_LUMA =
- { 13,14,15,16,17,17,18,19,
- 14,15,16,17,17,18,19,20,
- 15,16,17,17,18,19,20,21,
- 16,17,17,18,19,20,21,22,
- 17,17,18,19,21,22,22,23,
- 17,18,19,20,22,22,23,25,
- 18,19,20,22,22,23,25,26,
- 19,20,21,22,23,25,26,27 }
+ { 13,14,15,16,17,17,18,19,
+ 14,15,16,17,17,18,19,20,
+ 15,16,17,17,18,19,20,21,
+ 16,17,17,18,19,20,21,22,
+ 17,17,18,19,21,22,22,23,
+ 17,18,19,20,22,22,23,25,
+ 18,19,20,22,22,23,25,26,
+ 19,20,21,22,23,25,26,27
+ }
}
}
};
\ No newline at end of file diff --git a/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h b/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h index 4feff9a7d..45b204c33 100644 --- a/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h +++ b/src/filters/transform/MPCVideoDec/IMPCVideoDecFilter.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -24,7 +24,7 @@ #pragma once
// Internal codec list (use to enable/disable codec in standalone mode)
-typedef enum
+typedef enum
{
MPCVD_H264 = 1,
MPCVD_VC1 = MPCVD_H264<<1,
@@ -44,7 +44,8 @@ typedef enum } MPC_VIDEO_CODEC;
interface __declspec(uuid("CDC3B5B3-A8B0-4c70-A805-9FC80CDEF262"))
-IMPCVideoDecFilter : public IUnknown
+IMPCVideoDecFilter :
+public IUnknown
{
STDMETHOD(Apply()) = 0;
diff --git a/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.cpp index ba38dbe64..ce310b302 100644 --- a/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2007 see AUTHORS
@@ -66,13 +66,16 @@ const int CMPCAudioDecFilter::sudPinTypesOutCount = countof(CMPCAudioDecFilter:: CMPCAudioDecFilter::CMPCAudioDecFilter(LPUNKNOWN lpunk, HRESULT* phr)
- : CTransformFilter(NAME("CMPCAudioDecFilter"), lpunk, __uuidof(this))
+ : CTransformFilter(NAME("CMPCAudioDecFilter"), lpunk, __uuidof(this))
{
if(!(m_pInput = new CTransformInputPin(NAME("CAudioDecInputPin"), this, phr, L"In"))) *phr = E_OUTOFMEMORY;
if(FAILED(*phr)) return;
if(!(m_pOutput = new CTransformOutputPin(NAME("CAudioDecOutputPin"), this, phr, L"Out"))) *phr = E_OUTOFMEMORY;
- if(FAILED(*phr)) {delete m_pInput, m_pInput = NULL; return;}
+ if(FAILED(*phr)) {
+ delete m_pInput, m_pInput = NULL;
+ return;
+ }
m_iSampleFormat = SAMPLE_FMT_S16;
@@ -124,16 +127,16 @@ STDMETHODIMP CMPCAudioDecFilter::NonDelegatingQueryInterface(REFIID riid, void** // QI(IMPCVideoDecFilter)
// QI(ISpecifyPropertyPages)
// QI(ISpecifyPropertyPages2)
- __super::NonDelegatingQueryInterface(riid, ppv);
+ __super::NonDelegatingQueryInterface(riid, ppv);
}
HRESULT CMPCAudioDecFilter::CheckTransform(const CMediaType* mtIn, const CMediaType* mtOut)
{
return SUCCEEDED(CheckInputType(mtIn))
- && mtOut->majortype == MEDIATYPE_Audio && mtOut->subtype == MEDIASUBTYPE_PCM
- || mtOut->majortype == MEDIATYPE_Audio && mtOut->subtype == MEDIASUBTYPE_IEEE_FLOAT
- ? S_OK
- : VFW_E_TYPE_NOT_ACCEPTED;
+ && mtOut->majortype == MEDIATYPE_Audio && mtOut->subtype == MEDIASUBTYPE_PCM
+ || mtOut->majortype == MEDIATYPE_Audio && mtOut->subtype == MEDIASUBTYPE_IEEE_FLOAT
+ ? S_OK
+ : VFW_E_TYPE_NOT_ACCEPTED;
}
HRESULT CMPCAudioDecFilter::DecideBufferSize(IMemAllocator* pAllocator, ALLOCATOR_PROPERTIES* pProperties)
@@ -145,7 +148,7 @@ HRESULT CMPCAudioDecFilter::CheckInputType(const CMediaType* mtIn) {
for (int i=0; i<sizeof(sudPinTypesIn)/sizeof(AMOVIESETUP_MEDIATYPE); i++)
{
- if ((mtIn->majortype == *sudPinTypesIn[i].clsMajorType) &&
+ if ((mtIn->majortype == *sudPinTypesIn[i].clsMajorType) &&
(mtIn->subtype == *sudPinTypesIn[i].clsMinorType))
return S_OK;
}
@@ -155,11 +158,11 @@ HRESULT CMPCAudioDecFilter::CheckInputType(const CMediaType* mtIn) HRESULT CMPCAudioDecFilter::GetMediaType(int iPosition, CMediaType* pmt)
{
- if(m_pInput->IsConnected() == FALSE) return E_UNEXPECTED;
+ if(m_pInput->IsConnected() == FALSE) return E_UNEXPECTED;
if(iPosition < 0) return E_INVALIDARG;
if(iPosition > 0) return VFW_S_NO_MORE_ITEMS;
-
+
CMediaType mt = m_pInput->CurrentMediaType();
const GUID& subtype = mt.subtype;
WAVEFORMATEX* wfe = (WAVEFORMATEX*)mt.Format();
@@ -347,8 +350,13 @@ CMediaType CMPCAudioDecFilter::CreateMediaType(SampleFormat sf, DWORD nSamplesPe switch(sf)
{
default:
- case SAMPLE_FMT_S16: wfe->wBitsPerSample = 16; break;
- case SAMPLE_FMT_S32: case SAMPLE_FMT_FLT: wfe->wBitsPerSample = 32; break;
+ case SAMPLE_FMT_S16:
+ wfe->wBitsPerSample = 16;
+ break;
+ case SAMPLE_FMT_S32:
+ case SAMPLE_FMT_FLT:
+ wfe->wBitsPerSample = 32;
+ break;
}
wfe->nBlockAlign = wfe->nChannels*wfe->wBitsPerSample/8;
wfe->nAvgBytesPerSec = wfe->nSamplesPerSec*wfe->nBlockAlign;
diff --git a/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.h b/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.h index fb4641281..938870ae1 100644 --- a/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.h +++ b/src/filters/transform/MPCVideoDec/MPCAudioDecFilter.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2007 see AUTHORS
@@ -25,7 +25,7 @@ enum SampleFormat;
class __declspec(uuid("BF67339B-465E-4c5a-AE2D-DC4EE17EA272"))
-CMPCAudioDecFilter
+ CMPCAudioDecFilter
: public CTransformFilter
{
public:
@@ -63,9 +63,8 @@ protected : AVFrame* m_pFrame;
int m_nCodecNb;
+ int FindCodec(const CMediaType* mtIn);
+ void Cleanup();
- int FindCodec(const CMediaType* mtIn);
- void Cleanup();
-
- static void LogLibAVCodec(void* par,int level,const char *fmt,va_list valist);
+ static void LogLibAVCodec(void* par,int level,const char *fmt,va_list valist);
};
diff --git a/src/filters/transform/MPCVideoDec/MPCFfmpegDec.cpp b/src/filters/transform/MPCVideoDec/MPCFfmpegDec.cpp index fbad8c32e..41ab0c7af 100644 --- a/src/filters/transform/MPCVideoDec/MPCFfmpegDec.cpp +++ b/src/filters/transform/MPCVideoDec/MPCFfmpegDec.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp index 60c440a14..2a2ff9dbe 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -35,8 +35,8 @@ extern "C"
{
- #include "FfmpegContext.h"
- #include "libswscale/swscale.h"
+#include "FfmpegContext.h"
+#include "libswscale/swscale.h"
}
#include "../../../DSUtil/DSUtil.h"
@@ -101,11 +101,11 @@ struct TYCbCr2RGB_coeffs { int RGB_add3;
TYCbCr2RGB_coeffs(ffYCbCr_RGB_MatrixCoefficientsType cspOptionsIturBt,
- int cspOptionsWhiteCutoff,
- int cspOptionsBlackCutoff,
- int cspOptionsChromaCutoff,
- double cspOptionsRGB_WhiteLevel,
- double cspOptionsRGB_BlackLevel)
+ int cspOptionsWhiteCutoff,
+ int cspOptionsBlackCutoff,
+ int cspOptionsChromaCutoff,
+ double cspOptionsRGB_WhiteLevel,
+ double cspOptionsRGB_BlackLevel)
{
if (cspOptionsIturBt == ffYCbCr_RGB_coeff_ITUR_BT601) {
Kr = 0.299;
@@ -461,7 +461,7 @@ const AMOVIESETUP_MEDIATYPE CMPCVideoDecFilter::sudPinTypesIn[] = { &MEDIATYPE_Video, &MEDIASUBTYPE_S263 },
{ &MEDIATYPE_Video, &MEDIASUBTYPE_s263 },
-
+
// Real video
{ &MEDIATYPE_Video, &MEDIASUBTYPE_RV10 },
{ &MEDIATYPE_Video, &MEDIASUBTYPE_RV20 },
@@ -554,7 +554,7 @@ BOOL CALLBACK EnumFindProcessWnd (HWND hwnd, LPARAM lParam) return TRUE;
}
-CMPCVideoDecFilter::CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr)
+CMPCVideoDecFilter::CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr)
: CBaseVideoFilter(NAME("MPC - Video decoder"), lpunk, phr, __uuidof(this))
{
HWND hWnd = NULL;
@@ -681,10 +681,10 @@ void CMPCVideoDecFilter::DetectVideoCard(HWND hWnd) m_VideoDriverVersion.LowPart = 0;
pD3D9 = Direct3DCreate9(D3D_SDK_VERSION);
- if (pD3D9)
+ if (pD3D9)
{
D3DADAPTER_IDENTIFIER9 adapterIdentifier;
- if (pD3D9->GetAdapterIdentifier(GetAdapter(pD3D9, hWnd), 0, &adapterIdentifier) == S_OK)
+ if (pD3D9->GetAdapterIdentifier(GetAdapter(pD3D9, hWnd), 0, &adapterIdentifier) == S_OK)
{
m_nPCIVendor = adapterIdentifier.VendorId;
m_nPCIDevice = adapterIdentifier.DeviceId;
@@ -718,7 +718,7 @@ inline int LNKO(int a, int b) bool CMPCVideoDecFilter::IsVideoInterlaced()
{
- // NOT A BUG : always tell DirectShow it's interlaced (progressive flags set in
+ // NOT A BUG : always tell DirectShow it's interlaced (progressive flags set in
// SetTypeSpecificFlags function)
return true;
};
@@ -767,7 +767,7 @@ void CMPCVideoDecFilter::GetOutputSize(int& w, int& h, int& arx, int& ary, int & int CMPCVideoDecFilter::PictWidth()
{
- return m_nWidth;
+ return m_nWidth;
}
int CMPCVideoDecFilter::PictHeight()
@@ -840,17 +840,17 @@ int CMPCVideoDecFilter::FindCodec(const CMediaType* mtIn) bCodecActivated = (m_nActiveCodecs & MPCVD_FLASH) != 0;
break;
case CODEC_ID_MPEG4 :
- if ((*ffCodecs[i].clsMinorType == MEDIASUBTYPE_XVID) ||
+ if ((*ffCodecs[i].clsMinorType == MEDIASUBTYPE_XVID) ||
(*ffCodecs[i].clsMinorType == MEDIASUBTYPE_xvid) ||
(*ffCodecs[i].clsMinorType == MEDIASUBTYPE_XVIX) ||
(*ffCodecs[i].clsMinorType == MEDIASUBTYPE_xvix) )
{
bCodecActivated = (m_nActiveCodecs & MPCVD_XVID) != 0;
}
- else if ((*ffCodecs[i].clsMinorType == MEDIASUBTYPE_DX50) ||
- (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_dx50) ||
- (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_DIVX) ||
- (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_divx) )
+ else if ((*ffCodecs[i].clsMinorType == MEDIASUBTYPE_DX50) ||
+ (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_dx50) ||
+ (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_DIVX) ||
+ (*ffCodecs[i].clsMinorType == MEDIASUBTYPE_divx) )
{
bCodecActivated = (m_nActiveCodecs & MPCVD_DIVX) != 0;
}
@@ -997,7 +997,7 @@ STDMETHODIMP CMPCVideoDecFilter::NonDelegatingQueryInterface(REFIID riid, void** QI(IMPCVideoDecFilter)
QI(ISpecifyPropertyPages)
QI(ISpecifyPropertyPages2)
- __super::NonDelegatingQueryInterface(riid, ppv);
+ __super::NonDelegatingQueryInterface(riid, ppv);
}
@@ -1007,7 +1007,7 @@ HRESULT CMPCVideoDecFilter::CheckInputType(const CMediaType* mtIn) {
for (int i=0; i<sizeof(sudPinTypesIn)/sizeof(AMOVIESETUP_MEDIATYPE); i++)
{
- if ((mtIn->majortype == *sudPinTypesIn[i].clsMajorType) &&
+ if ((mtIn->majortype == *sudPinTypesIn[i].clsMajorType) &&
(mtIn->subtype == *sudPinTypesIn[i].clsMinorType))
return S_OK;
}
@@ -1087,7 +1087,7 @@ HRESULT CMPCVideoDecFilter::SetMediaType(PIN_DIRECTION direction,const CMediaTyp }
m_nWidth = m_pAVCtx->width;
m_nHeight = m_pAVCtx->height;
-
+
m_pAVCtx->intra_matrix = (uint16_t*)calloc(sizeof(uint16_t),64);
m_pAVCtx->inter_matrix = (uint16_t*)calloc(sizeof(uint16_t),64);
m_pAVCtx->codec_tag = ffCodecs[nNewCodec].fourcc;
@@ -1192,7 +1192,7 @@ bool CMPCVideoDecFilter::IsDXVASupported() // Enabled by user ?
if (m_bUseDXVA) {
// is the file compatible ?
- if (m_bDXVACompatible) {
+ if (m_bDXVACompatible) {
return true;
}
}
@@ -1347,12 +1347,12 @@ HRESULT CMPCVideoDecFilter::DecideBufferSize(IMemAllocator* pAllocator, ALLOCATO pProperties->cBuffers = GetPicEntryNumber();
- if(FAILED(hr = pAllocator->SetProperties(pProperties, &Actual)))
+ if(FAILED(hr = pAllocator->SetProperties(pProperties, &Actual)))
return hr;
return pProperties->cBuffers > Actual.cBuffers || pProperties->cbBuffer > Actual.cbBuffer
- ? E_FAIL
- : NOERROR;
+ ? E_FAIL
+ : NOERROR;
}
else
return __super::DecideBufferSize (pAllocator, pProperties);
@@ -1465,7 +1465,7 @@ void CMPCVideoDecFilter::InitSwscale() ExtractBIH(&m_pOutput->CurrentMediaType(), &bihOut);
m_nOutCsp = GetCspFromMediaType(m_pOutput->CurrentMediaType().subtype);
- m_pSwsContext = sws_getContext(m_pAVCtx->width,
+ m_pSwsContext = sws_getContext(m_pAVCtx->width,
m_pAVCtx->height,
csp_ffdshow2mplayer(csp_lavc2ffdshow(m_pAVCtx->pix_fmt)),
m_pAVCtx->width,
@@ -1484,8 +1484,8 @@ void CMPCVideoDecFilter::InitSwscale() template<class T> inline T odd2even(T x)
{
return x&1 ?
- x + 1 :
- x;
+ x + 1 :
+ x;
}
#endif /* INCLUDE_MPC_VIDEO_DECODER */
@@ -1543,7 +1543,7 @@ HRESULT CMPCVideoDecFilter::SoftwareDecode(IMediaSample* pIn, BYTE* pDataIn, int stride_t dstStride[4];
const TcspInfo *outcspInfo=csp_getInfo(m_nOutCsp);
- for (int i=0;i<4;i++)
+ for (int i=0; i<4; i++)
{
srcStride[i]=(stride_t)m_pFrame->linesize[i];
dstStride[i]=m_pOutSize.cx>>outcspInfo->shiftX[i];
@@ -1565,8 +1565,8 @@ HRESULT CMPCVideoDecFilter::SoftwareDecode(IMediaSample* pIn, BYTE* pDataIn, int #if defined(_DEBUG) && 0
static REFERENCE_TIME rtLast = 0;
- TRACE ("Deliver : %10I64d - %10I64d (%10I64d) {%10I64d}\n", rtStart, rtStop,
- rtStop - rtStart, rtStart - rtLast);
+ TRACE ("Deliver : %10I64d - %10I64d (%10I64d) {%10I64d}\n", rtStart, rtStop,
+ rtStop - rtStart, rtStart - rtLast);
rtLast = rtStart;
#endif
@@ -1648,7 +1648,7 @@ void CMPCVideoDecFilter::FindStartCodeH264 (BYTE** pDataIn, int& nSize) // return;
// }
// }
- //}
+ //}
//DWORD dw = 0;
@@ -1693,7 +1693,7 @@ bool CMPCVideoDecFilter::FindPicture(int nIndex, int nStartCode) }
}
}
-
+
}
return false;
@@ -1835,7 +1835,7 @@ HRESULT CMPCVideoDecFilter::Transform(IMediaSample* pIn) }
// m_rtStart = rtStart;
-
+
// DumpBuffer (pDataIn, nSize);
// TRACE ("Receive : %10I64d - %10I64d (%10I64d) Size=%d\n", rtStart, rtStop, rtStop - rtStart, nSize);
@@ -1902,16 +1902,16 @@ HRESULT CMPCVideoDecFilter::Transform(IMediaSample* pIn) void CMPCVideoDecFilter::UpdateAspectRatio()
{
if(((m_nARMode) && (m_pAVCtx)) && ((m_pAVCtx->sample_aspect_ratio.num>0) && (m_pAVCtx->sample_aspect_ratio.den>0)))
- {
- CSize SAR(m_pAVCtx->sample_aspect_ratio.num, m_pAVCtx->sample_aspect_ratio.den);
- if(m_sar != SAR)
- {
- m_sar = SAR;
- CSize aspect(m_nWidth * SAR.cx, m_nHeight * SAR.cy);
- int lnko = LNKO(aspect.cx, aspect.cy);
- if(lnko > 1) aspect.cx /= lnko, aspect.cy /= lnko;
- SetAspect(aspect);
- }
+ {
+ CSize SAR(m_pAVCtx->sample_aspect_ratio.num, m_pAVCtx->sample_aspect_ratio.den);
+ if(m_sar != SAR)
+ {
+ m_sar = SAR;
+ CSize aspect(m_nWidth * SAR.cx, m_nHeight * SAR.cy);
+ int lnko = LNKO(aspect.cx, aspect.cy);
+ if(lnko > 1) aspect.cx /= lnko, aspect.cy /= lnko;
+ SetAspect(aspect);
+ }
}
}
@@ -1940,7 +1940,7 @@ BOOL CMPCVideoDecFilter::IsSupportedDecoderMode(const GUID& mode) {
for (int i=0; i<MAX_SUPPORTED_MODE; i++)
{
- if (*ffCodecs[m_nCodecNb].DXVAModes->Decoder[i] == GUID_NULL)
+ if (*ffCodecs[m_nCodecNb].DXVAModes->Decoder[i] == GUID_NULL)
break;
else if (*ffCodecs[m_nCodecNb].DXVAModes->Decoder[i] == mode)
return true;
@@ -1962,9 +1962,9 @@ BOOL CMPCVideoDecFilter::IsSupportedDecoderConfig(const D3DFORMAT nD3DFormat, co }
HRESULT CMPCVideoDecFilter::FindDXVA2DecoderConfiguration(IDirectXVideoDecoderService *pDecoderService,
- const GUID& guidDecoder,
- DXVA2_ConfigPictureDecode *pSelectedConfig,
- BOOL *pbFoundDXVA2Configuration)
+ const GUID& guidDecoder,
+ DXVA2_ConfigPictureDecode *pSelectedConfig,
+ BOOL *pbFoundDXVA2Configuration)
{
HRESULT hr = S_OK;
UINT cFormats = 0;
@@ -2047,9 +2047,9 @@ HRESULT CMPCVideoDecFilter::ConfigureDXVA2(IPin *pPin) if (SUCCEEDED(hr))
{
hr = pGetService->GetService(
- MR_VIDEO_ACCELERATION_SERVICE,
- __uuidof(IDirect3DDeviceManager9),
- (void**)&pDeviceManager);
+ MR_VIDEO_ACCELERATION_SERVICE,
+ __uuidof(IDirect3DDeviceManager9),
+ (void**)&pDeviceManager);
}
// Open a new device handle.
@@ -2062,9 +2062,9 @@ HRESULT CMPCVideoDecFilter::ConfigureDXVA2(IPin *pPin) if (SUCCEEDED(hr))
{
hr = pDeviceManager->GetVideoService(
- hDevice,
- __uuidof(IDirectXVideoDecoderService),
- (void**)&pDecoderService);
+ hDevice,
+ __uuidof(IDirectXVideoDecoderService),
+ (void**)&pDecoderService);
}
// Get the decoder GUIDs.
@@ -2084,7 +2084,7 @@ HRESULT CMPCVideoDecFilter::ConfigureDXVA2(IPin *pPin) continue;
}
- // Find a configuration that we support.
+ // Find a configuration that we support.
hr = FindDXVA2DecoderConfiguration(pDecoderService, pDecoderGuids[iGuid], &config, &bFoundDXVA2Configuration);
if (FAILED(hr))
@@ -2144,9 +2144,9 @@ HRESULT CMPCVideoDecFilter::SetEVRForDXVA2(IPin *pPin) if (SUCCEEDED(hr))
{
hr = pGetService->GetService(
- MR_VIDEO_ACCELERATION_SERVICE,
- __uuidof(IDirectXVideoMemoryConfiguration),
- (void**)&pVideoConfig);
+ MR_VIDEO_ACCELERATION_SERVICE,
+ __uuidof(IDirectXVideoMemoryConfiguration),
+ (void**)&pVideoConfig);
if (SUCCEEDED (pGetService->GetService(MR_VIDEO_RENDER_SERVICE, __uuidof(IMFVideoDisplayControl), (void**)&pVdc)))
{
@@ -2158,7 +2158,7 @@ HRESULT CMPCVideoDecFilter::SetEVRForDXVA2(IPin *pPin) }
}
- // Notify the EVR.
+ // Notify the EVR.
if (SUCCEEDED(hr))
{
DXVA2_SurfaceType surfaceType;
@@ -2191,7 +2191,7 @@ HRESULT CMPCVideoDecFilter::CreateDXVA2Decoder(UINT nNumRenderTargets, IDirect3D if (m_pDXVADecoder) m_pDXVADecoder->SetDirectXVideoDec (NULL);
- hr = m_pDecoderService->CreateVideoDecoder (m_DXVADecoderGUID, &m_VideoDesc, &m_DXVA2Config,
+ hr = m_pDecoderService->CreateVideoDecoder (m_DXVADecoderGUID, &m_VideoDesc, &m_DXVA2Config,
pDecoderRenderTargets, nNumRenderTargets, &pDirectXVideoDec);
if (SUCCEEDED (hr))
@@ -2275,7 +2275,7 @@ WORD CMPCVideoDecFilter::GetDXVA1RestrictedMode() HRESULT CMPCVideoDecFilter::CreateDXVA1Decoder(IAMVideoAccelerator* pAMVideoAccelerator, const GUID* pDecoderGuid, DWORD dwSurfaceCount)
{
- if (m_pDXVADecoder && m_DXVADecoderGUID == *pDecoderGuid)
+ if (m_pDXVADecoder && m_DXVADecoderGUID == *pDecoderGuid)
return S_OK;
SAFE_DELETE (m_pDXVADecoder);
@@ -2395,7 +2395,7 @@ STDMETHODIMP_(int) CMPCVideoDecFilter::GetIDCTAlgo() }
STDMETHODIMP_(GUID*) CMPCVideoDecFilter::GetDXVADecoderGuid()
{
- if (m_pGraph == NULL)
+ if (m_pGraph == NULL)
return NULL;
else
return &m_DXVADecoderGUID;
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h index 655e9fad5..2e4062cda 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -66,7 +66,7 @@ typedef struct } BUFFER_TIME;
class __declspec(uuid("008BAC12-FBAF-497b-9670-BC6F6FBAE2C4"))
-CMPCVideoDecFilter
+ CMPCVideoDecFilter
: public CBaseVideoFilter
, public TlibavcodecExt
, public ISpecifyPropertyPages2
@@ -190,7 +190,7 @@ public: STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
virtual bool IsVideoInterlaced();
virtual void GetOutputSize(int& w, int& h, int& arx, int& ary, int &RealWidth, int &RealHeight);
- CTransformOutputPin* GetOutputPin() { return m_pOutput; }
+ CTransformOutputPin* GetOutputPin() {return m_pOutput;}
void UpdateFrameTime (REFERENCE_TIME& rtStart, REFERENCE_TIME& rtStop);
// === Overriden DirectShow functions
@@ -241,19 +241,19 @@ public: int PictHeight();
int PictWidthRounded();
int PictHeightRounded();
- inline bool UseDXVA2() { return (m_nDXVAMode == MODE_DXVA2); };
- void FlushDXVADecoder() { if (m_pDXVADecoder) m_pDXVADecoder->Flush(); }
- inline AVCodecContext* GetAVCtx() { return m_pAVCtx; };
- inline AVFrame* GetFrame() { return m_pFrame; }
+ inline bool UseDXVA2() {return (m_nDXVAMode == MODE_DXVA2);};
+ void FlushDXVADecoder() {if (m_pDXVADecoder) m_pDXVADecoder->Flush();}
+ inline AVCodecContext* GetAVCtx() {return m_pAVCtx;};
+ inline AVFrame* GetFrame() {return m_pFrame;}
bool IsDXVASupported();
- inline bool IsReorderBFrame() { return m_bReorderBFrame; };
- inline int GetPCIVendor() { return m_nPCIVendor; };
- inline REFERENCE_TIME GetAvrTimePerFrame() { return m_rtAvrTimePerFrame; };
+ inline bool IsReorderBFrame() { return m_bReorderBFrame;};
+ inline int GetPCIVendor() {return m_nPCIVendor;};
+ inline REFERENCE_TIME GetAvrTimePerFrame() {return m_rtAvrTimePerFrame;};
void UpdateAspectRatio();
void ReorderBFrames(REFERENCE_TIME& rtStart, REFERENCE_TIME& rtStop);
// === DXVA1 functions
- DDPIXELFORMAT* GetPixelFormat() { return &m_PixelFormat; }
+ DDPIXELFORMAT* GetPixelFormat() {return &m_PixelFormat;}
HRESULT FindDXVA1DecoderConfiguration(IAMVideoAccelerator* pAMVideoAccelerator, const GUID* guidDecoder, DDPIXELFORMAT* pPixelFormat);
HRESULT CheckDXVA1Decoder(const GUID *pGuid);
void SetDXVA1Params(const GUID* pGuid, DDPIXELFORMAT* pPixelFormat);
@@ -263,12 +263,12 @@ public: // === DXVA2 functions
void FillInVideoDescription(DXVA2_VideoDesc *pDesc);
- DXVA2_ConfigPictureDecode* GetDXVA2Config() { return &m_DXVA2Config; };
+ DXVA2_ConfigPictureDecode* GetDXVA2Config() {return &m_DXVA2Config;};
HRESULT ConfigureDXVA2(IPin *pPin);
HRESULT SetEVRForDXVA2(IPin *pPin);
HRESULT FindDXVA2DecoderConfiguration(IDirectXVideoDecoderService *pDecoderService,
- const GUID& guidDecoder,
- DXVA2_ConfigPictureDecode *pSelectedConfig,
- BOOL *pbFoundDXVA2Configuration);
+ const GUID& guidDecoder,
+ DXVA2_ConfigPictureDecode *pSelectedConfig,
+ BOOL *pbFoundDXVA2Configuration);
HRESULT CreateDXVA2Decoder(UINT nNumRenderTargets, IDirect3DSurface9** pDecoderRenderTargets);
};
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp index 2f1ea0b6c..e74d5ec8f 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -39,12 +39,12 @@ int g_AVDiscard[] =
{
- -16, ///< AVDISCARD_NONE discard nothing
- 0, ///< AVDISCARD_DEFAULT discard useless packets like 0 size packets in avi
- 8, ///< AVDISCARD_NONREF discard all non reference
- 16, ///< AVDISCARD_BIDIR discard all bidirectional frames
- 32, ///< AVDISCARD_NONKEY discard all frames except keyframes
- 48, ///< AVDISCARD_ALL discard all
+ -16, ///< AVDISCARD_NONE discard nothing
+ 0, ///< AVDISCARD_DEFAULT discard useless packets like 0 size packets in avi
+ 8, ///< AVDISCARD_NONREF discard all non reference
+ 16, ///< AVDISCARD_BIDIR discard all bidirectional frames
+ 32, ///< AVDISCARD_NONKEY discard all frames except keyframes
+ 48, ///< AVDISCARD_ALL discard all
};
int FindDiscardIndex(int nValue)
@@ -189,10 +189,10 @@ bool CMPCVideoDecSettingsWnd::OnActivate() if (m_pMDF)
{
#if INCLUDE_MPC_VIDEO_DECODER
- #if INTERNAL_DECODER_H264
+ #if INTERNAL_DECODER_H264
m_cbThreadNumber.SetCurSel (m_pMDF->GetThreadNumber() - 1);
m_cbDiscardMode.SetCurSel (FindDiscardIndex (m_pMDF->GetDiscardMode()));
- #endif
+ #endif
m_cbErrorRecognition.SetCurSel (m_pMDF->GetErrorRecognition()-1);
m_cbIDCTAlgo.SetCurSel (m_pMDF->GetIDCTAlgo());
@@ -217,13 +217,13 @@ bool CMPCVideoDecSettingsWnd::OnApply() if(m_pMDF && m_cbDXVACompatibilityCheck.m_hWnd)
{
#if INCLUDE_MPC_VIDEO_DECODER
- #if INTERNAL_DECODER_H264
+ #if INTERNAL_DECODER_H264
m_pMDF->SetThreadNumber (m_cbThreadNumber.GetCurSel() + 1);
m_pMDF->SetDiscardMode (g_AVDiscard[m_cbDiscardMode.GetCurSel()]);
- #endif /* INTERNAL_DECODER_H264 */
+ #endif /* INTERNAL_DECODER_H264 */
m_pMDF->SetErrorRecognition (m_cbErrorRecognition.GetCurSel()+1);
m_pMDF->SetIDCTAlgo (m_cbIDCTAlgo.GetCurSel());
-
+
m_pMDF->SetARMode(m_cbARMode.GetCheck());
#endif /* INCLUDE_MPC_VIDEO_DECODER */
@@ -373,6 +373,5 @@ bool CMPCVideoDecCodecWnd::OnApply() }
-
BEGIN_MESSAGE_MAP(CMPCVideoDecCodecWnd, CInternalPropertyPageWnd)
END_MESSAGE_MAP()
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h index c9953aabd..289b206b9 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecSettingsWnd.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -27,7 +27,7 @@ #include <afxcmn.h>
class __declspec(uuid("D5AA0389-D274-48e1-BF50-ACB05A56DDE0"))
-CMPCVideoDecSettingsWnd : public CInternalPropertyPageWnd
+ CMPCVideoDecSettingsWnd : public CInternalPropertyPageWnd
{
CComQIPtr<IMPCVideoDecFilter> m_pMDF;
@@ -54,7 +54,7 @@ CMPCVideoDecSettingsWnd : public CInternalPropertyPageWnd CButton m_cbDXVA_SD;
- enum
+ enum
{
IDC_PP_THREAD_NUMBER = 10000,
IDC_PP_ENABLE_DEBLOCKING,
@@ -74,8 +74,12 @@ public: void OnDeactivate();
bool OnApply();
- static LPCTSTR GetWindowTitle() {return _T("Settings");}
- static CSize GetWindowSize() {return CSize(350, 325);}
+ static LPCTSTR GetWindowTitle() {
+ return _T("Settings");
+ }
+ static CSize GetWindowSize() {
+ return CSize(350, 325);
+ }
DECLARE_MESSAGE_MAP()
};
@@ -84,7 +88,7 @@ public: class __declspec(uuid("3C395D46-8B0F-440d-B962-2F4A97355453"))
-CMPCVideoDecCodecWnd : public CInternalPropertyPageWnd
+ CMPCVideoDecCodecWnd : public CInternalPropertyPageWnd
{
CComQIPtr<IMPCVideoDecFilter> m_pMDF;
@@ -101,8 +105,12 @@ public: void OnDeactivate();
bool OnApply();
- static LPCTSTR GetWindowTitle() {return _T("Codecs");}
- static CSize GetWindowSize() {return CSize(350, 300);}
+ static LPCTSTR GetWindowTitle() {
+ return _T("Codecs");
+ }
+ static CSize GetWindowSize() {
+ return CSize(350, 300);
+ }
DECLARE_MESSAGE_MAP()
};
diff --git a/src/filters/transform/MPCVideoDec/TlibavcodecExt.cpp b/src/filters/transform/MPCVideoDec/TlibavcodecExt.cpp index 3976c5a2c..af7c78397 100644 --- a/src/filters/transform/MPCVideoDec/TlibavcodecExt.cpp +++ b/src/filters/transform/MPCVideoDec/TlibavcodecExt.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -30,11 +30,11 @@ void TlibavcodecExt::ConnectTo(AVCodecContext *pAVCtx)
{
- pAVCtx->opaque = this;
- pAVCtx->get_buffer = get_buffer;
- pAVCtx->reget_buffer = reget_buffer;
- pAVCtx->release_buffer = release_buffer;
- pAVCtx->handle_user_data = handle_user_data0;
+ pAVCtx->opaque = this;
+ pAVCtx->get_buffer = get_buffer;
+ pAVCtx->reget_buffer = reget_buffer;
+ pAVCtx->release_buffer = release_buffer;
+ pAVCtx->handle_user_data = handle_user_data0;
}
int TlibavcodecExt::get_buffer(AVCodecContext *c, AVFrame *pic)
diff --git a/src/filters/transform/MPCVideoDec/TlibavcodecExt.h b/src/filters/transform/MPCVideoDec/TlibavcodecExt.h index 49f3dfef7..7e7d5c051 100644 --- a/src/filters/transform/MPCVideoDec/TlibavcodecExt.h +++ b/src/filters/transform/MPCVideoDec/TlibavcodecExt.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
diff --git a/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.cpp b/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.cpp index 559b5b7f5..4cfcc495a 100644 --- a/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.cpp +++ b/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -27,9 +27,9 @@ CDXVA2Sample::CDXVA2Sample(CVideoDecDXVAAllocator *pAlloc, HRESULT *phr)
- : CMediaSample(NAME("CDXVA2Sample"), (CBaseAllocator*)pAlloc, phr, NULL, 0)
- , m_dwSurfaceId(0)
-{
+ : CMediaSample(NAME("CDXVA2Sample"), (CBaseAllocator*)pAlloc, phr, NULL, 0)
+ , m_dwSurfaceId(0)
+{
}
//Note: CMediaSample does not derive from CUnknown, so we cannot use the
@@ -93,7 +93,7 @@ STDMETHODIMP CDXVA2Sample::GetPointer(BYTE ** ppBuffer) -// Sets the pointer to the Direct3D surface.
+// Sets the pointer to the Direct3D surface.
void CDXVA2Sample::SetSurface(DWORD surfaceId, IDirect3DSurface9 *pSurf)
{
m_pSurface = pSurf;
@@ -107,7 +107,7 @@ STDMETHODIMP_(int) CDXVA2Sample::GetDXSurfaceId() CVideoDecDXVAAllocator::CVideoDecDXVAAllocator(CMPCVideoDecFilter* pVideoDecFilter, HRESULT* phr)
- : CBaseAllocator(NAME("CVideoDecDXVAAllocator"), NULL, phr)
+ : CBaseAllocator(NAME("CVideoDecDXVAAllocator"), NULL, phr)
{
m_pVideoDecFilter = pVideoDecFilter;
m_ppRTSurfaceArray = NULL;
@@ -155,16 +155,16 @@ HRESULT CVideoDecDXVAAllocator::Alloc() if (SUCCEEDED(hr))
{
hr = pDXVA2Service->CreateSurface(
- m_pVideoDecFilter->PictWidthRounded(),
- m_pVideoDecFilter->PictHeightRounded(),
- m_lCount - 1,
- (D3DFORMAT)m_dwFormat,
- D3DPOOL_DEFAULT,
- 0,
- DXVA2_VideoDecoderRenderTarget,
- m_ppRTSurfaceArray,
- NULL
- );
+ m_pVideoDecFilter->PictWidthRounded(),
+ m_pVideoDecFilter->PictHeightRounded(),
+ m_lCount - 1,
+ (D3DFORMAT)m_dwFormat,
+ D3DPOOL_DEFAULT,
+ 0,
+ DXVA2_VideoDecoderRenderTarget,
+ m_ppRTSurfaceArray,
+ NULL
+ );
}
if (SUCCEEDED(hr))
diff --git a/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.h b/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.h index a480e16ca..0f20d4383 100644 --- a/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.h +++ b/src/filters/transform/MPCVideoDec/VideoDecDXVAAllocator.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -32,7 +32,8 @@ class CVideoDecDXVAAllocator; interface __declspec(uuid("AE7EC2A2-1913-4a80-8DD6-DF1497ABA494"))
-IMPCDXVA2Sample : public IUnknown
+IMPCDXVA2Sample :
+public IUnknown
{
STDMETHOD_(int, GetDXSurfaceId()) = 0;
};
@@ -64,7 +65,7 @@ public: private:
- // Sets the pointer to the Direct3D surface.
+ // Sets the pointer to the Direct3D surface.
void SetSurface(DWORD surfaceId, IDirect3DSurface9 *pSurf);
CComPtr<IDirect3DSurface9> m_pSurface;
diff --git a/src/filters/transform/MPCVideoDec/VideoDecOutputPin.cpp b/src/filters/transform/MPCVideoDec/VideoDecOutputPin.cpp index 9f8675efc..06dbbbd4e 100644 --- a/src/filters/transform/MPCVideoDec/VideoDecOutputPin.cpp +++ b/src/filters/transform/MPCVideoDec/VideoDecOutputPin.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -27,7 +27,7 @@ #include "../../../DSUtil/DSUtil.h"
CVideoDecOutputPin::CVideoDecOutputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName)
- : CBaseVideoOutputPin(pObjectName, pFilter, phr, pName)
+ : CBaseVideoOutputPin(pObjectName, pFilter, phr, pName)
{
m_pVideoDecFilter = static_cast<CMPCVideoDecFilter*> (pFilter);
m_pDXVA2Allocator = NULL;
@@ -68,7 +68,7 @@ STDMETHODIMP CVideoDecOutputPin::NonDelegatingQueryInterface(REFIID riid, void** {
return
QI(IAMVideoAcceleratorNotify)
- __super::NonDelegatingQueryInterface(riid, ppv);
+ __super::NonDelegatingQueryInterface(riid, ppv);
}
@@ -76,7 +76,7 @@ STDMETHODIMP CVideoDecOutputPin::NonDelegatingQueryInterface(REFIID riid, void** STDMETHODIMP CVideoDecOutputPin::GetUncompSurfacesInfo(const GUID *pGuid, LPAMVAUncompBufferInfo pUncompBufferInfo)
{
HRESULT hr = E_INVALIDARG;
-
+
if (SUCCEEDED (m_pVideoDecFilter->CheckDXVA1Decoder (pGuid)))
{
CComQIPtr<IAMVideoAccelerator> pAMVideoAccelerator = GetConnected();
@@ -97,7 +97,7 @@ STDMETHODIMP CVideoDecOutputPin::GetUncompSurfacesInfo(const GUID *pGuid, LPAMVA return hr;
}
-STDMETHODIMP CVideoDecOutputPin::SetUncompSurfacesInfo(DWORD dwActualUncompSurfacesAllocated)
+STDMETHODIMP CVideoDecOutputPin::SetUncompSurfacesInfo(DWORD dwActualUncompSurfacesAllocated)
{
m_dwDXVA1SurfaceCount = dwActualUncompSurfacesAllocated;
return S_OK;
diff --git a/src/filters/transform/MPCVideoDec/VideoDecOutputPin.h b/src/filters/transform/MPCVideoDec/VideoDecOutputPin.h index 12fc60cd1..922fac7e1 100644 --- a/src/filters/transform/MPCVideoDec/VideoDecOutputPin.h +++ b/src/filters/transform/MPCVideoDec/VideoDecOutputPin.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -32,7 +32,7 @@ class CVideoDecDXVAAllocator; class CVideoDecOutputPin : public CBaseVideoOutputPin
- , public IAMVideoAcceleratorNotify
+ , public IAMVideoAcceleratorNotify
{
public:
CVideoDecOutputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName);
@@ -45,8 +45,8 @@ public: STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
// IAMVideoAcceleratorNotify
- STDMETHODIMP GetUncompSurfacesInfo(const GUID *pGuid, LPAMVAUncompBufferInfo pUncompBufferInfo);
- STDMETHODIMP SetUncompSurfacesInfo(DWORD dwActualUncompSurfacesAllocated);
+ STDMETHODIMP GetUncompSurfacesInfo(const GUID *pGuid, LPAMVAUncompBufferInfo pUncompBufferInfo);
+ STDMETHODIMP SetUncompSurfacesInfo(DWORD dwActualUncompSurfacesAllocated);
STDMETHODIMP GetCreateVideoAcceleratorData(const GUID *pGuid, LPDWORD pdwSizeMiscData, LPVOID *ppMiscData);
private :
diff --git a/src/filters/transform/MPCVideoDec/stdafx.cpp b/src/filters/transform/MPCVideoDec/stdafx.cpp index 0a111a528..d106f9b6e 100644 --- a/src/filters/transform/MPCVideoDec/stdafx.cpp +++ b/src/filters/transform/MPCVideoDec/stdafx.cpp @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
diff --git a/src/filters/transform/MPCVideoDec/stdafx.h b/src/filters/transform/MPCVideoDec/stdafx.h index 8ea5021d7..20ab527b4 100644 --- a/src/filters/transform/MPCVideoDec/stdafx.h +++ b/src/filters/transform/MPCVideoDec/stdafx.h @@ -1,4 +1,4 @@ -/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -46,9 +46,9 @@ #ifdef _DEBUG
- void LOG(LPCTSTR fmt, ...);
+void LOG(LPCTSTR fmt, ...);
#else
- inline void LOG(LPCTSTR fmt, ...) {}
+inline void LOG(LPCTSTR fmt, ...) {}
#endif
#define CHECK_HR(x) hr = ##x; if (FAILED (hr)) { TRACE("Error : 0x%08x\n", hr); ASSERT (hr==VFW_E_NOT_COMMITTED); return hr; }
|