s->b_bidir_forw_mv_table[xy][0]= s->b_forw_mv_table[xy][0]; s->b_bidir_forw_mv_table[xy][1]= s->b_forw_mv_table[xy][1]; s->b_bidir_back_mv_table[xy][0]= s->b_back_mv_table[xy][0]; s->b_bidir_back_mv_table[xy][1]= s->b_back_mv_table[xy][1];  s->mb_type[mb_y*s->mb_width + mb_x]= MB_TYPE_FORWARD;
fbmin= bidir_refine(s, mb_x, mb_y);  if(s->flags&CODEC_FLAG_HQ){ type= MB_TYPE_FORWARD | MB_TYPE_BACKWARD | MB_TYPE_BIDIR | MB_TYPE_DIRECT; }else{ int score= dmin; type=MB_TYPE_DIRECT;  if(fmin<score){ score=fmin; type= MB_TYPE_FORWARD; } if(bmin<score){ score=bmin; type= MB_TYPE_BACKWARD; } if(fbmin<score){ score=fbmin; type= MB_TYPE_BIDIR; } s->mc_mb_var += score; }  s->mb_type[mb_y*s->mb_width + mb_x]= type;
void ff_estimate_b_frame_motion(MpegEncContext * s,                             int mb_x, int mb_y){    const int mot_stride = s->mb_width + 2;    const int xy = (mb_y + 1)*mot_stride + mb_x + 1;    ff_estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, s->last_picture[0], s->f_code);    ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, s->next_picture[0], s->b_code);//printf(" %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]);    s->b_bidir_forw_mv_table[xy][0]= s->b_forw_mv_table[xy][0];    s->b_bidir_forw_mv_table[xy][1]= s->b_forw_mv_table[xy][1];    s->b_bidir_back_mv_table[xy][0]= s->b_back_mv_table[xy][0];    s->b_bidir_back_mv_table[xy][1]= s->b_back_mv_table[xy][1];        s->mb_type[mb_y*s->mb_width + mb_x]= MB_TYPE_FORWARD; //FIXME}