summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2017-11-17 09:47:03 -0800
committerMarco <marpan@google.com>2017-11-17 14:52:20 -0800
commit559166acfe37ef97bfd43835181773c904ac467b (patch)
tree165fc1559ea0e30d48a030f32f1db191b497c051 /vp9
parent849b3c238d3bc3a1d038d15413b7c96694285ffe (diff)
downloadlibvpx-559166acfe37ef97bfd43835181773c904ac467b.tar
libvpx-559166acfe37ef97bfd43835181773c904ac467b.tar.gz
libvpx-559166acfe37ef97bfd43835181773c904ac467b.tar.bz2
libvpx-559166acfe37ef97bfd43835181773c904ac467b.zip
vp9-svc: Enbale scale partition reference frames.
For reference frames: enable scale partition for superblocks with low source sad or if bsize on lower-resoln is at least 32x32. Keep feature disabled for base temporal layer. Small regression in avgPNSR/SSIM metrics, ~0.5-1%. Speedup ~2-3% on mac for SVC (3 spatial/3 temporal layers) at speed 7. Change-Id: I5987eb7763845b680059128b538bb5188be0cca5
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c6
-rw-r--r--vp9/encoder/vp9_speed_features.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index e3ec823d2..d46a76074 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -962,6 +962,12 @@ static int scale_partitioning_svc(VP9_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd,
// The block size is too big for boundaries. Do variance based partitioning.
if ((!has_rows || !has_cols) && bsize_low > BLOCK_16X16) return 1;
+ // For reference frames: return 1 (do variance-based partitioning) if the
+ // superblock is not low source sad and lower-resoln bsize is below 32x32.
+ if (!cpi->svc.non_reference_frame && !x->skip_low_source_sad &&
+ bsize_low < BLOCK_32X32)
+ return 1;
+
// Scale up block size by 2x2. Force 64x64 for size larger than 32x32.
if (bsize_low < BLOCK_32X32) {
bsize_high = bsize_low + 3;
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 7e52c2b5b..a05db60c6 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -607,10 +607,9 @@ static void set_rt_speed_feature_framesize_independent(
}
// For SVC: enable use of lower resolution partition for higher resolution,
// only for 3 spatial layers and when config/top resolution is above VGA.
- // Enable only for top temporal enhancement layer (which are non-reference
- // frames for the fixed SVC patterns).
+ // Enable only for non-base temporal layer frames.
if (cpi->use_svc && cpi->svc.number_spatial_layers == 3 &&
- cpi->svc.temporal_layer_id == cpi->svc.number_temporal_layers - 1 &&
+ cpi->svc.temporal_layer_id > 0 &&
cpi->oxcf.width * cpi->oxcf.height > 640 * 480)
sf->svc_use_lowres_part = 1;
}