diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-04-13 15:15:36 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-04-13 15:15:36 +0400 |
commit | 174d4ec1734779bdee312135c7c95e867c4a2881 (patch) | |
tree | 93613522bff0ab6770f98ac7e5159a9d1c12cda9 /src/filters/transform/mpcvideodec/DXVADecoderH264.cpp | |
parent | 0d7f35e74adfc0ab10f6a0e29064466318b07c7d (diff) |
FIXED : Macroblocks for somes files with H264 DXVA decoder
FIXED : VC1 decoder broken in release 488
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@492 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoderH264.cpp')
-rw-r--r-- | src/filters/transform/mpcvideodec/DXVADecoderH264.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp b/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp index 082f7137d..8d8c10dff 100644 --- a/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp +++ b/src/filters/transform/mpcvideodec/DXVADecoderH264.cpp @@ -139,10 +139,10 @@ void CDXVADecoderH264::CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSi memcpy (pDXVABuffer+3, (BYTE*)pDataSlice+m_nNALLength, Nalu.len-m_nNALLength);
// Add trailing bit
- pDXVABuffer[Nalu.len-1] = 0x00;
+ pDXVABuffer[Nalu.len+3-m_nNALLength] = 0x00;
- pDXVABuffer += Nalu.len;
- nSize += Nalu.len;
+ pDXVABuffer += Nalu.len + 4 - m_nNALLength;
+ nSize += Nalu.len + 4 - m_nNALLength;
}
else
{
@@ -209,6 +209,7 @@ HRESULT CDXVADecoderH264::DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME nSliceSize -= Nalu.len;
}
}
+ m_nMaxWaiting = min (max (m_DXVAPicParams.num_ref_frames, 3), 8);
// Parse slice header and set DX destination surface
CHECK_HR (FFH264ReadSlideHeader (&m_DXVAPicParams, &m_DXVAScalingMatrix, m_pFilter->GetAVCtx(), pDataSlice+ m_nNALLength, nSliceSize - m_nNALLength));
@@ -252,8 +253,6 @@ void CDXVADecoderH264::SetExtraData (BYTE* pDataIn, UINT nSize) AVCodecContext* pAVCtx = m_pFilter->GetAVCtx();
m_nNALLength = pAVCtx->nal_length_size;
FFH264DecodeBuffer (pAVCtx, pDataIn, nSize);
-
- m_nMaxWaiting = min (max (m_DXVAPicParams.num_ref_frames, 3), 8); // TODO : find better solution...
}
|