Lines Matching refs:mb_y
161 assert((fy>>1) + 16*s->mb_y >= -16);
163 assert((fy>>1) + 16*s->mb_y <= s->height);
165 assert((by>>1) + 16*s->mb_y >= -16);
167 assert((by>>1) + 16*s->mb_y <= s->height);
381 *my_ptr = 16 * s->mb_y;
503 const int xy= s->mb_x + s->mb_y*s->mb_stride;
669 dmin_sum += s->dsp.mb_cmp[0](s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*16*stride, c->scratchpad, stride, 16);
681 offset= (s->mb_x*8 + (mx>>1)) + (s->mb_y*8 + (my>>1))*s->uvlinesize;
691 dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad , s->uvlinesize, 8);
692 dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad+8, s->uvlinesize, 8);
734 const int xy= s->mb_x + s->mb_y*mot_stride;
853 static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int p_type){
856 int mb_xy= mb_x + mb_y*s->mb_stride;
857 int xy= 2*mb_x + 2*mb_y*s->b8_stride;
990 int mb_x, int mb_y)
1002 init_ref(c, s->new_picture.f.data, s->last_picture.f.data, NULL, 16*mb_x, 16*mb_y, 0);
1013 get_limits(s, 16*mb_x, 16*mb_y);
1021 pic->mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8;
1022 pic->mb_var [s->mb_stride * mb_y + mb_x] = (varc+128)>>8;
1026 vard= check_input_motion(s, mb_x, mb_y, 1);
1031 pic->mc_mb_var[s->mb_stride * mb_y + mb_x] = (vard+128)>>8;
1037 mb_type= s->mb_type[mb_x + mb_y*s->mb_stride];
1045 my-= mb_y*16;
1094 pic->mc_mb_var[s->mb_stride * mb_y + mb_x] = (vard+128)>>8;
1095 // pic->mb_cmp_score[s->mb_stride * mb_y + mb_x] = dmin;
1174 // pic->mb_cmp_score[s->mb_stride * mb_y + mb_x] = dmin;
1197 s->current_picture.f.mb_type[mb_y*s->mb_stride + mb_x] = CANDIDATE_MB_TYPE_INTRA; //FIXME cleanup
1199 s->current_picture.f.mb_type[mb_y*s->mb_stride + mb_x] = 0;
1208 s->mb_type[mb_y*s->mb_stride + mb_x]= mb_type;
1212 int mb_x, int mb_y)
1218 const int xy= mb_x + mb_y*s->mb_stride;
1219 init_ref(c, s->new_picture.f.data, s->last_picture.f.data, NULL, 16*mb_x, 16*mb_y, 0);
1226 get_limits(s, 16*mb_x, 16*mb_y);
1265 int mb_x, int mb_y, int16_t (*mv_table)[2], int ref_index, int f_code)
1272 const int mot_xy = mb_y*mot_stride + mb_x;
1281 get_limits(s, 16*mb_x, 16*mb_y);
1289 my-= mb_y*16;
1332 //printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my);
1333 // s->mb_type[mb_y*s->mb_width + mb_x]= mb_type;
1405 static inline int bidir_refine(MpegEncContext * s, int mb_x, int mb_y)
1409 const int xy = mb_y *mot_stride + mb_x;
1553 static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y)
1558 const int mot_xy = mb_y*mot_stride + mb_x;
1596 max+= 16*mb_y + 1; // +-1 is for the simpler rounding
1597 min+= 16*mb_y - 1;
1645 get_limits(s, 16*mb_x, 16*mb_y); //restore c->?min/max, maybe not needed
1656 int mb_x, int mb_y)
1662 const int xy = mb_y*s->mb_stride + mb_x;
1664 s->next_picture.f.data, 16 * mb_x, 16 * mb_y, 2);
1666 get_limits(s, 16*mb_x, 16*mb_y);
1671 int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0
1675 s->current_picture.mc_mb_var[mb_y*s->mb_stride + mb_x] = score; //FIXME use SSE
1676 s->mb_type[mb_y*s->mb_stride + mb_x]= CANDIDATE_MB_TYPE_DIRECT0;
1682 int vard= check_input_motion(s, mb_x, mb_y, 0);
1689 // pic->mb_var [s->mb_stride * mb_y + mb_x] = (varc+128)>>8;
1690 s->current_picture.mc_mb_var[s->mb_stride * mb_y + mb_x] = (vard+128)>>8;
1691 /* pic->mb_mean [s->mb_stride * mb_y + mb_x] = (sum+128)>>8;
1702 type= s->mb_type[mb_y*s->mb_stride + mb_x];
1704 direct_search(s, mb_x, mb_y);
1708 ff_estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code);
1712 ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code);
1733 dmin= direct_search(s, mb_x, mb_y);
1738 fmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) + 3*penalty_factor;
1741 bmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code) + 2*penalty_factor;
1745 fbmin= bidir_refine(s, mb_x, mb_y) + penalty_factor;
1789 s->current_picture.mc_mb_var[mb_y*s->mb_stride + mb_x] = score; //FIXME use SSE
1807 s->mb_type[mb_y*s->mb_stride + mb_x]= type;