summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_firstpass.c
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2014-01-31 11:10:04 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-01-31 11:10:04 -0800
commit42bc14e619dc3b5bd2b6f2841ae400992159ded0 (patch)
tree19f7f632a364930319f082aa62f16520c0408d79 /vp9/encoder/vp9_firstpass.c
parent64e259746509e3869ec36d36de4aeb3ac866e2e6 (diff)
parent284e793d5a26b5a5c9cdcec547e71ba3778b1768 (diff)
downloadlibvpx-42bc14e619dc3b5bd2b6f2841ae400992159ded0.tar
libvpx-42bc14e619dc3b5bd2b6f2841ae400992159ded0.tar.gz
libvpx-42bc14e619dc3b5bd2b6f2841ae400992159ded0.tar.bz2
libvpx-42bc14e619dc3b5bd2b6f2841ae400992159ded0.zip
Merge "Add constant to represent minimum KF boost"
Diffstat (limited to 'vp9/encoder/vp9_firstpass.c')
-rw-r--r--vp9/encoder/vp9_firstpass.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index af9fa1ba7..a03cbdd86 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -49,6 +49,9 @@
#define DOUBLE_DIVIDE_CHECK(x) ((x) < 0 ? (x) - 0.000001 : (x) + 0.000001)
+#define MIN_BOOST 300
+#define KEY_FRAME_BOOST 2000
+
static void swap_yv12(YV12_BUFFER_CONFIG *a, YV12_BUFFER_CONFIG *b) {
YV12_BUFFER_CONFIG temp = *a;
*a = *b;
@@ -2219,8 +2222,8 @@ static void find_next_key_frame(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
if (kf_boost < (rc->frames_to_key * 3))
kf_boost = (rc->frames_to_key * 3);
- if (kf_boost < 300) // Min KF boost
- kf_boost = 300;
+ if (kf_boost < MIN_BOOST)
+ kf_boost = MIN_BOOST;
// Make a note of baseline boost and the zero motion
// accumulator value for use elsewhere.
@@ -2331,7 +2334,7 @@ void vp9_get_one_pass_params(VP9_COMP *cpi) {
cpi->rc.this_key_frame_forced = cm->current_video_frame != 0 &&
cpi->rc.frames_to_key == 0;
cpi->rc.frames_to_key = cpi->key_frame_frequency;
- cpi->rc.kf_boost = 2000;
+ cpi->rc.kf_boost = KEY_FRAME_BOOST;
cpi->rc.source_alt_ref_active = 0;
} else {
cm->frame_type = INTER_FRAME;
@@ -2358,7 +2361,7 @@ void vp9_get_one_pass_cbr_params(VP9_COMP *cpi) {
cpi->rc.this_key_frame_forced = cm->current_video_frame != 0 &&
cpi->rc.frames_to_key == 0;
cpi->rc.frames_to_key = cpi->key_frame_frequency;
- cpi->rc.kf_boost = 2000;
+ cpi->rc.kf_boost = KEY_FRAME_BOOST;
cpi->rc.source_alt_ref_active = 0;
} else {
cm->frame_type = INTER_FRAME;