Abstract internal_altref_allowed to AV1_PRIMARY Moved internal_altref_allowed from AV1_COMP to AV1_PRIMARY. Change-Id: I4bf03d4377f7a2bc48361da9f9114993e1ff8e14
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index a2e8e92..2db1a27 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -2082,6 +2082,11 @@ * structures. */ struct aom_codec_pkt_list *output_pkt_list; + + /*! + * When set, indicates that internal ARFs are enabled. + */ + int internal_altref_allowed; } AV1_PRIMARY; /*! @@ -2498,11 +2503,6 @@ int existing_fb_idx_to_show; /*! - * When set, indicates that internal ARFs are enabled. - */ - int internal_altref_allowed; - - /*! * A flag to indicate if intrabc is ever used in current frame. */ int intrabc_used;
diff --git a/av1/encoder/pass2_strategy.c b/av1/encoder/pass2_strategy.c index db86392..ee8eaa5 100644 --- a/av1/encoder/pass2_strategy.c +++ b/av1/encoder/pass2_strategy.c
@@ -2339,7 +2339,7 @@ int64_t gf_group_bits; const int is_intra_only = rc->frames_since_key == 0; - cpi->internal_altref_allowed = (gf_cfg->gf_max_pyr_height > 1); + cpi->ppi->internal_altref_allowed = (gf_cfg->gf_max_pyr_height > 1); // Reset the GF group data structures unless this is a key // frame in which case it will already have been done. @@ -2457,7 +2457,7 @@ gf_stats.zero_motion_accumulator > MIN_ZERO_MOTION && gf_stats.avg_sr_coded_error / num_mbs < MAX_SR_CODED_ERROR && gf_stats.avg_raw_err_stdev < MAX_RAW_ERR_VAR) { - cpi->internal_altref_allowed = 0; + cpi->ppi->internal_altref_allowed = 0; } int use_alt_ref; @@ -2493,7 +2493,7 @@ // work well for certain other cases. const int allow_gf_length_reduction = ((rc_cfg->mode == AOM_Q && rc_cfg->cq_level <= 128) || - !cpi->internal_altref_allowed) && + !cpi->ppi->internal_altref_allowed) && !is_lossless_requested(rc_cfg); if (allow_gf_length_reduction && use_alt_ref) {