From: John Koleszar Date: Fri, 16 Sep 2011 13:22:29 +0000 (-0400) Subject: Merge remote branch 'internal/upstream' into HEAD X-Git-Tag: v1.3.0~1217^2~380^2~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62371d382a4fb2570c60e0a0948bd32e91790f2a;p=libvpx Merge remote branch 'internal/upstream' into HEAD Conflicts: vp8/decoder/decodframe.c vp8/encoder/encodeframe.c vp8/encoder/encodemb.c Change-Id: I6e0d1669e4409a2dfd73ba2c7038d730842d3953 --- 62371d382a4fb2570c60e0a0948bd32e91790f2a diff --cc vp8/decoder/decodframe.c index 69f2905d4,1c11b0b50..523352c69 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@@ -535,17 -436,6 +535,9 @@@ decode_mb_row(VP8D_COMP *pbi, VP8_COMMO 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 */ diff --cc vp8/encoder/encodeframe.c index a37727510,19b52a3bf..1ccf134af --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@@ -748,16 -533,6 +747,12 @@@ void encode_mb_row(VP8_COMP *cpi // Increment the activity mask pointers. x->mb_activity_ptr++; +#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 - /* save the block info */ - for (i = 0; i < 16; i++) - xd->mode_info_context->bmi[i] = xd->block[i].bmi; - // adjust to the next column of macroblocks x->src.y_buffer += 16; x->src.u_buffer += 8; @@@ -1649,13 -1282,7 +1647,11 @@@ int vp8cx_encode_inter_macrobloc 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) diff --cc vp8/encoder/rdopt.c index 952977094,124cfe564..416235d2b --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@@ -849,11 -795,31 +858,36 @@@ static int rd_cost_mbuv(MACROBLOCK *mb } - 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;