xd->corrupted |= pc->yv12_fb[ref_fb_idx].corrupted;
}
- vp8_build_uvmvs(xd, pc->full_pixel);
-
+#ifdef DEC_DEBUG
+ dec_debug = (pc->current_video_frame==5 && mb_row==2 && mb_col==3);
+#endif
- /*
- if(pc->current_video_frame==0 &&mb_col==1 && mb_row==0)
- pbi->debugoutput =1;
- else
- pbi->debugoutput =0;
- */
decode_macroblock(pbi, xd, mb_row * pc->mb_cols + mb_col);
/* check if the boolean decoder has suffered an error */
// Increment the activity mask pointers.
x->mb_activity_ptr++;
- /* save the block info */
- for (i = 0; i < 16; i++)
- xd->mode_info_context->bmi[i] = xd->block[i].bmi;
-
+#if CONFIG_SEGMENTATION
+ if ((xd->mode_info_context->mbmi.mode == ZEROMV) && (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME))
+ xd->mode_info_context->mbmi.segment_id = 0;
+ else
+ xd->mode_info_context->mbmi.segment_id = 1;
+#endif
// adjust to the next column of macroblocks
x->src.y_buffer += 16;
x->src.u_buffer += 8;
else
{
int ref_fb_idx;
+#if CONFIG_T8X8
+ if (xd->segmentation_enabled)
+ xd->mode_info_context->mbmi.segment_id |= (vp8_8x8_selection_inter(x) << 1);
+#endif
- vp8_build_uvmvs(xd, cpi->common.full_pixel);
-
if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
ref_fb_idx = cpi->common.lst_fb_idx;
else if (xd->mode_info_context->mbmi.ref_frame == GOLDEN_FRAME)
}
- static int vp8_rd_inter_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, int *distortion, int fullpixel)
+ static int rd_inter16x16_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate,
+ int *distortion, int fullpixel)
{
- vp8_build_uvmvs(&x->e_mbd, fullpixel);
- vp8_encode_inter16x16uvrd(IF_RTCD(&cpi->rtcd), x);
+ vp8_build_inter16x16_predictors_mbuv(&x->e_mbd);
+ ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff,
+ x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, x->src.uv_stride);
++#if CONFIG_T8X8
++ if(x->e_mbd.mode_info_context->mbmi.segment_id >= 2)
++ vp8_transform_mbuv_8x8(x);
++ else
++#endif
+ vp8_transform_mbuv(x);
+ vp8_quantize_mbuv(x);
+
+ *rate = rd_cost_mbuv(x);
+ *distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4;
+
+ return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
+ }
+
+ static int rd_inter4x4_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate,
+ int *distortion, int fullpixel)
+ {
+ vp8_build_inter4x4_predictors_mbuv(&x->e_mbd);
+ ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff,
+ x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, x->src.uv_stride);
+
+ vp8_transform_mbuv(x);
+ vp8_quantize_mbuv(x);
*rate = rd_cost_mbuv(x);
*distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4;