summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-10-01 15:46:06 -0700
committerMarco <marpan@chromium.org>2015-10-06 08:56:15 -0700
commit7266bedc041b4bbc3e823226f14d70e97892d959 (patch)
tree4f920c345dae309f173717f8f9c9f0e6730d279b /vp9/encoder/vp9_ratectrl.c
parentb2120948391f8beb7ff74bd46b83da1ff2020f49 (diff)
downloadlibvpx-7266bedc041b4bbc3e823226f14d70e97892d959.tar
libvpx-7266bedc041b4bbc3e823226f14d70e97892d959.tar.gz
libvpx-7266bedc041b4bbc3e823226f14d70e97892d959.tar.bz2
libvpx-7266bedc041b4bbc3e823226f14d70e97892d959.zip
Add first_spatial_layer_to_encode to SVC.
Use the existing VP9_SET_SVC control to set the first spatial layer to encode. Since we loop over all spatial layers inside the encoder, the setting of spatial_layer_id via VP9_SET_SVC has no relevance. Use it instead to set the first_spatial_layer_to_encode, which allows an application to skip encoding lower layer(s). Change only affects the 1 pass CBR SVC. Change-Id: I5d63ab713c3e250fdf42c637f38d5ec8f60cd1fb
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 20e72758e..5f308e117 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1595,7 +1595,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
cpi->ref_frame_flags &= (~VP9_ALT_FLAG);
} else if (is_one_pass_cbr_svc(cpi)) {
LAYER_CONTEXT *lc = &cpi->svc.layer_context[layer];
- if (cpi->svc.spatial_layer_id == 0) {
+ if (cpi->svc.spatial_layer_id == cpi->svc.first_spatial_layer_to_encode) {
lc->is_key_frame = 0;
} else {
lc->is_key_frame =