Merge remote branch 'internal/upstream' into HEAD
authorJohn Koleszar <jkoleszar@google.com>
Fri, 16 Sep 2011 13:22:29 +0000 (09:22 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Fri, 16 Sep 2011 13:22:29 +0000 (09:22 -0400)
Conflicts:
vp8/decoder/decodframe.c
vp8/encoder/encodeframe.c
vp8/encoder/encodemb.c

Change-Id: I6e0d1669e4409a2dfd73ba2c7038d730842d3953

1  2 
vp8/common/blockd.h
vp8/decoder/decodframe.c
vp8/decoder/threading.c
vp8/encoder/encodeframe.c
vp8/encoder/encodemb.c
vp8/encoder/encodemb.h
vp8/encoder/ethreading.c
vp8/encoder/rdopt.c

Simple merge
@@@ -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 */
Simple merge
@@@ -748,16 -533,6 +747,12 @@@ void encode_mb_row(VP8_COMP *cpi
          // 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;
@@@ -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)
Simple merge
Simple merge
Simple merge
@@@ -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;