AOMedia AV1 Codec
|
Describes look ahead buffer operations. More...
#include <stdbool.h>
#include "aom_scale/yv12config.h"
#include "aom/aom_integer.h"
Go to the source code of this file.
Functions | |
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. | |
void | av1_lookahead_destroy (struct lookahead_ctx *ctx) |
Destroys the lookahead stage. | |
int | av1_lookahead_full (const struct lookahead_ctx *ctx) |
Check if lookahead buffer is full. | |
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. | |
struct lookahead_entry * | av1_lookahead_pop (struct lookahead_ctx *ctx, int drain, COMPRESSOR_STAGE stage) |
Get the next source buffer to encode. | |
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_pop_sz (struct lookahead_ctx *ctx, COMPRESSOR_STAGE stage) |
Get pop_sz value. | |
Describes look ahead buffer operations.
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.
The lookahead stage is a queue of frame buffers on which some analysis may be done when buffers are enqueued.
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.
This function will copy the source image into a new framebuffer with the expected stride/border.
[in] | ctx | Pointer to the lookahead context |
[in] | src | Pointer to the image to enqueue |
[in] | ts_start | Timestamp for the start of this frame |
[in] | ts_end | Timestamp for the end of this frame |
[in] | use_highbitdepth | Tell if HBD is used |
[in] | alloc_pyramid | Whether to allocate a downsampling pyramid for each frame buffer |
[in] | flags | Flags set on this frame |
Referenced by av1_receive_raw_frame().
struct lookahead_entry * av1_lookahead_pop | ( | struct lookahead_ctx * | ctx, |
int | drain, | ||
COMPRESSOR_STAGE | stage ) |
Get the next source buffer to encode.
[in] | ctx | Pointer to the lookahead context |
[in] | drain | Flag indicating the buffer should be drained (return a buffer regardless of the current queue depth) |
[in] | stage | Encoder stage |
Return | NULL, if drain set and queue is empty, or if drain not set and queue not of the configured depth. |
struct lookahead_entry * av1_lookahead_peek | ( | struct lookahead_ctx * | ctx, |
int | index, | ||
COMPRESSOR_STAGE | stage ) |
Get a future source buffer to encode.
[in] | ctx | Pointer to the lookahead context |
[in] | index | Index of the frame to be returned, 0 == next frame |
[in] | stage | Encoder stage |
Return | NULL, if no buffer exists at the specified index |
Referenced by av1_encode_strategy(), and tf_setup_filtering_buffer().