ref: 4328b08521f8d5a25ac08577007ceca3641e610f
parent: 7aef9790cf5acb01904708d95c32a735d473f980
author: paulwilkins <[email protected]>
date: Thu Jun 2 13:34:03 EDT 2016
Remove gf_zeromotion_pct. The use of this value is preventing rate adjustment on clips or sections that have very little motion but high noise and this can give rise to some sections with massive overshoot. Change-Id: I9a65c7c1148dc5d3a7d8b23e50fc1733f3661621
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2115,8 +2115,6 @@
old_boost_score = boost_score;
}
- twopass->gf_zeromotion_pct = (int)(zero_motion_accumulator * 1000.0);
-
// Was the group length constrained by the requirement for a new KF?
rc->constrained_gf_group = (i >= rc->frames_to_key) ? 1 : 0;
@@ -2892,7 +2890,6 @@
// If the rate control is drifting consider adjustment to min or maxq.
if ((cpi->oxcf.rc_mode != VPX_Q) &&
- (cpi->twopass.gf_zeromotion_pct < VLOW_MOTION_THRESHOLD) &&
!cpi->rc.is_src_frame_alt_ref) {
const int maxq_adj_limit =
rc->worst_quality - twopass->active_worst_quality;
--- a/vp9/encoder/vp9_firstpass.h
+++ b/vp9/encoder/vp9_firstpass.h
@@ -39,8 +39,6 @@
} FIRSTPASS_MB_STATS;
#endif
-#define VLOW_MOTION_THRESHOLD 950
-
typedef struct {
double frame;
double weight;
@@ -131,7 +129,6 @@
int kf_zeromotion_pct;
int last_kfgroup_zeromotion_pct;
- int gf_zeromotion_pct;
int active_worst_quality;
int baseline_active_worst_quality;
int extend_minq;
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1160,8 +1160,7 @@
// Extension to max or min Q if undershoot or overshoot is outside
// the permitted range.
- if ((cpi->oxcf.rc_mode != VPX_Q) &&
- (cpi->twopass.gf_zeromotion_pct < VLOW_MOTION_THRESHOLD)) {
+ if (cpi->oxcf.rc_mode != VPX_Q) {
if (frame_is_intra_only(cm) ||
(!rc->is_src_frame_alt_ref &&
(cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame))) {