shithub: libvpx

Download patch

ref: b6ca9d917d60a2d27bf7ada742cb224a371625e1
parent: cfcd5c4f61a483c1913fde561619bf0eba31dd4b
parent: 9977332615deef53454f3c95c8d9200f8e775f39
author: Marco Paniconi <marpan@google.com>
date: Thu Nov 14 03:11:42 EST 2013

Merge "For CBR, keep rate-correction damping factor to 2."

--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -248,9 +248,9 @@
     cfg_.rc_target_bitrate = i;
     ResetModel();
     ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
-    ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.8)
+    ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.9)
         << " The datarate for the file exceeds the target by too much!";
-    ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.3)
+    ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.1)
         << " The datarate for the file missed the target!";
   }
 }
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3436,7 +3436,9 @@
 
   // Post encode loop adjustment of Q prediction.
   if (!active_worst_qchanged)
-    vp9_update_rate_correction_factors(cpi, (cpi->sf.recode_loop) ? 2 : 0);
+    vp9_update_rate_correction_factors(cpi, (cpi->sf.recode_loop ||
+        cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) ? 2 : 0);
+
 
   cpi->last_q[cm->frame_type] = cm->base_qindex;
 
--