ref: edccfcebb28882681a7566c47f5c1f866a917033
parent: 0becfe42bb16706100f6db62fb0276112cad51ec
author: Dmitry Kovalev <[email protected]>
date: Tue May 27 14:19:19 EDT 2014
Using 2 instead of 3 elements for last_q array. Change-Id: I2c6950e7d79fc89c6f97e6dcf47317ef66c453a5
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -200,9 +200,8 @@
oxcf->best_allowed_q) / 2;
}
- rc->last_q[0] = oxcf->best_allowed_q;
- rc->last_q[1] = oxcf->best_allowed_q;
- rc->last_q[2] = oxcf->best_allowed_q;
+ rc->last_q[KEY_FRAME] = oxcf->best_allowed_q;
+ rc->last_q[INTER_FRAME] = oxcf->best_allowed_q;
rc->buffer_level = oxcf->starting_buffer_level;
rc->bits_off_target = oxcf->starting_buffer_level;
@@ -1090,7 +1089,6 @@
} else if (!rc->is_src_frame_alt_ref &&
(cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame) &&
!(cpi->use_svc && oxcf->rc_mode == RC_MODE_CBR)) {
- rc->last_q[2] = qindex;
rc->avg_frame_qindex[2] =
ROUND_POWER_OF_TWO(3 * rc->avg_frame_qindex[2] + qindex, 2);
} else {
--- a/vp9/encoder/vp9_ratectrl.h
+++ b/vp9/encoder/vp9_ratectrl.h
@@ -30,7 +30,7 @@
int this_frame_target; // Actual frame target after rc adjustment.
int projected_frame_size;
int sb64_target_rate;
- int last_q[3]; // Separate values for Intra/Inter/ARF-GF
+ int last_q[FRAME_TYPES]; // Separate values for Intra/Inter
int last_boosted_qindex; // Last boosted GF/KF/ARF q
int gfu_boost;
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -50,9 +50,8 @@
lrc->last_q[INTER_FRAME] = oxcf->worst_allowed_q;
} else {
lc->target_bandwidth = oxcf->ss_target_bitrate[layer];
- lrc->last_q[0] = oxcf->best_allowed_q;
- lrc->last_q[1] = oxcf->best_allowed_q;
- lrc->last_q[2] = oxcf->best_allowed_q;
+ lrc->last_q[KEY_FRAME] = oxcf->best_allowed_q;
+ lrc->last_q[INTER_FRAME] = oxcf->best_allowed_q;
}
lrc->buffer_level = vp9_rescale((int)(oxcf->starting_buffer_level),