shithub: libvpx

Download patch

ref: 79ec9a26d1840229284d0cb61e733ff656950fd6
parent: 4ecaaa81e7f2bfaf0de44751e628fefc1f6a6d60
parent: eeed7e2953c79ce60b865578ae3ed94760a5c4a5
author: Marco Paniconi <marpan@google.com>
date: Wed Mar 26 05:15:15 EDT 2014

Merge "Fix to cylcic refresh: use correct/chosen mode for update_segment."

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -896,21 +896,16 @@
 
   assert(mi->mbmi.sb_type == bsize);
 
-  // For in frame adaptive Q copy over the chosen segment id into the
-  // mode innfo context for the chosen mode / partition.
-  if ((cpi->oxcf.aq_mode == COMPLEXITY_AQ ||
-      cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) &&
+  *mi_addr = *mi;
+
+  // For in frame adaptive Q, check for reseting the segment_id and updating
+  // the cyclic refresh map.
+  if ((cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) && seg->enabled &&
       output_enabled) {
-    // Check for reseting segment_id and update cyclic map.
-    if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && seg->enabled) {
-      vp9_update_segment_aq(cpi, &xd->mi_8x8[0]->mbmi,
-                            mi_row, mi_col, bsize, 1);
-      vp9_init_plane_quantizers(cpi, x);
-    }
-    mi->mbmi.segment_id = xd->mi_8x8[0]->mbmi.segment_id;
+    vp9_update_segment_aq(cpi, &xd->mi_8x8[0]->mbmi,
+                          mi_row, mi_col, bsize, 1);
+    vp9_init_plane_quantizers(cpi, x);
   }
-
-  *mi_addr = *mi;
 
   max_plane = is_inter_block(mbmi) ? MAX_MB_PLANE : 1;
   for (i = 0; i < max_plane; ++i) {
--