shithub: libvpx

Download patch

ref: 8c52776ec1eb175f008581835ecfaf52eb07b453
parent: d2c9d92ce5c8baed705e8107cffb18696074094a
author: Jingning Han <jingning@google.com>
date: Fri Mar 15 13:02:43 EDT 2019

Add rdmult adjustment for perceptual AQ mode

Compute the Lagrangian multiplier for the adaptive quantization
settings.

Change-Id: Ieebe074d6f8163e7541264cb0ead22432273e338

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1927,6 +1927,13 @@
   }
 
   x->rdmult = vp9_compute_rd_mult(cpi, cm->base_qindex + cm->y_dc_delta_q);
+
+  if (cpi->sf.enable_wiener_variance && cm->show_frame) {
+    if (cm->seg.enabled)
+      x->rdmult = vp9_compute_rd_mult(
+          cpi, vp9_get_qindex(&cm->seg, x->e_mbd.mi[0]->segment_id,
+                              cm->base_qindex));
+  }
 }
 
 static void rd_pick_sb_modes(VP9_COMP *cpi, TileDataEnc *tile_data,