Merge remote branch 'origin/master' into experimental
authorJohn Koleszar <jkoleszar@google.com>
Fri, 28 Jan 2011 13:33:52 +0000 (08:33 -0500)
committerJohn Koleszar <jkoleszar@google.com>
Fri, 28 Jan 2011 13:33:52 +0000 (08:33 -0500)
Conflicts:
vp8/encoder/rdopt.c

Change-Id: Ic17907df70fff45c9e766b5d0cbab0c5f1a1095f

1  2 
vp8/encoder/firstpass.c
vp8/encoder/onyx_if.c
vp8/encoder/rdopt.c

Simple merge
Simple merge
@@@ -289,19 -243,9 +289,18 @@@ void vp8_initialize_rd_consts(VP8_COMP 
              cpi->RDMULT += (cpi->RDMULT * rd_iifactor[cpi->next_iiratio]) >> 4;
      }
  
-     if (cpi->RDMULT < 125)
-         cpi->RDMULT = 125;
 +#if !CONFIG_EXTEND_QRANGE
 +#else
 +    if (cpi->RDMULT < 7)
 +        cpi->RDMULT = 7;
 +#endif
      cpi->mb.errorperbit = (cpi->RDMULT / 100);
+     cpi->mb.errorperbit += (cpi->mb.errorperbit==0);
 +#if CONFIG_EXTEND_QRANGE
 +    if(cpi->mb.errorperbit<1)
 +        cpi->mb.errorperbit=1;
 +#endif
      vp8_set_speed_features(cpi);
  
      if (cpi->common.simpler_lpf)
@@@ -1001,52 -985,6 +1046,10 @@@ static unsigned int vp8_encode_inter_mb
      return distortion;
  }
  
- static void macro_block_yrd(MACROBLOCK *mb, int *Rate, int *Distortion, const vp8_encodemb_rtcd_vtable_t *rtcd)
- {
-     int b;
-     MACROBLOCKD *const x = &mb->e_mbd;
-     BLOCK   *const mb_y2 = mb->block + 24;
-     BLOCKD *const x_y2  = x->block + 24;
-     short *Y2DCPtr = mb_y2->src_diff;
-     BLOCK *beptr;
-     int d;
-     ENCODEMB_INVOKE(rtcd, submby)(mb->src_diff, mb->src.y_buffer, mb->e_mbd.predictor, mb->src.y_stride);
-     // Fdct and building the 2nd order block
-     for (beptr = mb->block; beptr < mb->block + 16; beptr += 2)
-     {
-         mb->vp8_short_fdct8x4(beptr->src_diff, beptr->coeff, 32);
-         *Y2DCPtr++ = beptr->coeff[0];
-         *Y2DCPtr++ = beptr->coeff[16];
-     }
-     // 2nd order fdct
-     mb->short_walsh4x4(mb_y2->src_diff, mb_y2->coeff, 8);
-     // Quantization
-     for (b = 0; b < 16; b++)
-     {
-         mb->quantize_b(&mb->block[b], &mb->e_mbd.block[b]);
-     }
-     // DC predication and Quantization of 2nd Order block
-     mb->quantize_b(mb_y2, x_y2);
-     // Distortion
-     d = ENCODEMB_INVOKE(rtcd, mberr)(mb, 1) << 2;
 +#if CONFIG_EXTEND_QRANGE
 +    d += ENCODEMB_INVOKE(rtcd, berr)(mb_y2->coeff, x_y2->dqcoeff)<<2;
 +#else
-     d += ENCODEMB_INVOKE(rtcd, berr)(mb_y2->coeff, x_y2->dqcoeff);
 +#endif
-     *Distortion = (d >> 4);
-     // rate
-     *Rate = vp8_rdcost_mby(mb);
- }
  unsigned char vp8_mbsplit_offset2[4][16] = {
      { 0,  8,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0},
      { 0,  2,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0},