]> granicus.if.org Git - libvpx/commitdiff
Merge branch 'master' into nextgenv2
authorYaowu Xu <yaowu@google.com>
Wed, 16 Dec 2015 16:03:59 +0000 (08:03 -0800)
committerYaowu Xu <yaowu@google.com>
Wed, 16 Dec 2015 17:00:57 +0000 (09:00 -0800)
With a few manual fixes of merge conflicts.

Change-Id: I0dd65ff90f9fa8606e5563f528659e2607b12376

1  2 
vp10/decoder/decodeframe.c
vp10/encoder/bitstream.c
vp10/encoder/encoder.c
vp10/encoder/rdopt.c
vp9/encoder/vp9_encodeframe.c

index e93619f9a75e1949887fa3c4aa6ad06cf0820907,31b9c7e495c98556e504c48439ecdba8e1602483..7fed6d53cb3edaab19fb2c6d45b8ab644cf7f18d
@@@ -1218,13 -1140,11 +1218,11 @@@ static void setup_loopfilter(struct loo
  
  static INLINE int read_delta_q(struct vpx_read_bit_buffer *rb) {
    return vpx_rb_read_bit(rb) ?
 -      vpx_rb_read_inv_signed_literal(rb, CONFIG_MISC_FIXES ? 6 : 4) : 0;
 +      vpx_rb_read_inv_signed_literal(rb, 6) : 0;
  }
  
- static void setup_quantization(VP10_COMMON *const cm, MACROBLOCKD *const xd,
+ static void setup_quantization(VP10_COMMON *const cm,
                                 struct vpx_read_bit_buffer *rb) {
-   int i;
    cm->base_qindex = vpx_rb_read_literal(rb, QINDEX_BITS);
    cm->y_dc_delta_q = read_delta_q(rb);
    cm->uv_dc_delta_q = read_delta_q(rb);
@@@ -2216,12 -2091,28 +2205,26 @@@ static size_t read_uncompressed_header(
      vp10_setup_past_independence(cm);
  
    setup_loopfilter(&cm->lf, rb);
-   setup_quantization(cm, &pbi->mb, rb);
+   setup_quantization(cm, rb);
    setup_segmentation(cm, rb);
+   {
+     int i;
+     for (i = 0; i < MAX_SEGMENTS; ++i) {
+       const int qindex = CONFIG_MISC_FIXES && cm->seg.enabled ?
+           vp10_get_qindex(&cm->seg, i, cm->base_qindex) :
+           cm->base_qindex;
+       xd->lossless[i] = qindex == 0 &&
+           cm->y_dc_delta_q == 0 &&
+           cm->uv_dc_delta_q == 0 &&
+           cm->uv_ac_delta_q == 0;
+     }
+   }
    setup_segmentation_dequant(cm);
-   cm->tx_mode = (!cm->seg.enabled && xd->lossless[0]) ? ONLY_4X4
-                                                       : read_tx_mode(rb);
 -#if CONFIG_MISC_FIXES
+   cm->tx_mode = (xd->lossless[0]) ? ONLY_4X4
+                                   : read_tx_mode(rb);
    cm->reference_mode = read_frame_reference_mode(cm, rb);
 -#endif
  
    setup_tile_info(cm, rb);
    sz = vpx_rb_read_literal(rb, 16);
index 1288e502896ced90539486221749ed58718e3e2a,361ac9962a502f69981c8204c57f520c6a09eed0..434cc99f78952553a9213a138887ad8dca4da0fc
@@@ -1400,9 -897,18 +1400,10 @@@ static void write_txfm_mode(TX_MODE mod
    if (mode != TX_MODE_SELECT)
      vpx_wb_write_literal(wb, mode, 2);
  }
 -#else
 -static void write_txfm_mode(TX_MODE mode, struct vpx_writer *wb) {
 -  vpx_write_literal(wb, VPXMIN(mode, ALLOW_32X32), 2);
 -  if (mode >= ALLOW_32X32)
 -    vpx_write_bit(wb, mode == TX_MODE_SELECT);
 -}
 -#endif
  
  static void update_txfm_probs(VP10_COMMON *cm, vpx_writer *w,
                                FRAME_COUNTS *counts) {
 -
    if (cm->tx_mode == TX_MODE_SELECT) {
      int i, j;
      unsigned int ct_8x8p[TX_SIZES - 3][2];
@@@ -1750,7 -1259,8 +1751,7 @@@ static void write_uncompressed_header(V
    encode_loopfilter(&cm->lf, wb);
    encode_quantization(cm, wb);
    encode_segmentation(cm, xd, wb);
-   if (!cm->seg.enabled && xd->lossless[0])
 -#if CONFIG_MISC_FIXES
+   if (xd->lossless[0])
      cm->tx_mode = TX_4X4;
    else
      write_txfm_mode(cm->tx_mode, wb);
Simple merge
index 18e6779539c21f8dfcbf10096bf684ad8a9b5c73,bbddc1d296618e1e8cda9a85a3bfb40b314b6610..c65021b4b761070f021155d616eac3f533cca0e9
@@@ -1050,10 -725,11 +1050,10 @@@ static void super_block_yrd(VP10_COMP *
  
    assert(bs == xd->mi[0]->mbmi.sb_type);
  
-   if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
 -  if (CONFIG_MISC_FIXES && xd->lossless[0]) {
++  if (xd->lossless[0]) {
      choose_smallest_tx_size(cpi, x, rate, distortion, skip, ret_sse,
                              ref_best_rd, bs);
 -  } else if (cpi->sf.tx_size_search_method == USE_LARGESTALL ||
 -             xd->lossless[xd->mi[0]->mbmi.segment_id]) {
 +  } else if (cpi->sf.tx_size_search_method == USE_LARGESTALL) {
      choose_largest_tx_size(cpi, x, rate, distortion, skip, ret_sse, ref_best_rd,
                             bs);
    } else {
Simple merge