AOMedia AV1 Codec: Temporal Dependency Modelling

| AOMedia AV1 Codec

Temporal Dependency Modelling
Encoder Algorithm » High-level Algorithm

## Functions
static void | setup_delta_q (AV1_COMP *const cpi, ThreadData *td, MACROBLOCK *const x, const TileInfo *const tile_info, int mi_row, int mi_col, int num_planes)
| Assigns different quantization parameters to each superblock based on statistics relevant to the selected delta-q mode (TPL weight, variance, HDR, etc).
int | av1_tpl_setup_stats (struct AV1_COMP *cpi, int gop_eval, const struct EncodeFrameParams *const frame_params)
| Implements temporal dependency modelling for a GOP (GF/ARF group) and selects between 16 and 32 frame GOP structure.

## Detailed Description

This module includes algorithms to implement temporal dependency modelling. See also Temporal Dependency Modelling

## Function Documentation

## ◆ setup_delta_q()

void setup_delta_q | ( | AV1_COMP *const | cpi,
|  | ThreadData * | td,
|  | MACROBLOCK *const | x,
|  | const TileInfo *const | tile_info,
|  | int | mi_row,
|  | int | mi_col,
|  | int | num_planes )
| inlinestatic

Assigns different quantization parameters to each superblock based on statistics relevant to the selected delta-q mode (TPL weight, variance, HDR, etc).

Parameters

  [in] | cpi | Top level encoder instance structure
  [in,out] | td | Thread data structure
  [in,out] | x | Superblock level data for this block.
  [in] | tile_info | Tile information / identification
  [in] | mi_row | Block row (in "MI_SIZE" units) index
  [in] | mi_col | Block column (in "MI_SIZE" units) index
  [out] | num_planes | Number of image planes (e.g. Y,U,V)

Remarks
  No return value but updates superblock and thread data related to the q / q delta to be used.

References AV1EncoderConfig::algo_cfg, CommonQuantParams::base_qindex, AV1_COMP::common, macroblockd::current_base_qindex, MB_MODE_INFO::current_qindex, MB_MODE_INFO::delta_lf, MB_MODE_INFO::delta_lf_from_base, AV1Common::delta_q_info, macroblock::delta_qindex, AV1_COMP::ducky_encode_info, macroblock::e_mbd, AlgoCfg::enable_tpl_model, AV1_COMP::ext_ratectrl, macroblockd::mi, CommonModeInfoParams::mi_alloc, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, AV1_COMP::oxcf, AV1Common::quant_params, macroblock::rdmult_cur_qindex, macroblock::rdmult_delta_qindex, macroblock::sb_energy_level, MB_MODE_INFO::segment_id, AV1Common::seq_params, AV1_COMP::source, and AV1_COMP::use_ducky_encode.

## ◆ av1_tpl_setup_stats()

int av1_tpl_setup_stats | ( | struct AV1_COMP * | cpi,
|  | int | gop_eval,
|  | const struct EncodeFrameParams *const | frame_params )

Implements temporal dependency modelling for a GOP (GF/ARF group) and selects between 16 and 32 frame GOP structure.

Parameters

  [in] | cpi | Top - level encoder instance structure
  [in] | gop_eval | Flag if it is in the GOP length decision stage
  [in] | frame_params | Per frame encoding parameters

Returns
  Indicates whether or not we should use a longer GOP length.