diff options
author | matmaul <matmaul@users.sourceforge.net> | 2008-05-24 19:02:34 +0400 |
---|---|---|
committer | matmaul <matmaul@users.sourceforge.net> | 2008-05-24 19:02:34 +0400 |
commit | 68184e6e9bad2446ff195fa8122ca0fd20912f7c (patch) | |
tree | 7ce15be496c83a5a30c930fb21802737c6a9135c /src/filters/transform/mpcvideodec/DXVADecoderH264.cpp | |
parent | 5d74fbc888daeb3de48063050ad794875a9c4211 (diff) |
move m4a and m4b extension in MPEG4 Audio subsection
modify QueryStatus to be modular
minor fix for MSVC compilation of libavcodec
StatusReportFeedbackNumber should not be 0, move the increment before sending the DXVA_PicParams_H264 structure
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@522 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoderH264.cpp')
-rw-r--r-- | src/filters/transform/mpcvideodec/DXVADecoderH264.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp b/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp index 18508608e..6332277be 100644 --- a/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp +++ b/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp @@ -197,10 +197,13 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME m_DXVAPicParams.CurrPic.Index7Bits = nSurfaceIndex;
CHECK_HR (BeginFrame(nSurfaceIndex, pSampleToDeliver));
+
+ m_DXVAPicParams.StatusReportFeedbackNumber++;
+
+ TRACE("CDXVADecoderH264 : Decode frame %u\n", m_DXVAPicParams.StatusReportFeedbackNumber);
// Send picture parameters
CHECK_HR (AddExecuteBuffer (DXVA2_PictureParametersBufferType, sizeof(m_DXVAPicParams), &m_DXVAPicParams));
- m_DXVAPicParams.StatusReportFeedbackNumber++;
CHECK_HR (Execute());
// Add bitstream, slice control and quantization matrix
@@ -210,11 +213,14 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME CHECK_HR (AddExecuteBuffer (DXVA2_InverseQuantizationMatrixBufferType, sizeof (DXVA_Qmatrix_H264), (void*)&m_DXVAScalingMatrix));
// Decode bitstream
- m_DXVAPicParams.StatusReportFeedbackNumber++;
CHECK_HR (Execute());
CHECK_HR (EndFrame(nSurfaceIndex));
+#ifdef _DEBUG
+ DisplayStatus();
+#endif
+
if (AddToStore (nSurfaceIndex, pSampleToDeliver, Nalu.IsRefFrame(), rtStart, rtStop, m_DXVAPicParams.field_pic_flag))
{
// Reset when new picture group detected
@@ -365,3 +371,22 @@ bool CNalu::ReadNext() return true;
}
+
+
+HRESULT CDXVADecoderH264::DisplayStatus()
+{
+ HRESULT hr = E_INVALIDARG;
+ DXVA_Status_H264 Status;
+
+ memset (&Status, 0, sizeof(Status));
+
+ 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);
+
+ return hr;
+}
|