]> granicus.if.org Git - libvpx/commitdiff
SVC fix to set worst/best_quality per layer.
authorMarco <marpan@chromium.org>
Tue, 15 Sep 2015 16:54:19 +0000 (09:54 -0700)
committerMarco <marpan@chromium.org>
Tue, 15 Sep 2015 21:16:07 +0000 (14:16 -0700)
Allow the worst/best_quality to be set per layer via the
VP9E_SET_SVC_PARAMETERS control.

Change-Id: Icba5ec8ac757152f3bb7860d6010d9174a7bd578

vp9/encoder/vp9_svc_layercontext.c

index a6c5373b3881ec06e6c899006ca9b050ba26418f..e2a275c556b916ab0da81a9ac3bc3888b67fc251 100644 (file)
@@ -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);