summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_aq_cyclicrefresh.c
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-09-08 08:47:42 -0700
committerMarco <marpan@chromium.org>2015-09-15 10:06:36 -0700
commiteb53c69ece6b97f65afed81fd4c2ef9624501ea7 (patch)
tree029f3e52d4a4831422f17f9fb6761caba2487921 /vp9/encoder/vp9_aq_cyclicrefresh.c
parent0e1b4fb9415818052b98554d35055aef1c1d6204 (diff)
downloadlibvpx-eb53c69ece6b97f65afed81fd4c2ef9624501ea7.tar
libvpx-eb53c69ece6b97f65afed81fd4c2ef9624501ea7.tar.gz
libvpx-eb53c69ece6b97f65afed81fd4c2ef9624501ea7.tar.bz2
libvpx-eb53c69ece6b97f65afed81fd4c2ef9624501ea7.zip
Add cyclic refresh parameters to svc-layer context.
For 1 pass CBR spatial-SVC: Add cyclic refresh parameters to the svc-layer context. This allows cyclic refresh (aq-mode=3) to be applied to the whole super-frame (all spatial layers). This gives a performance improvement for spatial layer encoding. Addd the aq_mode mode on/off setting as command line option. Change-Id: Ib9c3b5ba3cb7851bfb8c37d4f911664bef38e165
Diffstat (limited to 'vp9/encoder/vp9_aq_cyclicrefresh.c')
-rw-r--r--vp9/encoder/vp9_aq_cyclicrefresh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c
index 625c3d060..e17b39789 100644
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -449,6 +449,10 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
cr->motion_thresh = 32;
cr->rate_boost_fac = 17;
}
+ if (cpi->svc.spatial_layer_id > 0) {
+ cr->motion_thresh = 4;
+ cr->rate_boost_fac = 12;
+ }
}
// Setup cyclic background refresh: set delta q and segmentation map.
@@ -460,11 +464,10 @@ void vp9_cyclic_refresh_setup(VP9_COMP *const cpi) {
const int apply_cyclic_refresh = apply_cyclic_refresh_bitrate(cm, rc);
if (cm->current_video_frame == 0)
cr->low_content_avg = 0.0;
- // Don't apply refresh on key frame or enhancement layer frames.
+ // Don't apply refresh on key frame or temporal enhancement layer frames.
if (!apply_cyclic_refresh ||
(cm->frame_type == KEY_FRAME) ||
- (cpi->svc.temporal_layer_id > 0) ||
- (cpi->svc.spatial_layer_id > 0)) {
+ (cpi->svc.temporal_layer_id > 0)) {
// Set segmentation map to 0 and disable.
unsigned char *const seg_map = cpi->segmentation_map;
memset(seg_map, 0, cm->mi_rows * cm->mi_cols);