summaryrefslogtreecommitdiff
path: root/vpx/src/svc_encodeframe.c
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-09-02 11:34:00 -0700
committerMarco <marpan@chromium.org>2015-09-17 09:37:15 -0700
commit730cdefd3ec5cf196b3ef95c63c99c86fdf22f7a (patch)
treedf97ccc871f0bd8d268d5e2a04b04f23bc4cc4bd /vpx/src/svc_encodeframe.c
parent50f944272cedc7b150963f5e9492f2ba99244634 (diff)
downloadlibvpx-730cdefd3ec5cf196b3ef95c63c99c86fdf22f7a.tar
libvpx-730cdefd3ec5cf196b3ef95c63c99c86fdf22f7a.tar.gz
libvpx-730cdefd3ec5cf196b3ef95c63c99c86fdf22f7a.tar.bz2
libvpx-730cdefd3ec5cf196b3ef95c63c99c86fdf22f7a.zip
Add SVC codec control to set frame flags and buffer indices.
Add SVC codec control to set the frame flags and buffer indices for each spatial layer of the current (super)frame to be encoded. This allows the application to set (and change on the fly) the reference frame configuration for spatial layers. Added an example layer pattern (spatial and temporal layers) in vp9_spatial_svc_encoder for the bypass_mode using new control. Change-Id: I05f941897cae13fb9275b939d11f93941cb73bee
Diffstat (limited to 'vpx/src/svc_encodeframe.c')
-rw-r--r--vpx/src/svc_encodeframe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vpx/src/svc_encodeframe.c b/vpx/src/svc_encodeframe.c
index 78932d2ff..ff600830e 100644
--- a/vpx/src/svc_encodeframe.c
+++ b/vpx/src/svc_encodeframe.c
@@ -339,7 +339,8 @@ void assign_layer_bitrates(const SvcContext *svc_ctx,
(spatial_layer_target >> 1) + (spatial_layer_target >> 2);
enc_cfg->layer_target_bitrate[sl * svc_ctx->temporal_layers + 2] =
spatial_layer_target;
- } else if (svc_ctx->temporal_layering_mode == 2) {
+ } else if (svc_ctx->temporal_layering_mode == 2 ||
+ svc_ctx->temporal_layering_mode == 1) {
enc_cfg->layer_target_bitrate[sl * svc_ctx->temporal_layers] =
spatial_layer_target * 2 / 3;
enc_cfg->layer_target_bitrate[sl * svc_ctx->temporal_layers + 1] =
@@ -417,7 +418,8 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
// si->svc_params.temporal_layering_mode = svc_ctx->temporal_layering_mode;
if (svc_ctx->temporal_layering_mode == 3) {
svc_ctx->temporal_layers = 3;
- } else if (svc_ctx->temporal_layering_mode == 2) {
+ } else if (svc_ctx->temporal_layering_mode == 2 ||
+ svc_ctx->temporal_layering_mode == 1) {
svc_ctx->temporal_layers = 2;
}