summaryrefslogtreecommitdiff
path: root/vpx/src
diff options
context:
space:
mode:
authorMinghai Shang <minghai@google.com>2014-03-28 08:58:45 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-03-28 08:58:45 -0700
commit2b58730aec646e8e0a6203984b70e7d2154d7d84 (patch)
treee1b357eb2408c4197ce34db763e3413774aab2f9 /vpx/src
parent77e4f85cf1260b43d10735aa35f2ae94387c8091 (diff)
parentd4124ea3174c1b901cce77f0904a0c9d8a1ad2f2 (diff)
downloadlibvpx-2b58730aec646e8e0a6203984b70e7d2154d7d84.tar
libvpx-2b58730aec646e8e0a6203984b70e7d2154d7d84.tar.gz
libvpx-2b58730aec646e8e0a6203984b70e7d2154d7d84.tar.bz2
libvpx-2b58730aec646e8e0a6203984b70e7d2154d7d84.zip
Merge "[svc] Fix issue for setting layers through ffmpeg"
Diffstat (limited to 'vpx/src')
-rw-r--r--vpx/src/svc_encodeframe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vpx/src/svc_encodeframe.c b/vpx/src/svc_encodeframe.c
index d4f4e9f38..76aacd2f4 100644
--- a/vpx/src/svc_encodeframe.c
+++ b/vpx/src/svc_encodeframe.c
@@ -524,9 +524,6 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
svc_ctx->spatial_layers);
return VPX_CODEC_INVALID_PARAM;
}
- // use SvcInternal value for number of layers to enable forcing single layer
- // for first frame
- si->layers = svc_ctx->spatial_layers;
res = parse_quantizer_values(svc_ctx, si->quantizers, 0);
if (res != VPX_CODEC_OK) return res;
@@ -538,10 +535,13 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
res = parse_scale_factors(svc_ctx, si->scale_factors);
if (res != VPX_CODEC_OK) return res;
- // parse aggregate command line options
+ // Parse aggregate command line options. Options must start with
+ // "layers=xx" then followed by other options
res = parse_options(svc_ctx, si->options);
if (res != VPX_CODEC_OK) return res;
+ si->layers = svc_ctx->spatial_layers;
+
// Assign target bitrate for each layer. We calculate the ratio
// from the resolution for now.
// TODO(Minghai): Optimize the mechanism of allocating bits after