summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 1293e860f..6e4c56c1a 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -242,6 +242,10 @@ static void calc_iframe_target_size(VP9_COMP *cpi) {
}
cpi->rc.this_frame_target = target;
+
+ // Target rate per SB64 (including partial SB64s.
+ cpi->rc.sb64_target_rate = (cpi->rc.this_frame_target * 64 * 64) /
+ (cpi->common.width * cpi->common.height);
}
@@ -269,6 +273,11 @@ static void calc_pframe_target_size(VP9_COMP *cpi) {
cpi->rc.this_frame_target = cpi->rc.per_frame_bandwidth;
}
+ // Target rate per SB64 (including partial SB64s.
+ cpi->rc.sb64_target_rate = (cpi->rc.this_frame_target * 64 * 64) /
+ (cpi->common.width * cpi->common.height);
+
+
// Check that the total sum of adjustments is not above the maximum allowed.
// That is, having allowed for the KF and GF penalties, we have not pushed
// the current inter-frame target too low. If the adjustment we apply here is