struct read_ctx {
int sz; /* Number of buffers currently in the queue */
int read_idx; /* Read index */
int pop_sz; /* Size to check for pop condition */
int valid; /* Is this ctx valid? */
};
struct lookahead_ctx {
int max_sz; /* Absolute size of the queue */
int write_idx; /* Write index */ struct read_ctx read_ctxs[MAX_STAGES]; /* Read context */ struct lookahead_entry *buf; /* Buffer list */
int push_frame_count; /* Number of frames that have been pushed in the queue*/
uint8_t
max_pre_frames; /* Maximum number of past frames allowed in the queue */
}; /*!\endcond */
/**\brief Initializes the lookahead stage * *Thelookaheadstageisaqueueofframebuffersonwhichsomeanalysis *maybedonewhenbuffersareenqueued.
*/ struct lookahead_ctx *av1_lookahead_init(
int width, int height, int subsampling_x, int subsampling_y,
int use_highbitdepth, int depth, int border_in_pixels, int byte_alignment,
int num_lap_buffers, bool is_all_intra, bool alloc_pyramid);
/**\brief Destroys the lookahead stage
*/ void av1_lookahead_destroy(struct lookahead_ctx *ctx);
/**\brief Check if lookahead buffer is full
*/
int av1_lookahead_full(conststruct lookahead_ctx *ctx);