Lines Matching defs:xd
308 MACROBLOCKD *xd = &x->e_mbd;
312 if (xd->segmentation_enabled)
315 if (xd->mb_segement_abs_delta == SEGMENT_ABSDATA)
317 QIndex = xd->segment_feature_data[MB_LVL_ALT_Q][xd->mode_info_context->mbmi.segment_id];
321 QIndex = cpi->common.base_qindex + xd->segment_feature_data[MB_LVL_ALT_Q][xd->mode_info_context->mbmi.segment_id];
468 MACROBLOCKD *xd,
495 xd->above_context = cm->above_context;
497 xd->up_available = (mb_row != 0);
506 xd->mb_to_top_edge = -((mb_row * 16) << 3);
507 xd->mb_to_bottom_edge = ((cm->mb_rows - 1 - mb_row) * 16) << 3;
521 xd->mb_to_left_edge = -((mb_col * 16) << 3);
522 xd->mb_to_right_edge = ((cm->mb_cols - 1 - mb_col) * 16) << 3;
530 xd->dst.y_buffer = cm->yv12_fb[dst_fb_idx].y_buffer + recon_yoffset;
531 xd->dst.u_buffer = cm->yv12_fb[dst_fb_idx].u_buffer + recon_uvoffset;
532 xd->dst.v_buffer = cm->yv12_fb[dst_fb_idx].v_buffer + recon_uvoffset;
533 xd->left_available = (mb_col != 0);
558 if (xd->segmentation_enabled)
560 // Code to set segment id in xd->mbmi.segment_id for current MB (with range checking)
562 xd->mode_info_context->mbmi.segment_id = cpi->segmentation_map[seg_map_index+mb_col];
564 xd->mode_info_context->mbmi.segment_id = 0;
569 xd->mode_info_context->mbmi.segment_id = 0; // Set to Segment 0 by default
577 y_modes[xd->mbmi.mode] ++;
585 inter_y_modes[xd->mbmi.mode] ++;
587 if (xd->mbmi.mode == SPLITMV)
591 for (b = 0; b < xd->mbmi.partition_count; b++)
600 if ((xd->mode_info_context->mbmi.mode == ZEROMV) && (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME))
604 // If cyclic update enabled then copy xd->mbmi.segment_id; (which may have been updated based on mode
606 if (cpi->cyclic_refresh_mode_enabled && xd->segmentation_enabled)
608 cpi->segmentation_map[seg_map_index+mb_col] = xd->mode_info_context->mbmi.segment_id;
613 if (xd->mode_info_context->mbmi.segment_id)
615 else if ((xd->mode_info_context->mbmi.mode == ZEROMV) && (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME))
631 vpx_memcpy(&xd->mode_info_context->bmi[i], &xd->block[i].bmi, sizeof(xd->block[i].bmi));
642 segment_counts[xd->mode_info_context->mbmi.segment_id] ++;
645 xd->mode_info_context++;
648 xd->above_context++;
660 xd->dst.y_buffer + 16,
661 xd->dst.u_buffer + 8,
662 xd->dst.v_buffer + 8);
665 xd->mode_info_context++;
682 MACROBLOCKD *const xd = & x->e_mbd;
691 xd->subpixel_predict = SUBPIX_INVOKE(
693 xd->subpixel_predict8x4 = SUBPIX_INVOKE(
695 xd->subpixel_predict8x8 = SUBPIX_INVOKE(
697 xd->subpixel_predict16x16 = SUBPIX_INVOKE(
702 xd->subpixel_predict = SUBPIX_INVOKE(
704 xd->subpixel_predict8x4 = SUBPIX_INVOKE(
706 xd->subpixel_predict8x8 = SUBPIX_INVOKE(
708 xd->subpixel_predict16x16 = SUBPIX_INVOKE(
739 xd->mode_info_context = cm->mi;
740 xd->mode_info_stride = cm->mode_info_stride;
742 xd->frame_type = cm->frame_type;
744 xd->frames_since_golden = cm->frames_since_golden;
745 xd->frames_till_alt_ref_frame = cm->frames_till_alt_ref_frame;
771 xd->pre = cm->yv12_fb[cm->lst_fb_idx];
772 xd->dst = cm->yv12_fb[cm->new_fb_idx];
786 xd->mode_info_context->mbmi.mode = DC_PRED;
787 xd->mode_info_context->mbmi.uv_mode = DC_PRED;
789 xd->left_context = &cm->left_context;
824 encode_mb_row(cpi, cm, mb_row, x, xd, &tp, segment_counts, &totalrate);
831 xd->mode_info_context += xd->mode_info_stride * cpi->encoding_thread_count;
832 x->partition_info += xd->mode_info_stride * cpi->encoding_thread_count;
845 if (xd->segmentation_enabled)
849 if (xd->segmentation_enabled)
880 encode_mb_row(cpi, cm, mb_row, x, xd, &tp, segment_counts, &totalrate);
899 if (xd->segmentation_enabled)
905 vpx_memset(xd->mb_segment_tree_probs, 255 , sizeof(xd->mb_segment_tree_probs));
911 xd->mb_segment_tree_probs[0] = ((segment_counts[0] + segment_counts[1]) * 255) / tot_count;
917 xd->mb_segment_tree_probs[1] = (segment_counts[0] * 255) / tot_count;
923 xd->mb_segment_tree_probs[2] = (segment_counts[2] * 255) / tot_count;
928 if (xd->mb_segment_tree_probs[i] == 0)
929 xd->mb_segment_tree_probs[i] = 1;
1120 const MACROBLOCKD *xd = & x->e_mbd;
1121 const MB_PREDICTION_MODE m = xd->mode_info_context->mbmi.mode;
1122 const MB_PREDICTION_MODE uvm = xd->mode_info_context->mbmi.uv_mode;
1137 ++ bct[xd->block[b].bmi.mode];
1233 MACROBLOCKD *const xd = &x->e_mbd;
1241 if (xd->segmentation_enabled)
1242 x->encode_breakout = cpi->segment_encode_breakout[xd->mode_info_context->mbmi.segment_id];
1288 if (xd->segmentation_enabled)
1294 if ((xd->mode_info_context->mbmi.segment_id == 1) &&
1295 ((xd->mode_info_context->mbmi.ref_frame != LAST_FRAME) || (xd->mode_info_context->mbmi.mode != ZEROMV)))
1297 xd->mode_info_context->mbmi.segment_id = 0;
1309 if ( xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME )
1313 if (xd->mode_info_context->mbmi.mode == ZEROMV)
1315 if (xd->mode_info_context->mbmi.ref_frame != LAST_FRAME)
1320 else if (xd->mode_info_context->mbmi.mode == SPLITMV)
1332 cpi->count_mb_ref_frame_usage[xd->mode_info_context->mbmi.ref_frame] ++;
1334 if (xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
1338 if (xd->mode_info_context->mbmi.mode == B_PRED)
1356 vp8_find_near_mvs(xd, xd->mode_info_context,
1357 &nearest, &nearby, &best_ref_mv, mdcounts, xd->mode_info_context->mbmi.ref_frame, cpi->common.ref_frame_sign_bias);
1359 vp8_build_uvmvs(xd, cpi->common.full_pixel);
1361 if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
1363 else if (xd->mode_info_context->mbmi.ref_frame == GOLDEN_FRAME)
1368 xd->pre.y_buffer = cpi->common.yv12_fb[ref_fb_idx].y_buffer + recon_yoffset;
1369 xd->pre.u_buffer = cpi->common.yv12_fb[ref_fb_idx].u_buffer + recon_uvoffset;
1370 xd->pre.v_buffer = cpi->common.yv12_fb[ref_fb_idx].v_buffer + recon_uvoffset;
1372 if (xd->mode_info_context->mbmi.mode == SPLITMV)
1378 if (xd->block[i].bmi.mode == NEW4X4)
1380 cpi->MVcount[0][mv_max+((xd->block[i].bmi.mv.as_mv.row - best_ref_mv.row) >> 1)]++;
1381 cpi->MVcount[1][mv_max+((xd->block[i].bmi.mv.as_mv.col - best_ref_mv.col) >> 1)]++;
1385 else if (xd->mode_info_context->mbmi.mode == NEWMV)
1387 cpi->MVcount[0][mv_max+((xd->block[0].bmi.mv.as_mv.row - best_ref_mv.row) >> 1)]++;
1388 cpi->MVcount[1][mv_max+((xd->block[0].bmi.mv.as_mv.col - best_ref_mv.col) >> 1)]++;
1397 xd->mode_info_context->mbmi.mb_skip_coeff = 0;
1405 vp8_tokenize_mb(cpi, xd, t);
1410 if (xd->mode_info_context->mbmi.mode != B_PRED && xd->mode_info_context->mbmi.mode != SPLITMV)
1411 xd->mode_info_context->mbmi.dc_diff = 0;
1413 xd->mode_info_context->mbmi.dc_diff = 1;
1415 xd->mode_info_context->mbmi.mb_skip_coeff = 1;
1417 vp8_fix_contexts(xd);
1421 vp8_stuff_mb(cpi, xd, t);
1422 xd->mode_info_context->mbmi.mb_skip_coeff = 0;