FPMT: Abstract fb_of_context_type to AV1_PRIMARY
Moved fb_of_context_type from AV1_COMP to AV1_PRIMARY.
Change-Id: I04bb1d59c54f6673df074048a2aa6292e69d01a9
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index c79b38e..c6e3852 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -255,7 +255,7 @@
// Find the most recent reference frame with the same reference type as the
// current frame
const int current_ref_type = get_current_frame_ref_type(cpi, frame_params);
- int wanted_fb = cpi->fb_of_context_type[current_ref_type];
+ int wanted_fb = cpi->ppi->fb_of_context_type[current_ref_type];
int primary_ref_frame = PRIMARY_REF_NONE;
for (int ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ref_frame++) {
@@ -1848,7 +1848,7 @@
}
if (!is_stat_generation_stage(cpi)) {
- update_fb_of_context_type(cpi, &frame_params, cpi->fb_of_context_type);
+ update_fb_of_context_type(cpi, &frame_params, cpi->ppi->fb_of_context_type);
set_additional_frame_flags(cm, frame_flags);
update_rc_counts(cpi);
}
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 6ce16e7..38cd47d 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -2363,6 +2363,14 @@
*/
FRAME_COUNTS aggregate_fc;
#endif // CONFIG_ENTROPY_STATS
+
+ /*!
+ * For each type of reference frame, this contains the index of a reference
+ * frame buffer for a reference frame of the same type. We use this to
+ * choose our primary reference frame (which is the most recent reference
+ * frame of the same type as the current frame).
+ */
+ int fb_of_context_type[REF_FRAMES];
} AV1_PRIMARY;
/*!
@@ -2509,14 +2517,6 @@
RefreshFrameFlagsInfo refresh_frame;
/*!
- * For each type of reference frame, this contains the index of a reference
- * frame buffer for a reference frame of the same type. We use this to
- * choose our primary reference frame (which is the most recent reference
- * frame of the same type as the current frame).
- */
- int fb_of_context_type[REF_FRAMES];
-
- /*!
* Flags signalled by the external interface at frame level.
*/
ExternalFlags ext_flags;