summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp9/encoder/vp9_aq_cyclicrefresh.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c
index 6b651039c..3e1a0a522 100644
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -393,13 +393,18 @@ static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
cr->target_num_seg_blocks = 0;
if (cpi->oxcf.content != VP9E_CONTENT_SCREEN) {
consec_zero_mv_thresh = 100;
- if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium)
- consec_zero_mv_thresh = 80;
}
qindex_thresh =
cpi->oxcf.content == VP9E_CONTENT_SCREEN
? vp9_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST2, cm->base_qindex)
: vp9_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST1, cm->base_qindex);
+ // More aggressive settings for noisy content.
+ if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium) {
+ consec_zero_mv_thresh = 80;
+ qindex_thresh =
+ VPXMAX(vp9_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST1, cm->base_qindex),
+ 7 * cm->base_qindex >> 3);
+ }
do {
int sum_map = 0;
// Get the mi_row/mi_col corresponding to superblock index i.
@@ -463,6 +468,8 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
cr->percent_refresh = 5;
cr->max_qdelta_perc = 50;
cr->time_for_refresh = 0;
+ cr->motion_thresh = 32;
+ cr->rate_boost_fac = 15;
// Use larger delta-qp (increase rate_ratio_qdelta) for first few (~4)
// periods of the refresh cycle, after a key frame.
// Account for larger interval on base layer for temporal layers.
@@ -472,9 +479,11 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
cr->rate_ratio_qdelta = 3.0;
} else {
cr->rate_ratio_qdelta = 2.0;
- if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium)
- // Reduce the delta-qp if the estimated source noise is above threshold.
- cr->rate_ratio_qdelta = 1.5;
+ if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium) {
+ // Reduce the delta-qp if the estimated source noise is above threshold.
+ cr->rate_ratio_qdelta = 1.7;
+ cr->rate_boost_fac = 13;
+ }
}
// Adjust some parameters for low resolutions at low bitrates.
if (cm->width <= 352 &&
@@ -482,9 +491,6 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
rc->avg_frame_bandwidth < 3400) {
cr->motion_thresh = 4;
cr->rate_boost_fac = 10;
- } else {
- cr->motion_thresh = 32;
- cr->rate_boost_fac = 15;
}
if (cpi->svc.spatial_layer_id > 0) {
cr->motion_thresh = 4;