From 8ce67d714a6f1be586dcdd26524756d113b203f5 Mon Sep 17 00:00:00 2001 From: jackychen Date: Wed, 13 Jul 2016 15:58:11 -0700 Subject: vp9 svc: Enable different speed setting for each spatial layer. This change only affects 1 pass cbr svc mode. Change-Id: If0da87bb200f7e7762755340c40c8157cc7a16ca --- vpx/src/svc_encodeframe.c | 2 ++ vpx/vpx_encoder.h | 1 + 2 files changed, 3 insertions(+) (limited to 'vpx') diff --git a/vpx/src/svc_encodeframe.c b/vpx/src/svc_encodeframe.c index 427f30f36..5aa0b8ddb 100644 --- a/vpx/src/svc_encodeframe.c +++ b/vpx/src/svc_encodeframe.c @@ -410,7 +410,9 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, for (sl = 0; sl < VPX_SS_MAX_LAYERS; ++sl) { si->svc_params.scaling_factor_num[sl] = DEFAULT_SCALE_FACTORS_NUM[sl]; si->svc_params.scaling_factor_den[sl] = DEFAULT_SCALE_FACTORS_DEN[sl]; + si->svc_params.speed_per_layer[sl] = svc_ctx->speed; } + for (tl = 0; tl < svc_ctx->temporal_layers; ++tl) { for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) { i = sl * svc_ctx->temporal_layers + tl; diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h index 12869043b..28fcd5f99 100644 --- a/vpx/vpx_encoder.h +++ b/vpx/vpx_encoder.h @@ -715,6 +715,7 @@ typedef struct vpx_svc_parameters { int min_quantizers[VPX_MAX_LAYERS]; /**< Min Q for each layer */ int scaling_factor_num[VPX_MAX_LAYERS]; /**< Scaling factor-numerator */ int scaling_factor_den[VPX_MAX_LAYERS]; /**< Scaling factor-denominator */ + int speed_per_layer[VPX_MAX_LAYERS]; /**< Speed setting for each sl */ int temporal_layering_mode; /**< Temporal layering mode */ } vpx_svc_extra_cfg_t; -- cgit v1.2.3