[cvs] / xvidcore / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Diff of /xvidcore/dshow/src/CXvidDecoder.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28, Mon Feb 14 16:59:16 2011 UTC revision 1.29, Thu Mar 17 15:11:32 2011 UTC
# Line 816  Line 816 
816  /* (internal function) change colorspace */  /* (internal function) change colorspace */
817  #define CALC_BI_STRIDE(width,bitcount)  ((((width * bitcount) + 31) & ~31) >> 3)  #define CALC_BI_STRIDE(width,bitcount)  ((((width * bitcount) + 31) & ~31) >> 3)
818    
819  HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format)  HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format, int noflip)
820  {  {
821          DWORD biWidth;          DWORD biWidth;
822    
# Line 839  Line 839 
839                  return S_FALSE;                  return S_FALSE;
840          }          }
841    
842            if (noflip) rgb_flip = 0;
843    
844          if (subtype == CLSID_MEDIASUBTYPE_IYUV)          if (subtype == CLSID_MEDIASUBTYPE_IYUV)
845          {          {
846                  DPRINTF("IYUV");                  DPRINTF("IYUV");
# Line 912  Line 914 
914    
915          if (direction == PINDIR_OUTPUT)          if (direction == PINDIR_OUTPUT)
916          {          {
917                  return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format());                  return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format(), 0);
918          }          }
919    
920          return S_OK;          return S_OK;
# Line 1049  Line 1051 
1051          {          {
1052                  HRESULT result;                  HRESULT result;
1053    
1054                  result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat);                  result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat, 0);
1055                  DeleteMediaType(mtOut);                  DeleteMediaType(mtOut);
1056    
1057                  if (result != S_OK)                  if (result != S_OK)
# Line 1630  Line 1632 
1632                          hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am);                          hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am);
1633    
1634                          if (SUCCEEDED(hr)) {                          if (SUCCEEDED(hr)) {
1635                                  if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat))) {                                  if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat, 1))) {
1636                                          DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)");                                          DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)");
1637                                          return MF_E_INVALIDTYPE;                                          return MF_E_INVALIDTYPE;
1638                                  }                                  }

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4