shithub: libvpx

Download patch

ref: 69541e1decbc193b0b7af328f48e25c96c8e49eb
parent: f92cfa1ca6cfb8422b10e908ad081ab5cbd3cff4
parent: 07ce7751894d98ecec81d1ab68e0d4cf4912fc5b
author: Jim Bankoski <jimbankoski@google.com>
date: Tue Nov 19 09:42:32 EST 2013

Merge "Reduce loop filter in cyclic refresh."

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -3808,11 +3808,22 @@
 
     /* Setup background Q adjustment for error resilient mode.
      * For multi-layer encodes only enable this for the base layer.
-     */
+     * Reduce loop filter to reduce "dot" artifacts that can occur for repeated
+     * loop filtering on ZEROMV_LASTREF blocks.
+     * For now reducing it to -32, only for resolutions above CIF and
+     * #temporal_layers < 3 (artifact is hard to see at low spatial resolution
+     * and/or high #temporal layers).
+    */
     if (cpi->cyclic_refresh_mode_enabled)
     {
+      int delta_loop_filter = 0;
+      if (cm->Width > 352 && cm->Height > 288 &&
+          cpi->oxcf.number_of_layers < 3)
+      {
+        delta_loop_filter = -32;
+      }
       if (cpi->current_layer==0)
-        cyclic_background_refresh(cpi, Q, 0);
+        cyclic_background_refresh(cpi, Q, delta_loop_filter);
       else
         disable_segmentation(cpi);
     }