shithub: libvpx

Download patch

ref: 6b7873826a6e6a51abd764c65e7ee38f80d8f937
parent: 503cb8e63a06ab62ca814bcf79ef9971bdaa745a
parent: 135fe47602ecc0deef4f5943bd5266c7a23d18aa
author: Paul Wilkins <paulwilkins@google.com>
date: Fri Mar 1 08:42:11 EST 2019

Merge "Fix RD multiplier bug impacting AQ1."

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1898,7 +1898,6 @@
 static void set_segment_rdmult(VP9_COMP *const cpi, MACROBLOCK *const x,
                                int mi_row, int mi_col, BLOCK_SIZE bsize,
                                AQ_MODE aq_mode) {
-  int segment_qindex;
   VP9_COMMON *const cm = &cpi->common;
   const uint8_t *const map =
       cm->seg.update_map ? cpi->segmentation_map : cm->last_frame_seg_map;
@@ -1905,8 +1904,6 @@
 
   vp9_init_plane_quantizers(cpi, x);
   vpx_clear_system_state();
-  segment_qindex =
-      vp9_get_qindex(&cm->seg, x->e_mbd.mi[0]->segment_id, cm->base_qindex);
 
   if (aq_mode == NO_AQ || aq_mode == PSNR_AQ) {
     if (cpi->sf.enable_tpl_model) x->rdmult = x->cb_rdmult;
@@ -1921,7 +1918,7 @@
     return;
   }
 
-  x->rdmult = vp9_compute_rd_mult(cpi, segment_qindex + cm->y_dc_delta_q);
+  x->rdmult = vp9_compute_rd_mult(cpi, cm->base_qindex + cm->y_dc_delta_q);
 }
 
 static void rd_pick_sb_modes(VP9_COMP *cpi, TileDataEnc *tile_data,