summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2017-04-14 17:12:58 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-04-14 17:12:58 +0000
commitb937f1c839b15fa7329ae815cab744eb830fe4c4 (patch)
tree4227323d2bdbd5aac4d9e47adf875459f214e522 /vp9
parentbdb593ab200fc4c4e1f0d4cab35ea7963f61c20e (diff)
parentadb9b4eddf15ce0852e3a891d16ebeced6eadfe7 (diff)
downloadlibvpx-b937f1c839b15fa7329ae815cab744eb830fe4c4.tar
libvpx-b937f1c839b15fa7329ae815cab744eb830fe4c4.tar.gz
libvpx-b937f1c839b15fa7329ae815cab744eb830fe4c4.tar.bz2
libvpx-b937f1c839b15fa7329ae815cab744eb830fe4c4.zip
Merge "vp9: SVC: fix to allow use_base_mv to be used for 3 layers."
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index 1d892dc14..d4232c6b5 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -651,14 +651,17 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
&height);
// The usage of use_base_mv assumes down-scale of 2x2. For now, turn off use
- // of base motion vectors if spatial scale factors for any layers are not 2.
+ // of base motion vectors if spatial scale factors for any layers are not 2,
+ // keep the case of 3 spatial layers with scale factor of 4x4 for base layer.
// TODO(marpan): Fix this to allow for use_base_mv for scale factors != 2.
if (cpi->svc.number_spatial_layers > 1) {
int sl;
for (sl = 0; sl < cpi->svc.number_spatial_layers - 1; ++sl) {
lc = &cpi->svc.layer_context[sl * cpi->svc.number_temporal_layers +
cpi->svc.temporal_layer_id];
- if (lc->scaling_factor_num != lc->scaling_factor_den >> 1) {
+ if ((lc->scaling_factor_num != lc->scaling_factor_den >> 1) &&
+ !(lc->scaling_factor_num == lc->scaling_factor_den >> 2 && sl == 0 &&
+ cpi->svc.number_spatial_layers == 3)) {
cpi->svc.use_base_mv = 0;
break;
}