ref: f9b28eab5b92e83a38182efa87496a19555301c3
parent: a9659f63927bdbaf79a08689309624f572e9d9fc
parent: f0841f0a4060e5d8e0656b0050a1d5f9a478021e
author: Jingning Han <jingning@google.com>
date: Thu Sep 13 12:57:52 EDT 2018
Merge "Initial step in deprecating previous dual arf code."
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5984,16 +5984,10 @@
// 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.
- // 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)
+ // Enable the Jingning's new "multi_layer_arf" code if "enable_auto_arf"
+ // is greater than or equal to 2.
+ 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;
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2130,7 +2130,8 @@
int idx;
// Process regular P frames
- if (end - start < min_frame_interval) {
+ if ((end - start < min_frame_interval) ||
+ (depth > cpi->oxcf.enable_auto_arf)) {
int idx;
for (idx = start; idx < end; ++idx) {
gf_group->update_type[*index_counter] = LF_UPDATE;