summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-11-13 11:20:04 -0800
committerYaowu Xu <yaowu@google.com>2014-11-13 11:26:52 -0800
commit9f79259e545eb3b9ddabbbc6bd9eab842e5f629d (patch)
tree42702c1022b82aed177545c829e6c12dbec59698 /vp9/encoder/vp9_ratectrl.c
parent8e112d9586a9a79227859fc0a39150ac955ff134 (diff)
downloadlibvpx-9f79259e545eb3b9ddabbbc6bd9eab842e5f629d.tar
libvpx-9f79259e545eb3b9ddabbbc6bd9eab842e5f629d.tar.gz
libvpx-9f79259e545eb3b9ddabbbc6bd9eab842e5f629d.tar.bz2
libvpx-9f79259e545eb3b9ddabbbc6bd9eab842e5f629d.zip
adapt the adjustment limit for rate correction factor in RTC mode
Rate correction factor is used to correct the estimated rate for any given quantizer, and feeds into rate control for quantizer selection. We make use of the actual bits used to calculate this rate correction factor with an adjustment limit to prevent over-adjustment. This commit adapts the adjustment limit to the difference between the estimated bits and the actual bits, allows the adjustment limit to vary between 0.125 (when estimate is close to actual) and 0.625 (when there is >10X factor off between estimated and actual bits). By doing this, the commit appears to have largely corrected two observed issues: 1. Adjustment is too slow when the actual bits used is way off from estimate due to the small adjustment limit. 2. Extreme oscillating quantizer choices due to the feedback loop. Change-Id: I4ee148d2c9d26d173b6c48011313ddb07ce2d7d6
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 6f165797e..3da466175 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -430,7 +430,7 @@ void vp9_rc_update_rate_correction_factors(VP9_COMP *cpi, int damp_var) {
adjustment_limit = 0.75;
break;
case 1:
- adjustment_limit = 0.375;
+ adjustment_limit = 0.125 + 0.5 * MIN(1, fabs(log10(0.01 * correction_factor)));
break;
case 2:
default: