--- trunk/xvidcore/dshow/src/CXvidDecoder.cpp 2011/02/14 16:59:16 1949 +++ trunk/xvidcore/dshow/src/CXvidDecoder.cpp 2011/05/18 16:12:47 1994 @@ -3,8 +3,8 @@ * XVID MPEG-4 VIDEO CODEC * - Xvid Decoder part of the DShow Filter - * - * Copyright(C) 2002-2010 Peter Ross - * 2003-2010 Michael Militzer + * Copyright(C) 2002-2011 Peter Ross + * 2003-2011 Michael Militzer * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: CXvidDecoder.cpp,v 1.28 2011-02-14 16:59:16 Isibaar Exp $ + * $Id: CXvidDecoder.cpp,v 1.29 2011-03-17 15:11:32 Isibaar Exp $ * ****************************************************************************/ @@ -312,8 +312,6 @@ /* constructor */ -#define XVID_DLL_NAME "xvidcore.dll" - CXvidDecoder::CXvidDecoder(LPUNKNOWN punk, HRESULT *phr) : CVideoTransformFilter(NAME("CXvidDecoder"), punk, CLSID_XVID), m_hdll (NULL) { @@ -816,7 +814,7 @@ /* (internal function) change colorspace */ #define CALC_BI_STRIDE(width,bitcount) ((((width * bitcount) + 31) & ~31) >> 3) -HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format) +HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format, int noflip) { DWORD biWidth; @@ -839,6 +837,8 @@ return S_FALSE; } + if (noflip) rgb_flip = 0; + if (subtype == CLSID_MEDIASUBTYPE_IYUV) { DPRINTF("IYUV"); @@ -912,7 +912,7 @@ if (direction == PINDIR_OUTPUT) { - return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format()); + return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format(), 0); } return S_OK; @@ -1049,7 +1049,7 @@ { HRESULT result; - result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat); + result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat, 0); DeleteMediaType(mtOut); if (result != S_OK) @@ -1630,7 +1630,7 @@ hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am); if (SUCCEEDED(hr)) { - if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat))) { + if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat, 1))) { DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)"); return MF_E_INVALIDTYPE; }