]> granicus.if.org Git - libvpx/commitdiff
Reduce loop filter in cyclic refresh.
authorMarco Paniconi <marpan@google.com>
Sat, 12 Jan 2013 00:28:51 +0000 (16:28 -0800)
committerMarco Paniconi <marpan@google.com>
Sat, 12 Jan 2013 00:46:09 +0000 (16:46 -0800)
Reduce the delta loop filter for blocks that are cyclicly refreshed.
This helps to reduce the dot artifacts that may happen
when zero_mv blocks are repeatedly loop-filtered.

This change, along with the fix in:
https://gerrit.chromium.org/gerrit/#/c/40409/
helps to reduce this artifact, but cannot remove the dot artifacts completely.

Change-Id: I44675e7a0f59295b648a3b7d4956fb301231a97f

vp8/encoder/onyx_if.c

index 9837485fd3cf79be0be7bb1267b844604a740eb0..1b211552114e3533675d95841012bb401b6af1e5 100644 (file)
@@ -3732,11 +3732,22 @@ static void encode_frame_to_data_rate
 
     /* 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);
     }