/* Picture static properties - those properties are fixed at initialization
* and should NOT be modified */
int i_width; /* picture width */
- int i_height; /* picture height */
int i_chroma_width; /* chroma width */
+ int i_height; /* picture height */
+ int i_size; /* number of pels */
+ int i_chroma_size; /* number of chroma pels */
/* Picture dynamic properties - those properties can be changed by the
* decoder */
* vdec_motion_common.c : common motion compensation routines common
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vdec_motion_common.c,v 1.4 2001/02/19 19:08:59 massiot Exp $
+ * $Id: vdec_motion_common.c,v 1.5 2001/02/20 15:03:00 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
+ b_source_field)
* p_mb->p_picture->i_width
+ (i_mv_y >> 1) * i_l_stride;
- if( i_source_offset >= p_source->i_width * p_source->i_height )
+
+ if( i_source_offset >= p_source->i_size )
{
intf_WarnMsg( 2, "Bad motion vector (lum)" );
return;
+ b_source_field)
* p_mb->p_picture->i_chroma_width
+ ((i_mv_y/2) >> 1) * i_c_stride;
- if( i_source_offset >= (p_source->i_width * p_source->i_height) / 4 )
+
+ if( i_source_offset >= p_source->i_chroma_size )
{
intf_WarnMsg( 2, "Bad motion vector (chroma)" );
return;
p_free_picture->i_width = i_width;
p_free_picture->i_height = i_height;
p_free_picture->i_chroma_width = i_chroma_width;
+ p_free_picture->i_size = i_width * i_height;
+ p_free_picture->i_chroma_size = i_chroma_width
+ * i_height;
p_free_picture->i_display_horizontal_offset = 0;
p_free_picture->i_display_vertical_offset = 0;
p_free_picture->i_display_width = i_width;
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.75 2001/02/18 03:32:02 polux Exp $
+ * $Id: video_parser.c,v 1.76 2001/02/20 15:03:00 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#endif
/* Initialize lookup tables */
-#if defined(MPEG2_COMPLIANT) && !defined(VDEC_DFT)
- vpar_InitCrop( p_vpar );
-#endif
vpar_InitMbAddrInc( p_vpar );
vpar_InitDCTTables( p_vpar );
vpar_InitPMBType( p_vpar );