Skip to content
Snippets Groups Projects
Commit 465eaceb authored by Marco Paniconi's avatar Marco Paniconi
Browse files

SVC sample encoder: Change some settings/update.

Change settings for 1 pass CBR.
And only use SET_SVC control(s) if there is at least 1 layer (spatial or temporal).
This allows sample encoder to also work for 1 layer case.

Change-Id: I5b0a33c25afb2f24a3a8aa4ec8ade9afc87cd702
parent bda690d4
No related branches found
No related tags found
No related merge requests found
......@@ -477,10 +477,10 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
if (enc_cfg->rc_end_usage == VPX_CBR) {
enc_cfg->rc_resize_allowed = 0;
enc_cfg->rc_min_quantizer = 2;
enc_cfg->rc_max_quantizer = 63;
enc_cfg->rc_max_quantizer = 56;
enc_cfg->rc_undershoot_pct = 50;
enc_cfg->rc_overshoot_pct = 50;
enc_cfg->rc_buf_initial_sz = 20;
enc_cfg->rc_buf_initial_sz = 500;
enc_cfg->rc_buf_optimal_sz = 600;
enc_cfg->rc_buf_sz = 1000;
}
......@@ -494,10 +494,10 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
svc_log(svc_ctx, SVC_LOG_ERROR, "svc_enc_init error\n");
return res;
}
vpx_codec_control(codec_ctx, VP9E_SET_SVC, 1);
vpx_codec_control(codec_ctx, VP9E_SET_SVC_PARAMETERS, &si->svc_params);
if (svc_ctx->spatial_layers > 1 || svc_ctx->temporal_layers > 1) {
vpx_codec_control(codec_ctx, VP9E_SET_SVC, 1);
vpx_codec_control(codec_ctx, VP9E_SET_SVC_PARAMETERS, &si->svc_params);
}
return VPX_CODEC_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment