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.17 2004-02-03 06:57:24 syskin Exp $ |
* $Id: CXvidDecoder.cpp,v 1.1.2.18 2004-02-07 03:57:39 syskin Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
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; |
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 |
{ |
{ |
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); |