shithub: libvpx

Download patch

ref: 127e8050649f8e9427836aae2a935032f2955d17
parent: 7808cc796ef1b7dde0a5e03f6d71e8a7f0174a1e
parent: 6596fb201d23cb5633d267c9fdf1534ddc47917a
author: Jingning Han <jingning@google.com>
date: Tue Nov 6 12:09:54 EST 2018

Merge "Refactor find_arf_order()"

--- 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 {