summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-09-15 09:54:19 -0700
committerMarco <marpan@chromium.org>2015-09-15 14:16:07 -0700
commit15c43d9ac78785036f84ef35c6418b3db93ed4a0 (patch)
tree9714c5ffc415f048965c8f50b2a653c5a324131d /vp9
parent0e1b4fb9415818052b98554d35055aef1c1d6204 (diff)
downloadlibvpx-15c43d9ac78785036f84ef35c6418b3db93ed4a0.tar
libvpx-15c43d9ac78785036f84ef35c6418b3db93ed4a0.tar.gz
libvpx-15c43d9ac78785036f84ef35c6418b3db93ed4a0.tar.bz2
libvpx-15c43d9ac78785036f84ef35c6418b3db93ed4a0.zip
SVC fix to set worst/best_quality per layer.
Allow the worst/best_quality to be set per layer via the VP9E_SET_SVC_PARAMETERS control. Change-Id: Icba5ec8ac757152f3bb7860d6010d9174a7bd578
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index a6c5373b3..e2a275c55 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -504,6 +504,14 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
cpi->svc.number_temporal_layers +
cpi->svc.temporal_layer_id];
+ // Setting the worst/best_quality via the encoder control: SET_SVC_PARAMETERS,
+ // only for non-BYPASS mode for now.
+ if (cpi->svc.temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
+ RATE_CONTROL *const lrc = &lc->rc;
+ lrc->worst_quality = vp9_quantizer_to_qindex(lc->max_q);
+ lrc->best_quality = vp9_quantizer_to_qindex(lc->min_q);
+ }
+
get_layer_resolution(cpi->oxcf.width, cpi->oxcf.height,
lc->scaling_factor_num, lc->scaling_factor_den,
&width, &height);