FIRSTPASS_INFO Struct Reference

Data structure used for managing first pass stats. More...

`#include <firstpass.h>`

## Data Fields

FIRSTPASS_STATS | static_stats_buf [(MAX_LAP_BUFFERS+1)]
FIRSTPASS_STATS * | stats_buf
int | stats_buf_size
int | start_index
int | stats_count
int | cur_index
int | future_stats_count
int | past_stats_count
FIRSTPASS_STATS | total_stats

## Detailed Description

Data structure used for managing first pass stats.

## Field Documentation

## static_stats_buf

FIRSTPASS_STATS FIRSTPASS_INFO::static_stats_buf[(MAX_LAP_BUFFERS+1)]

A static buffer that will be used when no ext_stats_buf is assigned. The ext_stats_buf is assigned through av1_firstpass_info_init() when the user already has a pre-existing firstpass stats that is stored in an external buffer. The ext_stats_buf is usually used in two pass mode. When using one pass mode, we generate "firstpass" stats and encode the video in the same pass. In this scenario, the stats will be pushed and popped from static_stats_buf.

## stats_buf

FIRSTPASS_STATS* FIRSTPASS_INFO::stats_buf

A pointer to first pass stats. Note that this buffer will be used as ring buffer.

## stats_buf_size

int FIRSTPASS_INFO::stats_buf_size

size of stats_buf

## start_index

int FIRSTPASS_INFO::start_index

start index of the available frame stats Note that start_index doesn't always point to current frame's stats because we need to keep past stats as well. To access current frame's stats, please use cur_index.

## stats_count

int FIRSTPASS_INFO::stats_count

count available stats stored in stats_buf the following condition should stay true stats_count = future_stats_count + past_stats_count

## cur_index

int FIRSTPASS_INFO::cur_index

index of the current frame's stats

## future_stats_count

int FIRSTPASS_INFO::future_stats_count

count available future stats including current stats

## past_stats_count

int FIRSTPASS_INFO::past_stats_count

count available past stats EXCLUDING current stats

## total_stats

FIRSTPASS_STATS FIRSTPASS_INFO::total_stats

Accumulation of the stats being pushed into firstpass_info

Referenced by find_next_key_frame().

The documentation for this struct was generated from the following file:

- av1/encoder/firstpass.h