AOMedia AV1 Codec: FIRSTPASS_STATS Struct Reference

| AOMedia AV1 Codec

Data Fields
FIRSTPASS_STATS Struct Reference

The stucture of acummulated frame stats in the first pass. More...

`#include <firstpass.h>`

## Data Fields
double | frame
double | weight
double | intra_error
double | frame_avg_wavelet_energy
double | coded_error
double | sr_coded_error
double | pcnt_inter
double | pcnt_motion
double | pcnt_second_ref
double | pcnt_neutral
double | intra_skip_pct
double | inactive_zone_rows
double | inactive_zone_cols
double | MVr
double | mvr_abs
double | MVc
double | mvc_abs
double | MVrv
double | MVcv
double | mv_in_out_count
double | new_mv_count
double | duration
double | count
double | raw_error_stdev
int64_t | is_flash
double | noise_var
double | cor_coeff
double | log_intra_error
double | log_coded_error

## Detailed Description

The stucture of acummulated frame stats in the first pass.

Errors (coded_error, intra_error, etc.) and counters (new_mv_count) are normalized to each MB. MV related stats (MVc, MVr, etc.) are normalized to the frame width and height. See function normalize_firstpass_stats.

## Field Documentation

## ◆ frame

double FIRSTPASS_STATS::frame

Frame number in display order, if stats are for a single frame. No real meaning for a collection of frames.

## ◆ weight

double FIRSTPASS_STATS::weight

Weight assigned to this frame (or total weight for the collection of frames) currently based on intra factor and brightness factor. This is used to distribute bits betweeen easier and harder frames.

## ◆ intra_error

double FIRSTPASS_STATS::intra_error

Intra prediction error.

Referenced by find_next_key_frame().

## ◆ frame_avg_wavelet_energy

double FIRSTPASS_STATS::frame_avg_wavelet_energy

Average wavelet energy computed using Discrete Wavelet Transform (DWT).

## ◆ coded_error

double FIRSTPASS_STATS::coded_error

Best of intra pred error and inter pred error using last frame as ref.

## ◆ sr_coded_error

double FIRSTPASS_STATS::sr_coded_error

Best of intra pred error and inter pred error using golden frame as ref.

## ◆ pcnt_inter

double FIRSTPASS_STATS::pcnt_inter

Percentage of blocks with inter pred error < intra pred error.

## ◆ pcnt_motion

double FIRSTPASS_STATS::pcnt_motion

Percentage of blocks using (inter prediction and) non-zero motion vectors.

## ◆ pcnt_second_ref

double FIRSTPASS_STATS::pcnt_second_ref

Percentage of blocks where golden frame was better than last or intra: inter pred error using golden frame < inter pred error using last frame and inter pred error using golden frame < intra pred error

## ◆ pcnt_neutral

double FIRSTPASS_STATS::pcnt_neutral

Percentage of blocks where intra and inter prediction errors were very close. Note that this is a 'weighted count', that is, the so blocks may be weighted by how close the two errors were.

## ◆ intra_skip_pct

double FIRSTPASS_STATS::intra_skip_pct

Percentage of blocks that have almost no intra error residual (i.e. are in effect completely flat and untextured in the intra domain). In natural videos this is uncommon, but it is much more common in animations, graphics and screen content, so may be used as a signal to detect these types of content.

## ◆ inactive_zone_rows

double FIRSTPASS_STATS::inactive_zone_rows

Image mask rows top and bottom.

## ◆ inactive_zone_cols

double FIRSTPASS_STATS::inactive_zone_cols

Image mask columns at left and right edges.

## ◆ MVr

double FIRSTPASS_STATS::MVr

Average of row motion vectors.

## ◆ mvr_abs

double FIRSTPASS_STATS::mvr_abs

Mean of absolute value of row motion vectors.

## ◆ MVc

double FIRSTPASS_STATS::MVc

Mean of column motion vectors.

## ◆ mvc_abs

double FIRSTPASS_STATS::mvc_abs

Mean of absolute value of column motion vectors.

## ◆ MVrv

double FIRSTPASS_STATS::MVrv

Variance of row motion vectors.

## ◆ MVcv

double FIRSTPASS_STATS::MVcv

Variance of column motion vectors.

## ◆ mv_in_out_count

double FIRSTPASS_STATS::mv_in_out_count

Value in range [-1,1] indicating fraction of row and column motion vectors that point inwards (negative MV value) or outwards (positive MV value). For example, value of 1 indicates, all row/column MVs are inwards.

## ◆ new_mv_count

double FIRSTPASS_STATS::new_mv_count

Count of unique non-zero motion vectors.

## ◆ duration

double FIRSTPASS_STATS::duration

Duration of the frame / collection of frames.

## ◆ count

double FIRSTPASS_STATS::count

1.0 if stats are for a single frame, OR Number of frames in this collection for which the stats are accumulated.

## ◆ raw_error_stdev

double FIRSTPASS_STATS::raw_error_stdev

standard deviation for (0, 0) motion prediction error

## ◆ is_flash

int64_t FIRSTPASS_STATS::is_flash

Whether the frame contains a flash

## ◆ noise_var

double FIRSTPASS_STATS::noise_var

Estimated noise variance

Referenced by calculate_gf_length().

## ◆ cor_coeff

double FIRSTPASS_STATS::cor_coeff

Correlation coefficient with the previous frame

Referenced by calculate_gf_length().

## ◆ log_intra_error

double FIRSTPASS_STATS::log_intra_error

log of intra_error

## ◆ log_coded_error

double FIRSTPASS_STATS::log_coded_error

log of coded_error

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

- av1/encoder/firstpass.h