Lines Matching refs:mb_x
365 s->m.mb_x=
576 static int get_dc(SnowContext *s, int mb_x, int mb_y, int plane_index){
589 int index= mb_x + mb_y*b_stride;
600 int mb_x2= mb_x + (i &1) - 1;
610 int index= x2-(block_w*mb_x - block_w/2) + (y2-(block_w*mb_y - block_w/2))*obmc_stride;
669 static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, const uint8_t *obmc_edged){
687 int sx= block_w*mb_x - block_w/2;
695 ff_snow_pred_block(s, cur, tmp, ref_stride, sx, sy, block_w*2, block_w*2, &s->block[mb_x + mb_y*b_stride], plane_index, w, h);
716 && (mb_x == 0 || mb_x == b_stride-1)
718 if(mb_x == 0)
759 rate += get_block_bits(s, mb_x + (i&1) - (i>>1), mb_y + (i>>1), 1);
761 if(mb_x == b_stride-2)
762 rate += get_block_bits(s, mb_x + 1, mb_y + 1, 1);
767 static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){
788 int mb_x2= mb_x + (i%3) - 1;
815 BlockNode *b= &s->block[mb_x+mb_y*b_stride];
824 rate = get_block_bits(s, mb_x, mb_y, 2);
827 rate += get_block_bits(s, mb_x + dxy[i][0], mb_y + dxy[i][1], 1);
960 static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){
962 BlockNode *block= &s->block[mb_x + mb_y * b_stride];
967 assert(mb_x>=0 && mb_y>=0);
968 assert(mb_x<b_stride);
987 rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);
1001 static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){
1003 return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);
1006 static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){
1008 BlockNode *block= &s->block[mb_x + mb_y * b_stride];
1013 assert(mb_x>=0 && mb_y>=0);
1014 assert(mb_x<b_stride);
1015 assert(((mb_x|mb_y)&1) == 0);
1029 rd= get_4block_rd(s, mb_x, mb_y, 0);
1045 int pass, mb_x, mb_y;
1056 for(mb_x= 0; mb_x<s->b_width; mb_x++)
1057 encode_q_branch(s, 0, mb_x, mb_y);
1066 for(mb_x= 0; mb_x<b_width; mb_x++){
1070 const int index= mb_x + mb_y * b_stride;
1073 BlockNode *lb = mb_x ? &s->block[index -1] : NULL;
1074 BlockNode *rb = mb_x+1<b_width ? &s->block[index +1] : NULL;
1076 BlockNode *tlb= mb_x && mb_y ? &s->block[index-b_stride-1] : NULL;
1077 BlockNode *trb= mb_x+1<b_width && mb_y ? &s->block[index-b_stride+1] : NULL;
1078 BlockNode *blb= mb_x && mb_y+1<b_height ? &s->block[index+b_stride-1] : NULL;
1079 BlockNode *brb= mb_x+1<b_width && mb_y+1<b_height ? &s->block[index+b_stride+1] : NULL;
1097 if(mb_x==0)
1100 if(mb_x==b_stride-1)
1118 if(mb_x==0 || mb_y==0 || mb_x==b_width-1 || mb_y==b_height-1){
1123 const int sx= block_w*mb_x - block_w/2;
1145 color[i]= get_dc(s, mb_x, mb_y, i);
1150 check_block(s, mb_x, mb_y, color0, 1, *obmc_edged, &best_rd);
1152 check_block_inter(s, mb_x, mb_y, block->mx, block->my, *obmc_edged, &best_rd);
1163 check_block_inter(s, mb_x, mb_y, mvr[0][0], mvr[0][1], *obmc_edged, &best_rd);
1164 check_block_inter(s, mb_x, mb_y, 0, 0, *obmc_edged, &best_rd);
1166 check_block_inter(s, mb_x, mb_y, mvr[-b_stride][0], mvr[-b_stride][1], *obmc_edged, &best_rd);
1168 check_block_inter(s, mb_x, mb_y, mvr[-1][0], mvr[-1][1], *obmc_edged, &best_rd);
1170 check_block_inter(s, mb_x, mb_y, mvr[1][0], mvr[1][1], *obmc_edged, &best_rd);
1172 check_block_inter(s, mb_x, mb_y, mvr[b_stride][0], mvr[b_stride][1], *obmc_edged, &best_rd);
1180 dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my+(4*j), *obmc_edged, &best_rd);
1181 dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), *obmc_edged, &best_rd);
1182 dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), *obmc_edged, &best_rd);
1183 dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), *obmc_edged, &best_rd);
1192 dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+square[i][0], block->my+square[i][1], *obmc_edged, &best_rd);
1205 check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd);
1228 for(mb_x= 0; mb_x<b_width; mb_x+=2){
1231 const int index= mb_x + mb_y * b_stride;
1247 init_rd= best_rd= get_4block_rd(s, mb_x, mb_y, 0);
1250 check_4block_inter(s, mb_x, mb_y,
1256 check_4block_inter(s, mb_x, mb_y, b[i]->mx, b[i]->my, b[i]->ref, &best_rd);