diff options
author | Marco Paniconi <marpan@google.com> | 2018-06-30 00:04:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-30 00:04:39 +0000 |
commit | 914d5abb5cb1f5944247ad06e042f96966ac5ffc (patch) | |
tree | a018364aa2c79b2a8deeaa1db61679c99738af18 /vp9 | |
parent | 8e01faee050da18f3791439d9737ee31ea05b935 (diff) | |
parent | e92a68c226f6de7a87d3e9d992651f799b0b117c (diff) | |
download | libvpx-914d5abb5cb1f5944247ad06e042f96966ac5ffc.tar libvpx-914d5abb5cb1f5944247ad06e042f96966ac5ffc.tar.gz libvpx-914d5abb5cb1f5944247ad06e042f96966ac5ffc.tar.bz2 libvpx-914d5abb5cb1f5944247ad06e042f96966ac5ffc.zip |
Merge "vp9: Reduce quality artifact for real-time scene-content."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 80f968f14..73d888101 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -592,6 +592,11 @@ void vp9_set_variance_partition_thresholds(VP9_COMP *cpi, int q, cpi->vbp_threshold_copy = (cpi->y_dequant[q][1] << 3) > 8000 ? (cpi->y_dequant[q][1] << 3) : 8000; + if (cpi->rc.high_source_sad || + (cpi->use_svc && cpi->svc.high_source_sad_superframe)) { + cpi->vbp_threshold_sad = 0; + cpi->vbp_threshold_copy = 0; + } } cpi->vbp_threshold_minmax = 15 + (q >> 3); } @@ -1213,6 +1218,9 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, int pixels_wide = 64, pixels_high = 64; int64_t thresholds[4] = { cpi->vbp_thresholds[0], cpi->vbp_thresholds[1], cpi->vbp_thresholds[2], cpi->vbp_thresholds[3] }; + int scene_change_detected = + cpi->rc.high_source_sad || + (cpi->use_svc && cpi->svc.high_source_sad_superframe); // For the variance computation under SVC mode, we treat the frame as key if // the reference (base layer frame) is key frame (i.e., is_key_frame == 1). @@ -1274,6 +1282,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, } // If source_sad is low copy the partition without computing the y_sad. if (x->skip_low_source_sad && cpi->sf.copy_partition_flag && + !scene_change_detected && copy_partitioning(cpi, x, xd, mi_row, mi_col, segment_id, sb_offset)) { x->sb_use_mv_part = 1; if (cpi->sf.svc_use_lowres_part && @@ -1302,7 +1311,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, // Index for force_split: 0 for 64x64, 1-4 for 32x32 blocks, // 5-20 for the 16x16 blocks. - force_split[0] = 0; + force_split[0] = scene_change_detected; if (!is_key_frame) { // In the case of spatial/temporal scalable coding, the assumption here is |