AOMedia AV1 Codec: CommonModeInfoParams Struct Reference

| AOMedia AV1 Codec

Data Fields
CommonModeInfoParams Struct Reference

Params related to MB_MODE_INFO arrays and related info. More...

`#include <av1_common_int.h>`

## Data Fields
int | mb_rows
int | mb_cols
int | MBs
int | mi_rows
int | mi_cols
MB_MODE_INFO * | mi_alloc
int | mi_alloc_size
int | mi_alloc_stride
BLOCK_SIZE | mi_alloc_bsize
MB_MODE_INFO ** | mi_grid_base
int | mi_grid_size
int | mi_stride
TX_TYPE * | tx_type_map
Function pointers to allow separate logic for encoder and decoder.
void(* | free_mi )(struct CommonModeInfoParams *mi_params)
void(* | setup_mi )(struct CommonModeInfoParams *mi_params)
void(* | set_mb_mi )(struct CommonModeInfoParams *mi_params, int width, int height, BLOCK_SIZE min_partition_size)

## Detailed Description

Params related to MB_MODE_INFO arrays and related info.

## Field Documentation

## ◆ mb_rows

int CommonModeInfoParams::mb_rows

Number of rows in the frame in 16 pixel units. This is computed from frame height aligned to a multiple of 8.

## ◆ mb_cols

int CommonModeInfoParams::mb_cols

Number of cols in the frame in 16 pixel units. This is computed from frame width aligned to a multiple of 8.

## ◆ MBs

int CommonModeInfoParams::MBs

Total MBs = mb_rows * mb_cols.

Referenced by av1_encodedframe_overshoot_cbr(), define_kf_interval(), and get_twopass_worst_quality().

## ◆ mi_rows

int CommonModeInfoParams::mi_rows

Number of rows in the frame in 4 pixel (MB_MODE_INFO) units. This is computed from frame height aligned to a multiple of 8.

Referenced by av1_encode_frame(), av1_init_layer_context(), av1_nonrd_pick_inter_mode_sb(), av1_nonrd_use_partition(), av1_one_pass_cbr_svc_start_layer(), av1_rd_use_partition(), av1_update_layer_context_change_config(), encode_sb(), encode_without_recode(), get_sb_source_sad(), handle_inter_mode(), rc_scene_detection_onepass_rt(), rc_spatial_act_onepass_rt(), and setup_delta_q().

## ◆ mi_cols

int CommonModeInfoParams::mi_cols

Number of cols in the frame in 4 pixel (MB_MODE_INFO) units. This is computed from frame width aligned to a multiple of 8.

Referenced by av1_encode_frame(), av1_init_layer_context(), av1_nonrd_pick_inter_mode_sb(), av1_nonrd_use_partition(), av1_one_pass_cbr_svc_start_layer(), av1_rd_use_partition(), av1_update_layer_context_change_config(), encode_sb(), encode_without_recode(), get_sb_source_sad(), handle_inter_mode(), rc_scene_detection_onepass_rt(), rc_spatial_act_onepass_rt(), and setup_delta_q().

## ◆ mi_alloc

MB_MODE_INFO* CommonModeInfoParams::mi_alloc

An array of MB_MODE_INFO structs for every 'mi_alloc_bsize' sized block in the frame. Note: This array should be treated like a scratch memory, and should NOT be accessed directly, in most cases. Please use 'mi_grid_base' array instead.

Referenced by encode_rd_sb(), and setup_delta_q().

## ◆ mi_alloc_size

int CommonModeInfoParams::mi_alloc_size

Number of allocated elements in 'mi_alloc'.

## ◆ mi_alloc_stride

int CommonModeInfoParams::mi_alloc_stride

Stride for 'mi_alloc' array.

## ◆ mi_alloc_bsize

BLOCK_SIZE CommonModeInfoParams::mi_alloc_bsize

The minimum block size that each element in 'mi_alloc' can correspond to. For decoder, this is always BLOCK_4X4. For encoder, this is BLOCK_8X8 for resolution >= 4k case or REALTIME mode case. Otherwise, this is BLOCK_4X4.

Referenced by encode_frame_internal().

## ◆ mi_grid_base

MB_MODE_INFO** CommonModeInfoParams::mi_grid_base

Grid of pointers to 4x4 MB_MODE_INFO structs allocated in 'mi_alloc'. It's possible that:

- Multiple pointers in the grid point to the same element in 'mi_alloc' (for example, for all 4x4 blocks that belong to the same partition block).
- Some pointers can be NULL (for example, for blocks outside visible area).

Referenced by encode_nonrd_sb(), encode_rd_sb(), and pick_sb_modes_nonrd().

## ◆ mi_grid_size

int CommonModeInfoParams::mi_grid_size

Number of allocated elements in 'mi_grid_base' (and 'tx_type_map' also).

## ◆ mi_stride

int CommonModeInfoParams::mi_stride

Stride for 'mi_grid_base' (and 'tx_type_map' also).

Referenced by av1_nonrd_use_partition(), av1_rd_use_partition(), and encode_nonrd_sb().

## ◆ tx_type_map

TX_TYPE* CommonModeInfoParams::tx_type_map

An array of tx types for each 4x4 block in the frame. Number of allocated elements is same as 'mi_grid_size', and stride is same as 'mi_grid_size'. So, indexing into 'tx_type_map' is same as that of 'mi_grid_base'.

## ◆ free_mi

void(* CommonModeInfoParams::free_mi) (struct CommonModeInfoParams *mi_params)

Free the memory allocated to arrays in 'mi_params'.

Parameters

  [in,out] | mi_params | object containing common mode info parameters

## ◆ setup_mi

void(* CommonModeInfoParams::setup_mi) (struct CommonModeInfoParams *mi_params)

Initialize / reset appropriate arrays in 'mi_params'.

Parameters

  [in,out] | mi_params | object containing common mode info parameters

Referenced by encode_frame_internal().

## ◆ set_mb_mi

void(* CommonModeInfoParams::set_mb_mi) (struct CommonModeInfoParams *mi_params, int width, int height, BLOCK_SIZE min_partition_size)

Allocate required memory for arrays in 'mi_params'.

Parameters

  [in,out] | mi_params | object containing common mode info parameters
  | width | frame width
  | height | frame height
  | min_partition_size | minimum partition size allowed while encoding

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

- av1/common/av1_common_int.h