summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDeepa K G <deepa.kg@ittiam.com>2019-04-30 07:59:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-04-30 07:59:01 +0000
commit9012ebc269c789586ca33d9a771df134de4a2c6a (patch)
treeff7dfa7870e6dc09da86f7f937306471a5ce4350 /vp9
parent2c38592ec6198cbfcca538d05d86b0b11974dc85 (diff)
parent4bb51416e183381cd1df474662a8224a47476c2d (diff)
downloadlibvpx-9012ebc269c789586ca33d9a771df134de4a2c6a.tar
libvpx-9012ebc269c789586ca33d9a771df134de4a2c6a.tar.gz
libvpx-9012ebc269c789586ca33d9a771df134de4a2c6a.tar.bz2
libvpx-9012ebc269c789586ca33d9a771df134de4a2c6a.zip
Merge "Refine active best quality of layered ARF frames"
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_ratectrl.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 793171547..b51f6797b 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1446,20 +1446,19 @@ static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi, int *bottom_index,
// Constrained quality use slightly lower active best.
active_best_quality = active_best_quality * 15 / 16;
-
- // Modify best quality for second level arfs. For mode VPX_Q this
- // becomes the baseline frame q.
- if (gf_group->rf_level[gf_group_index] == GF_ARF_LOW) {
- const int layer_depth = gf_group->layer_depth[gf_group_index];
- // linearly fit the frame q depending on the layer depth index from
- // the base layer ARF.
- active_best_quality =
- ((layer_depth - 1) * q + active_best_quality + layer_depth / 2) /
- layer_depth;
- }
} else {
active_best_quality = get_gf_active_quality(cpi, q, cm->bit_depth);
}
+ // Modify best quality for second level arfs. For mode VPX_Q this
+ // becomes the baseline frame q.
+ if (gf_group->rf_level[gf_group_index] == GF_ARF_LOW) {
+ const int layer_depth = gf_group->layer_depth[gf_group_index];
+ // linearly fit the frame q depending on the layer depth index from
+ // the base layer ARF.
+ active_best_quality =
+ ((layer_depth - 1) * q + active_best_quality + layer_depth / 2) /
+ layer_depth;
+ }
} else {
active_best_quality = inter_minq[active_worst_quality];