Merge two flags to one for hierarchical structure
Remove the extra flag to simply the decision making for the hierarchical
structure construction.
Change-Id: Iec6650270ee283d82bf51885efe432c79edcd710
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index d860815..5212db2 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -672,7 +672,6 @@
int global_motion_search_done;
tran_low_t *tcoeff_buf[MAX_MB_PLANE];
int extra_arf_allowed;
- int bwd_ref_allowed;
// A flag to indicate if intrabc is ever used in current frame.
int intrabc_used;
int dv_cost[2][MV_VALS];
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 06a0a69..113c068 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -2153,7 +2153,7 @@
// (3) The bi-predictive group interval is strictly smaller than the
// golden group interval.
const int is_bipred_enabled =
- cpi->bwd_ref_allowed && rc->source_alt_ref_pending &&
+ cpi->extra_arf_allowed && rc->source_alt_ref_pending &&
rc->bipred_group_interval &&
rc->bipred_group_interval <=
(rc->baseline_gf_interval - rc->source_alt_ref_pending);
@@ -2524,7 +2524,6 @@
const int arf_active_or_kf = is_key_frame || rc->source_alt_ref_active;
cpi->extra_arf_allowed = 1;
- cpi->bwd_ref_allowed = 1;
// Reset the GF group data structures unless this is a key
// frame in which case it will already have been done.
@@ -2707,7 +2706,7 @@
avg_sr_coded_error / num_mbs < MAX_SR_CODED_ERROR &&
avg_raw_err_stdev < MAX_RAW_ERR_VAR);
- if (disable_bwd_extarf) cpi->extra_arf_allowed = cpi->bwd_ref_allowed = 0;
+ if (disable_bwd_extarf) cpi->extra_arf_allowed = 0;
if (!cpi->extra_arf_allowed) {
cpi->num_extra_arfs = 0;