summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-09-07 10:25:07 -0700
committerJingning Han <jingning@google.com>2018-09-07 10:31:25 -0700
commit74a334da7a2a0d7fa75d4bc4c859445c5780f08d (patch)
treedab8c5b7d2d6015c86c17bb02ed4084845fc484c
parent8db47dfee5603121f074d3c0296b594e69a5e45c (diff)
downloadlibvpx-74a334da7a2a0d7fa75d4bc4c859445c5780f08d.tar
libvpx-74a334da7a2a0d7fa75d4bc4c859445c5780f08d.tar.gz
libvpx-74a334da7a2a0d7fa75d4bc4c859445c5780f08d.tar.bz2
libvpx-74a334da7a2a0d7fa75d4bc4c859445c5780f08d.zip
Fork auto-alt-ref control
Temporarily fork the auto-alt-ref control meaning. When it is set to be 1, use single layer ARF as baseline. The value 2 would enable dual ARF system. Any number above it would trigger automatic multi- layer ARFs. We would gradually refactor and integrate dual ARF and multi-layer ARF systems next, and eventually make auto-alt-ref directly control the layer depth. Change-Id: I292d27111ae8a596b97444afecf4b896043e543f
-rw-r--r--vp9/encoder/vp9_encoder.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 714c8a241..6cece62b4 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6098,11 +6098,20 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
// Is multi-arf enabled.
// Note that at the moment multi_arf is only configured for 2 pass VBR and
// will not work properly with svc.
- if ((oxcf->pass == 2) && !cpi->use_svc && (cpi->oxcf.enable_auto_arf > 1))
+ // TODO(jingning): enable dual ARF encoding when auto-alt-ref is set to be 2.
+ // We will refactor and integrate the dual ARF and multi-layer ARF system
+ // next and deprecate this special control setting, instead make auto-alt-ref
+ // directly controls the ARF layer depth.
+ if ((oxcf->pass == 2) && !cpi->use_svc && (cpi->oxcf.enable_auto_arf == 2))
cpi->multi_arf_allowed = 1;
else
cpi->multi_arf_allowed = 0;
+ if (oxcf->pass == 2 && !cpi->use_svc && cpi->oxcf.enable_auto_arf > 2)
+ cpi->multi_layer_arf = 1;
+ else
+ cpi->multi_layer_arf = 0;
+
// Normal defaults
cm->reset_frame_context = 0;
cm->refresh_frame_context = 1;