summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2014-09-16 11:37:33 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-09-16 11:37:33 -0700
commit99df7ded952f105153fe3962a1f223bec864a561 (patch)
tree8517dccc9082e07e99bd42cc90fafabbfe772fe8 /vp9/encoder
parentaebb361bb7c36be1317337c37ea7002e9f90bce6 (diff)
parentcd95543ee4a0d86a72dc1c7b9cbc280c5a60d0b0 (diff)
downloadlibvpx-99df7ded952f105153fe3962a1f223bec864a561.tar
libvpx-99df7ded952f105153fe3962a1f223bec864a561.tar.gz
libvpx-99df7ded952f105153fe3962a1f223bec864a561.tar.bz2
libvpx-99df7ded952f105153fe3962a1f223bec864a561.zip
Merge "Move call to vp9_rc_get_second_pass_params()."
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encoder.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index b3884d056..e16b0b356 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2397,10 +2397,7 @@ static void Pass0Encode(VP9_COMP *cpi, size_t *size, uint8_t *dest,
static void Pass2Encode(VP9_COMP *cpi, size_t *size,
uint8_t *dest, unsigned int *frame_flags) {
cpi->allow_encode_breakout = ENCODE_BREAKOUT_ENABLED;
-
- vp9_rc_get_second_pass_params(cpi);
encode_frame_to_data_rate(cpi, size, dest, frame_flags);
-
vp9_twopass_postencode_update(cpi);
}
@@ -2724,6 +2721,12 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
cm->frame_bufs[cm->new_fb_idx].ref_count--;
cm->new_fb_idx = get_free_fb(cm);
+ // For two pass encodes analyse the first pass stats and determine
+ // the bit allocation and other parameters for this frame / group of frames.
+ if ((oxcf->pass == 2) && (!cpi->use_svc || is_two_pass_svc(cpi))) {
+ vp9_rc_get_second_pass_params(cpi);
+ }
+
if (!cpi->use_svc && cpi->multi_arf_allowed) {
if (cm->frame_type == KEY_FRAME) {
init_buffer_indices(cpi);