15#ifndef AOM_AV1_ENCODER_LOOKAHEAD_H_
16#define AOM_AV1_ENCODER_LOOKAHEAD_H_
20#include "aom_scale/yv12config.h"
21#include "aom/aom_integer.h"
28#define MAX_LAG_BUFFERS 48
29#define MAX_LAP_BUFFERS 48
30#define MAX_TOTAL_BUFFERS (MAX_LAG_BUFFERS + MAX_LAP_BUFFERS)
31#define LAP_LAG_IN_FRAMES 17
33struct lookahead_entry {
42#define MAX_PRE_FRAMES 1
44enum { ENCODE_STAGE, LAP_STAGE, MAX_STAGES } UENUM1BYTE(COMPRESSOR_STAGE);
56 struct read_ctx read_ctxs[MAX_STAGES];
57 struct lookahead_entry *buf;
70 unsigned int width,
unsigned int height,
unsigned int subsampling_x,
71 unsigned int subsampling_y,
int use_highbitdepth,
unsigned int depth,
72 const int border_in_pixels,
int byte_alignment,
int num_lap_buffers,
73 bool is_all_intra,
bool alloc_pyramid);
98 int64_t ts_start, int64_t ts_end,
int use_highbitdepth,
112 COMPRESSOR_STAGE stage);
123 COMPRESSOR_STAGE stage);
128 COMPRESSOR_STAGE stage);
long aom_enc_frame_flags_t
Encoded Frame Flags.
Definition aom_encoder.h:377
struct lookahead_entry * av1_lookahead_pop(struct lookahead_ctx *ctx, int drain, COMPRESSOR_STAGE stage)
Get the next source buffer to encode.
struct lookahead_ctx * av1_lookahead_init(unsigned int width, unsigned int height, unsigned int subsampling_x, unsigned int subsampling_y, int use_highbitdepth, unsigned int depth, const int border_in_pixels, int byte_alignment, int num_lap_buffers, bool is_all_intra, bool alloc_pyramid)
Initializes the lookahead stage.
struct lookahead_entry * av1_lookahead_peek(struct lookahead_ctx *ctx, int index, COMPRESSOR_STAGE stage)
Get a future source buffer to encode.
unsigned int av1_lookahead_depth(struct lookahead_ctx *ctx, COMPRESSOR_STAGE stage)
Get the number of frames currently in the lookahead queue.
int av1_lookahead_full(const struct lookahead_ctx *ctx)
Check if lookahead buffer is full.
int av1_lookahead_pop_sz(struct lookahead_ctx *ctx, COMPRESSOR_STAGE stage)
Get pop_sz value.
int av1_lookahead_push(struct lookahead_ctx *ctx, const YV12_BUFFER_CONFIG *src, int64_t ts_start, int64_t ts_end, int use_highbitdepth, bool alloc_pyramid, aom_enc_frame_flags_t flags)
Enqueue a source buffer.
void av1_lookahead_destroy(struct lookahead_ctx *ctx)
Destroys the lookahead stage.
YV12 frame buffer data structure.
Definition yv12config.h:46