ref: 6596fb201d23cb5633d267c9fdf1534ddc47917a
parent: a430020f73104a200627bd24611426327253940b
author: Jingning Han <jingning@google.com>
date: Mon Nov 5 06:12:24 EST 2018
Refactor find_arf_order() Make the maximum layer depth allowed a control parameter in GF_GROUP. No coding stats would change. Change-Id: I9d17167da322831e7013d761980e1c16375a161b
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2116,7 +2116,7 @@
// Process regular P frames
if ((end - start < min_frame_interval) ||
- (depth > cpi->oxcf.enable_auto_arf)) {
+ (depth > gf_group->allowed_max_layer_depth)) {
int idx;
for (idx = start; idx < end; ++idx) {
gf_group->update_type[*index_counter] = LF_UPDATE;
@@ -2210,6 +2210,7 @@
}
if (rc->source_alt_ref_pending && cpi->multi_layer_arf) {
+ gf_group->allowed_max_layer_depth = cpi->oxcf.enable_auto_arf;
find_arf_order(cpi, gf_group, &frame_index, 2, 1, rc->baseline_gf_interval);
set_gf_overlay_frame_type(gf_group, frame_index,
--- a/vp9/encoder/vp9_firstpass.h
+++ b/vp9/encoder/vp9_firstpass.h
@@ -140,6 +140,8 @@
int top_arf_idx;
int stack_size;
int gf_group_size;
+ int max_layer_depth;
+ int allowed_max_layer_depth;
} GF_GROUP;
typedef struct {