summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorjackychen <jackychen@google.com>2016-07-13 15:58:11 -0700
committerJackyChen <jackychen@google.com>2016-07-25 15:11:43 -0700
commit8ce67d714a6f1be586dcdd26524756d113b203f5 (patch)
treeb8d40f8b040459f1103cf26c9f54da0c9f100bdc /vpx
parent82070ae9393b1e79559d81fcf1aa89c2e4aa58ee (diff)
downloadlibvpx-8ce67d714a6f1be586dcdd26524756d113b203f5.tar
libvpx-8ce67d714a6f1be586dcdd26524756d113b203f5.tar.gz
libvpx-8ce67d714a6f1be586dcdd26524756d113b203f5.tar.bz2
libvpx-8ce67d714a6f1be586dcdd26524756d113b203f5.zip
vp9 svc: Enable different speed setting for each spatial layer.
This change only affects 1 pass cbr svc mode. Change-Id: If0da87bb200f7e7762755340c40c8157cc7a16ca
Diffstat (limited to 'vpx')
-rw-r--r--vpx/src/svc_encodeframe.c2
-rw-r--r--vpx/vpx_encoder.h1
2 files changed, 3 insertions, 0 deletions
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;