break; \
case 2: \
MotionComponent_x_Y_copy_##width##_##height (p_src, p_dest, \
- i_stride, \
- i_step); \
+ i_stride); \
break; \
case 3: \
MotionComponent_X_Y_copy_##width##_##height (p_src, p_dest, \
- i_stride, \
- i_step); \
+ i_stride); \
break; \
} \
} \
break; \
case 2: \
MotionComponent_x_Y_avg_##width##_##height (p_src, p_dest, \
- i_stride, \
- i_step); \
+ i_stride); \
break; \
case 3: \
MotionComponent_X_Y_avg_##width##_##height (p_src, p_dest, \
- i_stride, \
- i_step); \
+ i_stride); \
break; \
} \
} \
int i_height, /* (explicit) height of block */
int i_stride, /* number of coeffs to jump
* between each predicted line */
- int i_step, /* number of coeffs to jump to
- * go to the next line of the
- * field */
int i_select, /* half-pel vectors */
boolean_t b_average /* (explicit) averaging of several
* predictions */ )
+ (p_mb->i_motion_l_y + i_offset
+ b_source_field)
* p_mb->p_picture->i_width
- + (i_mv_y >> 1) * p_mb->i_l_stride;
+ + (i_mv_y >> 1) * i_l_stride;
if( i_source_offset >= p_source->i_width * p_source->i_height )
{
intf_ErrMsg( "vdec error: bad motion vector (lum)\n" );
/* destination */
p_mb->p_picture->p_y
+ (p_mb->i_l_x)
- + (p_mb->i_motion_l_y + b_dest_field)
+ + (p_mb->i_motion_l_y + b_dest_field + i_offset)
* p_mb->p_picture->i_width,
/* prediction width and height */
16, i_height,
/* stride */
- i_l_stride, p_mb->i_l_stride,
+ i_l_stride,
/* select */
((i_mv_y & 1) << 1) | (i_mv_x & 1),
b_average );
+ (p_mb->i_motion_c_y + (i_offset >> 1)
+ b_source_field)
* p_mb->p_picture->i_chroma_width
- + ((i_mv_y/2) >> 1) * p_mb->i_c_stride;
+ + ((i_mv_y/2) >> 1) * i_c_stride;
if( i_source_offset >= (p_source->i_width * p_source->i_height) / 4 )
{
intf_ErrMsg( "vdec error: bad motion vector (chroma)\n" );
}
i_dest_offset = (p_mb->i_c_x)
- + (p_mb->i_motion_c_y + b_dest_field)
+ + (p_mb->i_motion_c_y + b_dest_field
+ + (i_offset >> 1))
* p_mb->p_picture->i_chroma_width;
i_c_height = i_height >> 1;
i_c_select = (((i_mv_y/2) & 1) << 1) | ((i_mv_x/2) & 1);
+ i_source_offset,
p_mb->p_picture->p_u
+ i_dest_offset,
- 8, i_c_height, i_c_stride, p_mb->i_c_stride,
+ 8, i_c_height, i_c_stride,
i_c_select, b_average );
/* Chrominance Cb */
+ i_source_offset,
p_mb->p_picture->p_v
+ i_dest_offset,
- 8, i_c_height, i_c_stride, p_mb->i_c_stride,
+ 8, i_c_height, i_c_stride,
i_c_select, b_average );
}
/* prediction width and height */
16, i_height,
/* stride */
- i_l_stride, p_mb->i_l_stride,
+ i_l_stride,
/* select */
((i_mv_y & 1) << 1) | (i_mv_x & 1),
b_average );
+ i_source_offset,
p_mb->p_picture->p_u
+ i_dest_offset,
- 8, i_height, i_c_stride, p_mb->i_c_stride,
+ 8, i_height, i_c_stride,
i_c_select, b_average );
/* Chrominance Cb */
+ i_source_offset,
p_mb->p_picture->p_u
+ i_dest_offset,
- 8, i_height, i_c_stride, p_mb->i_c_stride,
+ 8, i_height, i_c_stride,
i_c_select, b_average );
#endif
}
+ i_source_offset,
p_mb->p_picture->p_y
+ i_dest_offset,
- 16, i_height, i_l_stride, p_mb->i_l_stride,
+ 16, i_height, i_l_stride,
i_select, b_average );
/* Chrominance Cr */
+ i_source_offset,
p_mb->p_picture->p_u
+ i_dest_offset,
- 16, i_height, i_l_stride, p_mb->i_l_stride,
+ 16, i_height, i_l_stride,
i_select, b_average );
/* Chrominance Cb */
+ i_source_offset,
p_mb->p_picture->p_v
+ i_dest_offset,
- 16, i_height, i_l_stride, p_mb->i_l_stride,
+ 16, i_height, i_l_stride,
i_select, b_average );
#endif
}
{ \
MOTION( p_mb, p_mb->p_forward, p_mb->ppi_field_select[0][0], 0, \
p_mb->pppi_motion_vectors[0][0][0], \
- p_mb->pppi_motion_vectors[0][0][1], \
+ p_mb->pppi_motion_vectors[0][0][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 0 ); \
\
MOTION( p_mb, p_mb->p_forward, p_mb->ppi_field_select[1][0], 1, \
p_mb->pppi_motion_vectors[1][0][0], \
- p_mb->pppi_motion_vectors[1][0][1], \
+ p_mb->pppi_motion_vectors[1][0][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 0 ); \
\
if( p_mb->i_mb_type & MB_MOTION_BACKWARD ) \
MOTION( p_mb, p_mb->p_backward, \
p_mb->ppi_field_select[0][1], 0, \
p_mb->pppi_motion_vectors[0][1][0], \
- p_mb->pppi_motion_vectors[0][1][1], \
+ p_mb->pppi_motion_vectors[0][1][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 1 ); \
\
MOTION( p_mb, p_mb->p_backward, \
p_mb->ppi_field_select[1][1], 1, \
p_mb->pppi_motion_vectors[1][1][0], \
- p_mb->pppi_motion_vectors[1][1][1], \
+ p_mb->pppi_motion_vectors[1][1][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 1 ); \
} \
} \
{ \
MOTION( p_mb, p_mb->p_backward, p_mb->ppi_field_select[0][1], 0,\
p_mb->pppi_motion_vectors[0][1][0], \
- p_mb->pppi_motion_vectors[0][1][1], \
+ p_mb->pppi_motion_vectors[0][1][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 0 ); \
\
MOTION( p_mb, p_mb->p_backward, p_mb->ppi_field_select[1][1], 1,\
p_mb->pppi_motion_vectors[1][1][0], \
- p_mb->pppi_motion_vectors[1][1][1], \
+ p_mb->pppi_motion_vectors[1][1][1] >> 1, \
i_l_stride, i_c_stride, 8, 0, 0 ); \
} \
} /* FRAMEFIELD */
#define __MotionComponent_x_Y_copy(width,height) \
void MotionComponent_x_Y_copy_##width##_##height(yuv_data_t * p_src, \
yuv_data_t * p_dest, \
- int i_stride, \
- int i_step) \
+ int i_stride) \
{ \
int i_x, i_y; \
\
for( i_x = 0; i_x < width; i_x++ ) \
{ \
p_dest[i_x] = (unsigned int)(p_src[i_x] \
- + p_src[i_x + i_step] \
+ + p_src[i_x + i_stride] \
+ 1) >> 1; \
} \
p_dest += i_stride; \
#define __MotionComponent_X_Y_copy(width,height) \
void MotionComponent_X_Y_copy_##width##_##height(yuv_data_t * p_src, \
yuv_data_t * p_dest, \
- int i_stride, \
- int i_step) \
+ int i_stride) \
{ \
int i_x, i_y; \
\
{ \
p_dest[i_x] = (unsigned int)(p_src[i_x] \
+ p_src[i_x + 1] \
- + p_src[i_x + i_step] \
- + p_src[i_x + i_step + 1] \
+ + p_src[i_x + i_stride] \
+ + p_src[i_x + i_stride + 1] \
+ 2) >> 2; \
} \
p_dest += i_stride; \
#define __MotionComponent_x_Y_avg(width,height) \
void MotionComponent_x_Y_avg_##width##_##height(yuv_data_t * p_src, \
yuv_data_t * p_dest, \
- int i_stride, \
- int i_step) \
+ int i_stride) \
{ \
int i_x, i_y; \
unsigned int i_dummy; \
{ \
i_dummy = \
p_dest[i_x] + ((unsigned int)(p_src[i_x] \
- + p_src[i_x + i_step] \
+ + p_src[i_x + i_stride] \
+ 1) >> 1); \
p_dest[i_x] = (i_dummy + 1) >> 1; \
} \
#define __MotionComponent_X_Y_avg(width,height) \
void MotionComponent_X_Y_avg_##width##_##height(yuv_data_t * p_src, \
yuv_data_t * p_dest, \
- int i_stride, \
- int i_step) \
+ int i_stride) \
{ \
int i_x, i_y; \
unsigned int i_dummy; \
{ \
i_dummy = \
p_dest[i_x] + ((unsigned int)(p_src[i_x] \
- + p_src[i_x + 1] \
- + p_src[i_x + i_step] \
- + p_src[i_x + i_step + 1] \
- + 2) >> 2); \
+ + p_src[i_x + 1] \
+ + p_src[i_x + i_stride] \
+ + p_src[i_x + i_stride + 1] \
+ + 2) >> 2); \
p_dest[i_x] = (i_dummy + 1) >> 1; \
} \
p_dest += i_stride; \