Commit 3c6ac119 authored by Jean-Marc Dressler's avatar Jean-Marc Dressler

Avancement du motion.

parent dabae790
...@@ -249,6 +249,7 @@ void vdec_MotionDummy( macroblock_t * p_mb ) ...@@ -249,6 +249,7 @@ void vdec_MotionDummy( macroblock_t * p_mb )
*****************************************************************************/ *****************************************************************************/
void vdec_MotionFieldField( macroblock_t * p_mb ) void vdec_MotionFieldField( macroblock_t * p_mb )
{ {
#if 0
motion_arg_t args; motion_arg_t args;
args.i_height = 16; args.i_height = 16;
...@@ -282,6 +283,7 @@ void vdec_MotionFieldField( macroblock_t * p_mb ) ...@@ -282,6 +283,7 @@ void vdec_MotionFieldField( macroblock_t * p_mb )
args.i_mv_y = p_mb->pppi_motion_vectors[0][1][1]; args.i_mv_y = p_mb->pppi_motion_vectors[0][1][1];
p_mb->pf_chroma_motion( p_mb, &args ); p_mb->pf_chroma_motion( p_mb, &args );
} }
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -289,6 +291,7 @@ void vdec_MotionFieldField( macroblock_t * p_mb ) ...@@ -289,6 +291,7 @@ void vdec_MotionFieldField( macroblock_t * p_mb )
*****************************************************************************/ *****************************************************************************/
void vdec_MotionField16x8( macroblock_t * p_mb ) void vdec_MotionField16x8( macroblock_t * p_mb )
{ {
#if 0
motion_arg_t args; motion_arg_t args;
args.i_height = 8; args.i_height = 8;
...@@ -342,6 +345,7 @@ void vdec_MotionField16x8( macroblock_t * p_mb ) ...@@ -342,6 +345,7 @@ void vdec_MotionField16x8( macroblock_t * p_mb )
args.i_offset = 8; args.i_offset = 8;
p_mb->pf_chroma_motion( p_mb, &args ); p_mb->pf_chroma_motion( p_mb, &args );
} }
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -358,6 +362,7 @@ void vdec_MotionFieldDMV( macroblock_t * p_mb ) ...@@ -358,6 +362,7 @@ void vdec_MotionFieldDMV( macroblock_t * p_mb )
*****************************************************************************/ *****************************************************************************/
void vdec_MotionFrameFrame( macroblock_t * p_mb ) void vdec_MotionFrameFrame( macroblock_t * p_mb )
{ {
#if 1
motion_arg_t args; motion_arg_t args;
args.b_source_field = args.b_dest_field = 0; args.b_source_field = args.b_dest_field = 0;
...@@ -377,12 +382,12 @@ void vdec_MotionFrameFrame( macroblock_t * p_mb ) ...@@ -377,12 +382,12 @@ void vdec_MotionFrameFrame( macroblock_t * p_mb )
if( p_mb->i_mb_type & MB_MOTION_BACKWARD ) if( p_mb->i_mb_type & MB_MOTION_BACKWARD )
{ {
/* Necessarily MB_MOTION_BACKWARD */
args.p_source = p_mb->p_backward; args.p_source = p_mb->p_backward;
args.i_mv_x = p_mb->pppi_motion_vectors[0][1][0]; args.i_mv_x = p_mb->pppi_motion_vectors[0][1][0];
args.i_mv_y = p_mb->pppi_motion_vectors[0][1][1]; args.i_mv_y = p_mb->pppi_motion_vectors[0][1][1];
p_mb->pf_chroma_motion( p_mb, &args ); p_mb->pf_chroma_motion( p_mb, &args );
} }
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -390,24 +395,29 @@ void vdec_MotionFrameFrame( macroblock_t * p_mb ) ...@@ -390,24 +395,29 @@ void vdec_MotionFrameFrame( macroblock_t * p_mb )
*****************************************************************************/ *****************************************************************************/
void vdec_MotionFrameField( macroblock_t * p_mb ) void vdec_MotionFrameField( macroblock_t * p_mb )
{ {
#if 1
motion_arg_t args; motion_arg_t args;
args.i_height = 8; args.i_height = 8;
args.b_average = 0; args.b_average = 0;
args.i_offset = 0; args.i_offset = 0;
p_mb->i_l_stride <<= 1;
p_mb->i_c_stride <<= 1;
if( p_mb->i_mb_type & MB_MOTION_FORWARD ) if( p_mb->i_mb_type & MB_MOTION_FORWARD )
{ {
args.p_source = p_mb->p_forward; args.p_source = p_mb->p_forward;
#
args.b_source_field = p_mb->ppi_field_select[0][0]; args.b_source_field = p_mb->ppi_field_select[0][0];
args.b_dest_field = 0; args.b_dest_field = 0;
args.i_mv_x = p_mb->pppi_motion_vectors[0][0][0]; args.i_mv_x = p_mb->pppi_motion_vectors[0][0][0];
args.i_mv_y = p_mb->pppi_motion_vectors[0][0][1] >> 1; args.i_mv_y = p_mb->pppi_motion_vectors[0][0][1] >> 1;
p_mb->pf_chroma_motion( p_mb, &args ); // p_mb->pf_chroma_motion( p_mb, &args );
args.b_source_field = p_mb->ppi_field_select[1][0]; p_mb->i_l_y ++;
args.b_dest_field = 1; p_mb->i_c_y ++;
args.b_source_field = p_mb->ppi_field_select[1][0]-1;
//args.b_dest_field = 1;
args.i_mv_x = p_mb->pppi_motion_vectors[1][0][0]; args.i_mv_x = p_mb->pppi_motion_vectors[1][0][0];
args.i_mv_y = p_mb->pppi_motion_vectors[1][0][1] >> 1; args.i_mv_y = p_mb->pppi_motion_vectors[1][0][1] >> 1;
p_mb->pf_chroma_motion( p_mb, &args ); p_mb->pf_chroma_motion( p_mb, &args );
...@@ -431,6 +441,7 @@ void vdec_MotionFrameField( macroblock_t * p_mb ) ...@@ -431,6 +441,7 @@ void vdec_MotionFrameField( macroblock_t * p_mb )
args.i_mv_y = p_mb->pppi_motion_vectors[1][1][1] >> 1; args.i_mv_y = p_mb->pppi_motion_vectors[1][1][1] >> 1;
p_mb->pf_chroma_motion( p_mb, &args ); p_mb->pf_chroma_motion( p_mb, &args );
} }
#endif
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -955,7 +955,12 @@ if( 0 ) ...@@ -955,7 +955,12 @@ if( 0 )
{ {
p_mb->i_mb_type |= MB_MOTION_FORWARD; p_mb->i_mb_type |= MB_MOTION_FORWARD;
} }
/*
if( p_vpar->picture.i_coding_type != I_CODING_TYPE )//!(p_mb->b_P_coding_type & MB_INTRA) )
{
p_mb->i_mb_type |= MB_MOTION_FORWARD;
}
*/
if( 0 ) if( 0 )
//i_count == 249) //i_count == 249)
// i_count != *pi_mb_address) // i_count != *pi_mb_address)
......
...@@ -198,8 +198,9 @@ static void __inline__ ReferenceReplace( vpar_thread_t * p_vpar, ...@@ -198,8 +198,9 @@ static void __inline__ ReferenceReplace( vpar_thread_t * p_vpar,
{ {
if( i_coding_type != B_CODING_TYPE ) if( i_coding_type != B_CODING_TYPE )
{ {
if( p_vpar->sequence.p_backward != NULL ) if( p_vpar->sequence.p_forward != NULL )
vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward ); vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
p_vpar->sequence.p_forward = p_vpar->sequence.p_backward;
p_vpar->sequence.p_backward = p_newref; p_vpar->sequence.p_backward = p_newref;
if( p_newref != NULL ) if( p_newref != NULL )
vout_LinkPicture( p_vpar->p_vout, p_newref ); vout_LinkPicture( p_vpar->p_vout, p_newref );
......
...@@ -146,7 +146,7 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type, ...@@ -146,7 +146,7 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
int i_structure ) int i_structure )
{ {
// return( 1 ); // return( 1 );
// return( i_coding_type == I_CODING_TYPE || i_coding_type == P_CODING_TYPE ); return( i_coding_type == I_CODING_TYPE || i_coding_type == P_CODING_TYPE );
intf_DbgMsg("vpar debug: synchro image %i - modulo is %i\n", i_coding_type, p_vpar->synchro.modulo); intf_DbgMsg("vpar debug: synchro image %i - modulo is %i\n", i_coding_type, p_vpar->synchro.modulo);
intf_DbgMsg("vpar debug: synchro predict P %e - predict B %e\n", p_vpar->synchro.p_count_predict, p_vpar->synchro.b_count_predict); intf_DbgMsg("vpar debug: synchro predict P %e - predict B %e\n", p_vpar->synchro.p_count_predict, p_vpar->synchro.b_count_predict);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment