[svn] / branches / dev-api-4 / xvidcore / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/dshow/src/CXvidDecoder.cpp

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

revision 1345, Sat Jan 31 13:44:56 2004 UTC revision 1353, Sat Feb 7 03:57:39 2004 UTC
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: CXvidDecoder.cpp,v 1.1.2.16 2004-01-31 13:44:33 suxen_drol Exp $   * $Id: CXvidDecoder.cpp,v 1.1.2.18 2004-02-07 03:57:39 syskin Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 63  Line 63 
63  #include "config.h"  #include "config.h"
64  #include "debug.h"  #include "debug.h"
65    
   
 static int rgb_flip;  
66  static bool USE_IYUV;  static bool USE_IYUV;
67  static bool USE_YV12;  static bool USE_YV12;
68  static bool USE_YUY2;  static bool USE_YUY2;
# Line 331  Line 329 
329                  hdr = &vih->bmiHeader;                  hdr = &vih->bmiHeader;
330                  /* PAR (x:y) is (1/ppm_X):(1/ppm_Y) where ppm is pixels-per-meter                  /* PAR (x:y) is (1/ppm_X):(1/ppm_Y) where ppm is pixels-per-meter
331                     which is equal to ppm_Y:ppm_X */                     which is equal to ppm_Y:ppm_X */
332                  ar_x = vih->bmiHeader.biYPelsPerMeter*hdr->biWidth;                  ar_x = vih->bmiHeader.biYPelsPerMeter * abs(hdr->biWidth);
333                  ar_y = vih->bmiHeader.biXPelsPerMeter*hdr->biHeight;                  ar_y = vih->bmiHeader.biXPelsPerMeter * abs(hdr->biHeight);
334          }          }
335          else if (*mtIn->FormatType() == FORMAT_VideoInfo2)          else if (*mtIn->FormatType() == FORMAT_VideoInfo2)
336          {          {
# Line 401  Line 399 
399                  return E_OUTOFMEMORY;                  return E_OUTOFMEMORY;
400          }          }
401    
402          ZeroMemory(vih, sizeof (VIDEOINFOHEADER));          ZeroMemory(vih, sizeof (VIDEOINFOHEADER2));
403          vih->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);          vih->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
404          vih->bmiHeader.biWidth  = m_create.width;          vih->bmiHeader.biWidth  = m_create.width;
405          vih->bmiHeader.biHeight = m_create.height;          vih->bmiHeader.biHeight = m_create.height;
# Line 498  Line 496 
496                  vih->dwPictAspectRatioY = ar_y;                  vih->dwPictAspectRatioY = ar_y;
497          } else { // just to be safe          } else { // just to be safe
498                  vih->dwPictAspectRatioX = m_create.width;                  vih->dwPictAspectRatioX = m_create.width;
499                  vih->dwPictAspectRatioY = m_create.height;                  vih->dwPictAspectRatioY = abs(m_create.height);
500          }          }
501    
502          mtOut->SetType(&MEDIATYPE_Video);          mtOut->SetType(&MEDIATYPE_Video);

Legend:
Removed from v.1345  
changed lines
  Added in v.1353

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