summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2012-05-16 15:06:42 -0400
committerYunqing Wang <yunqingwang@google.com>2012-05-16 15:06:42 -0400
commit65dd157c3c28bdfd3b4c20aa25cc6d5a28f4de03 (patch)
treebcee0c6038f40a90cc2cff148cec75b25cb3f982 /vpx
parentc7ca3808322e4ff6a26d2184137c1dfa94f97024 (diff)
downloadlibvpx-65dd157c3c28bdfd3b4c20aa25cc6d5a28f4de03.tar
libvpx-65dd157c3c28bdfd3b4c20aa25cc6d5a28f4de03.tar.gz
libvpx-65dd157c3c28bdfd3b4c20aa25cc6d5a28f4de03.tar.bz2
libvpx-65dd157c3c28bdfd3b4c20aa25cc6d5a28f4de03.zip
multi-res: force Key frame sychronization
In multi-resolution encoding, frame_type decision for each frame is made by the lowest-resolution encoder. For all other higher- resolution encoders, kf_mode is always set to VPX_KF_DISABLED, and they are forced to use the same frame_type picked by the lowest-resolution encoder. Change-Id: Ic4d52ec65bbc012ca9c2d236210e28a295591eaf
Diffstat (limited to 'vpx')
-rw-r--r--vpx/src/vpx_encoder.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vpx/src/vpx_encoder.c b/vpx/src/vpx_encoder.c
index 03ddc62b2..db0120c35 100644
--- a/vpx/src/vpx_encoder.c
+++ b/vpx/src/vpx_encoder.c
@@ -117,6 +117,13 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver(vpx_codec_ctx_t *ctx,
mr_cfg.mr_down_sampling_factor.num = dsf->num;
mr_cfg.mr_down_sampling_factor.den = dsf->den;
+ /* Force Key-frame synchronization. Namely, encoder at higher
+ * resolution always use the same frame_type chosen by the
+ * lowest-resolution encoder.
+ */
+ if(mr_cfg.mr_encoder_id)
+ cfg->kf_mode = VPX_KF_DISABLED;
+
ctx->iface = iface;
ctx->name = iface->name;
ctx->priv = NULL;