diff options
author | Paul Wilkins <paulwilkins@google.com> | 2018-09-13 14:21:46 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2018-09-13 14:21:46 +0100 |
commit | f0841f0a4060e5d8e0656b0050a1d5f9a478021e (patch) | |
tree | d91f7ec14e9275f7c209726e0388db6b5aeed66e | |
parent | 8eea617d51672e6dcd6b347d6f8bf5bfe41c2634 (diff) | |
download | libvpx-f0841f0a4060e5d8e0656b0050a1d5f9a478021e.tar libvpx-f0841f0a4060e5d8e0656b0050a1d5f9a478021e.tar.gz libvpx-f0841f0a4060e5d8e0656b0050a1d5f9a478021e.tar.bz2 libvpx-f0841f0a4060e5d8e0656b0050a1d5f9a478021e.zip |
Initial step in deprecating previous dual arf code.
Always use cpi->multi_layer_arf branch if enable_auto_arf >= 2.
Use enable_auto_arf value to indicate max number of ARF
levels to use in multi-arf case.
Further cleanup to of old code follow in seperate patches.
Change-Id: I25cd1e4a119a2d482a15705f5126389054764f9f
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 14 | ||||
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 3 |
2 files changed, 6 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index f300f7111..1e7c17f29 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -5983,16 +5983,10 @@ 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. - // 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; diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index b95e12427..8e27ccd51 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2130,7 +2130,8 @@ static void find_arf_order(VP9_COMP *cpi, GF_GROUP *gf_group, 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; |