diff options
author | Marco Paniconi <marpan@google.com> | 2018-05-30 16:01:53 -0700 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2018-05-30 20:15:03 -0700 |
commit | e2726cd02d63628ec20f0c09e36cc3d59b2d23d9 (patch) | |
tree | 4fcfbbf940a3307e64f30cee4398abed239e6737 /vp9 | |
parent | d7a80012a06f67ee0130864b1f89e394778a1f02 (diff) | |
download | libvpx-e2726cd02d63628ec20f0c09e36cc3d59b2d23d9.tar libvpx-e2726cd02d63628ec20f0c09e36cc3d59b2d23d9.tar.gz libvpx-e2726cd02d63628ec20f0c09e36cc3d59b2d23d9.tar.bz2 libvpx-e2726cd02d63628ec20f0c09e36cc3d59b2d23d9.zip |
vp9-svc: Fix to compute some metrics on top spatiail layer.
The avg_frame_low_motion and consec_zeromv are frame-level
metrics that are updated on every frame. For SVC these should be
updated on top spatial layer (full resolution).
Small/negligible change in metrics.
Change-Id: Ibe14f05be3b82daa9dd60378097ff11a27f1b95e
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 6 | ||||
-rw-r--r-- | vp9/encoder/vp9_ratectrl.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index c7e9f9b2a..90906cc46 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -5235,7 +5235,11 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td, TOKENEXTRA **t, ++td->counts->tx.tx_totals[get_uv_tx_size(mi, &xd->plane[1])]; if (cm->seg.enabled && cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) vp9_cyclic_refresh_update_sb_postencode(cpi, mi, mi_row, mi_col, bsize); - if (cpi->oxcf.pass == 0 && cpi->svc.temporal_layer_id == 0) + if (cpi->oxcf.pass == 0 && cpi->svc.temporal_layer_id == 0 && + (!cpi->use_svc || + (cpi->use_svc && + !cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame && + cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1))) update_zeromv_cnt(cpi, mi, mi_row, mi_col, bsize); } } diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 70b3a7ab6..11547fb2e 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -1610,7 +1610,11 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) { } if (oxcf->pass == 0) { - if (cm->frame_type != KEY_FRAME) { + if (cm->frame_type != KEY_FRAME && + (!cpi->use_svc || + (cpi->use_svc && + !cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame && + cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1))) { compute_frame_low_motion(cpi); if (cpi->sf.use_altref_onepass) update_altref_usage(cpi); } |