comparison motion_est.c @ 587:4d41fe7eb780 libavcodec

b frame direct mode bugfix (bug found by CM <chenm001 at 163 dot com>)
author michaelni
date Wed, 31 Jul 2002 08:01:29 +0000
parents f74798aca30e
children 98e39397636b
comparison
equal deleted inserted replaced
586:54b1c94977d5 587:4d41fe7eb780
1432 const int time_pp= s->pp_time; 1432 const int time_pp= s->pp_time;
1433 const int time_bp= s->bp_time; 1433 const int time_bp= s->bp_time;
1434 const int time_pb= time_pp - time_bp; 1434 const int time_pb= time_pp - time_bp;
1435 int bx, by; 1435 int bx, by;
1436 int mx, my, mx2, my2; 1436 int mx, my, mx2, my2;
1437 uint8_t *ref_picture= s->me_scratchpad - (mb_x + 1 + (mb_y + 1)*s->linesize)*16; 1437 uint8_t *ref_picture= s->me_scratchpad - (mb_x - 1 + (mb_y - 1)*s->linesize)*16;
1438 int16_t (*mv_table)[2]= s->b_direct_mv_table; 1438 int16_t (*mv_table)[2]= s->b_direct_mv_table;
1439 uint16_t *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame 1439 uint16_t *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame
1440 1440
1441 /* thanks to iso-mpeg the rounding is different for the zero vector, so we need to handle that ... */ 1441 /* thanks to iso-mpeg the rounding is different for the zero vector, so we need to handle that ... */
1442 motion_fx= (motion_px*time_pb)/time_pp; 1442 motion_fx= (motion_px*time_pb)/time_pp;