diff options
author | Spec-Chum <spec-chum@users.sourceforge.net> | 2010-06-03 02:02:11 +0400 |
---|---|---|
committer | Spec-Chum <spec-chum@users.sourceforge.net> | 2010-06-03 02:02:11 +0400 |
commit | 07925f587f5595f0adf752a1864bb9b95c369a2e (patch) | |
tree | 777f0e299f55fa6cf0e6eaf82e98ade31031b0e1 /src/filters/parser/RealMediaSplitter | |
parent | 33d36dfe9ce61e8d494e6d6cfe3a9caafc1c4489 (diff) |
Fix .rmvb interlaced decoding (ticket #513)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2000 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/RealMediaSplitter')
-rw-r--r-- | src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp | 16 | ||||
-rw-r--r-- | src/filters/parser/RealMediaSplitter/RealMediaSplitter.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp index 790c44e7a..7217f58be 100644 --- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp +++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp @@ -1553,12 +1553,12 @@ HRESULT CRealVideoDecoder::Transform(IMediaSample* pIn) int size = tmp1*tmp2;
if( m_lastBuffSizeDim < size )
{
- m_pI420.Free();
- m_pI420Tmp.Free();
+ _aligned_free(m_pI420);
+ _aligned_free(m_pI420Tmp);
m_lastBuffSizeDim = size;
ATLTRACE("resize out put buff %d" ,size);
- if ( m_pI420.Allocate(size*3/2) )
+ if ( m_pI420 = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16)))
{
ATLTRACE(" m_pI420.Allocated 1" );
memset(m_pI420, 0, size);
@@ -1571,7 +1571,7 @@ HRESULT CRealVideoDecoder::Transform(IMediaSample* pIn) ATLTRACE(" m_pI420.Allocate fail %d" ,size*3/2);
return S_OK;
}
- if( m_pI420Tmp.Allocate(size*3/2) )
+ if( m_pI420Tmp = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16)))
{
ATLTRACE(" m_pI420Tmp.Allocated 1" );
memset(m_pI420Tmp, 0, size);
@@ -1830,10 +1830,10 @@ HRESULT CRealVideoDecoder::StartStreaming() int size = m_w*m_h;
m_lastBuffSizeDim = size;
- m_pI420.Allocate(size*3/2);
+ m_pI420 = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16));
memset(m_pI420, 0, size);
memset(m_pI420 + size, 0x80, size/2);
- m_pI420Tmp.Allocate(size*3/2);
+ m_pI420Tmp = static_cast<BYTE*>(_aligned_malloc(size*3/2, 16));
memset(m_pI420Tmp, 0, size);
memset(m_pI420Tmp + size, 0x80, size/2);
@@ -1842,8 +1842,8 @@ HRESULT CRealVideoDecoder::StartStreaming() HRESULT CRealVideoDecoder::StopStreaming()
{
- m_pI420.Free();
- m_pI420Tmp.Free();
+ _aligned_free(m_pI420);
+ _aligned_free(m_pI420Tmp);
FreeRV();
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.h b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.h index 1d725661b..b66c3c495 100644 --- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.h +++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.h @@ -242,7 +242,7 @@ CRealVideoDecoder : public CBaseVideoFilter void ResizeHeight(BYTE* pIn, DWORD wi, DWORD hi, BYTE* pOut, DWORD wo, DWORD ho);
void ResizeRow(BYTE* pIn, DWORD wi, DWORD dpi, BYTE* pOut, DWORD wo, DWORD dpo);
- CAutoVectorPtr<BYTE> m_pI420, m_pI420Tmp;
+ BYTE* m_pI420, *m_pI420Tmp;
public:
CRealVideoDecoder(LPUNKNOWN lpunk, HRESULT* phr);
|