AOMedia AV1 Codec
|
Variables related to current coding block. More...
#include <blockd.h>
Data Fields | |
int | mi_stride |
bool | is_chroma_ref |
struct macroblockd_plane | plane [3] |
TileInfo | tile |
MB_MODE_INFO ** | mi |
bool | up_available |
bool | left_available |
bool | chroma_up_available |
bool | chroma_left_available |
MB_MODE_INFO * | left_mbmi |
MB_MODE_INFO * | above_mbmi |
MB_MODE_INFO * | chroma_left_mbmi |
MB_MODE_INFO * | chroma_above_mbmi |
uint8_t * | tx_type_map |
int | tx_type_map_stride |
const struct scale_factors * | block_ref_scale_factors [2] |
const YV12_BUFFER_CONFIG * | cur_buf |
ENTROPY_CONTEXT * | above_entropy_context [3] |
ENTROPY_CONTEXT | left_entropy_context [3][MAX_MIB_SIZE] |
PARTITION_CONTEXT * | above_partition_context |
PARTITION_CONTEXT | left_partition_context [MAX_MIB_SIZE] |
TXFM_CONTEXT * | above_txfm_context |
TXFM_CONTEXT * | left_txfm_context |
TXFM_CONTEXT | left_txfm_context_buffer [MAX_MIB_SIZE] |
CANDIDATE_MV | ref_mv_stack [MODE_CTX_REF_FRAMES][MAX_REF_MV_STACK_SIZE] |
uint16_t | weight [MODE_CTX_REF_FRAMES][MAX_REF_MV_STACK_SIZE] |
bool | is_last_vertical_rect |
bool | is_first_horizontal_rect |
uint8_t | neighbors_ref_counts [REF_FRAMES] |
FRAME_CONTEXT * | tile_ctx |
int | bd |
int | qindex [8] |
int | lossless [8] |
int | current_base_qindex |
int | cur_frame_force_integer_mv |
struct aom_internal_error_info * | error_info |
const WarpedMotionParams * | global_motion |
int8_t | delta_lf_from_base |
int8_t | delta_lf [FRAME_LF_COUNT] |
bool | cdef_transmitted [4] |
uint8_t * | seg_mask |
CFL_CTX | cfl |
uint16_t | color_index_map_offset [2] |
CONV_BUF_TYPE * | tmp_conv_dst |
uint8_t * | tmp_obmc_bufs [2] |
Position of current macroblock in mi units | |
int | mi_row |
int | mi_col |
Distance of this macroblock from frame edges in 1/8th pixel units. | |
int | mb_to_left_edge |
int | mb_to_right_edge |
int | mb_to_top_edge |
int | mb_to_bottom_edge |
Default values for the two restoration filters for each plane. | |
Default values for the two restoration filters for each plane. These values are used as reference values when writing the bitstream. That is, we transmit the delta between the actual values in cm->rst_info[plane].unit_info[unit_idx] and these reference values. | |
WienerInfo | wiener_info [3] |
SgrprojInfo | sgrproj_info [3] |
Block dimensions in MB_MODE_INFO units. | |
uint8_t | width |
uint8_t | height |
Variables related to current coding block.
This is a common set of variables used by both encoder and decoder. Most/all of the pointers are mere pointers to actual arrays are allocated elsewhere. This is mostly for coding convenience.
int macroblockd::mi_row |
Row position in mi units.
Referenced by av1_interpolation_filter_search(), av1_nonrd_pick_inter_mode_sb(), av1_rd_pick_inter_mode(), handle_inter_mode(), motion_mode_rd(), process_compound_inter_mode(), and rd_pick_intrabc_mode_sb().
int macroblockd::mi_col |
Column position in mi units.
Referenced by av1_interpolation_filter_search(), av1_nonrd_pick_inter_mode_sb(), av1_rd_pick_inter_mode(), handle_inter_mode(), motion_mode_rd(), process_compound_inter_mode(), and rd_pick_intrabc_mode_sb().
int macroblockd::mi_stride |
Same as cm->mi_params.mi_stride, copied here for convenience.
bool macroblockd::is_chroma_ref |
True if current block transmits chroma information. More detail: Smallest supported block size for both luma and chroma plane is 4x4. Hence, in case of subsampled chroma plane (YUV 4:2:0 or YUV 4:2:2), multiple luma blocks smaller than 8x8 maybe combined into one chroma block. For example, for YUV 4:2:0, let's say an 8x8 area is split into four 4x4 luma blocks. Then, a single chroma block of size 4x4 will cover the area of these four luma blocks. This is implemented in bitstream as follows:
Referenced by av1_rd_pick_intra_mode_sb(), av1_rd_pick_intra_sbuv_mode(), and search_intra_modes_in_interframe().
struct macroblockd_plane macroblockd::plane[3] |
Info specific to each plane.
Referenced by av1_apply_temporal_filter_c(), av1_nonrd_pick_inter_mode_sb(), av1_rd_pick_inter_mode(), av1_rd_pick_intra_sby_mode(), av1_search_palette_mode(), av1_search_palette_mode_luma(), av1_tf_do_filtering_row(), fast_interp_search(), handle_inter_mode(), intra_mode_info_cost_uv(), intra_mode_info_cost_y(), palette_rd_y(), pick_sb_modes(), pick_sb_modes_nonrd(), prune_zero_mv_with_sse(), rd_pick_intrabc_mode_sb(), search_filter_ref(), tf_build_predictor(), tf_motion_search(), and tf_normalize_filtered_frame().
TileInfo macroblockd::tile |
Tile related info.
Referenced by rd_pick_intrabc_mode_sb().
MB_MODE_INFO** macroblockd::mi |
Appropriate offset inside cm->mi_params.mi_grid_base based on current mi_row and mi_col.
Referenced by av1_handle_intra_y_mode(), av1_interpolation_filter_search(), av1_nonrd_pick_inter_mode_sb(), av1_nonrd_pick_intra_mode(), av1_rd_pick_inter_mode(), av1_rd_pick_intra_mode_sb(), av1_rd_pick_intra_sbuv_mode(), av1_rd_pick_intra_sby_mode(), av1_search_intra_uv_modes_in_interframe(), av1_search_palette_mode(), av1_search_palette_mode_luma(), cfl_rd_pick_alpha(), combined_motion_search(), encode_b(), fast_interp_search(), find_predictors(), handle_filter_intra_mode(), handle_inter_mode(), intra_block_yrd(), motion_mode_rd(), pick_sb_modes(), pick_sb_modes_nonrd(), process_compound_inter_mode(), prune_zero_mv_with_sse(), rd_pick_filter_intra_sby(), rd_pick_intra_angle_sbuv(), rd_pick_intrabc_mode_sb(), search_filter_ref(), search_intra_modes_in_interframe(), search_new_mv(), and setup_delta_q().
bool macroblockd::up_available |
True if 4x4 block above the current block is available.
bool macroblockd::left_available |
True if 4x4 block to the left of the current block is available.
bool macroblockd::chroma_up_available |
True if the above chrome reference block is available.
bool macroblockd::chroma_left_available |
True if the left chrome reference block is available.
MB_MODE_INFO* macroblockd::left_mbmi |
MB_MODE_INFO for 4x4 block to the left of the current block, if left_available == true; otherwise NULL.
Referenced by av1_nonrd_pick_intra_mode(), and av1_rd_pick_intra_sby_mode().
MB_MODE_INFO* macroblockd::above_mbmi |
MB_MODE_INFO for 4x4 block above the current block, if up_available == true; otherwise NULL.
Referenced by av1_nonrd_pick_intra_mode(), and av1_rd_pick_intra_sby_mode().
MB_MODE_INFO* macroblockd::chroma_left_mbmi |
Above chroma reference block if is_chroma_ref == true for the current block and chroma_up_available == true; otherwise NULL. See also: the special case logic when current chroma block covers more than one luma blocks in set_mi_row_col().
MB_MODE_INFO* macroblockd::chroma_above_mbmi |
Left chroma reference block if is_chroma_ref == true for the current block and chroma_left_available == true; otherwise NULL. See also: the special case logic when current chroma block covers more than one luma blocks in set_mi_row_col().
uint8_t* macroblockd::tx_type_map |
Appropriate offset based on current 'mi_row' and 'mi_col', inside 'tx_type_map' in one of 'CommonModeInfoParams', 'PICK_MODE_CONTEXT' or 'MACROBLOCK' structs.
Referenced by av1_nonrd_pick_intra_mode(), av1_rd_pick_inter_mode(), av1_rd_pick_intra_mode_sb(), av1_rd_pick_intra_sby_mode(), av1_search_palette_mode(), av1_search_palette_mode_luma(), handle_filter_intra_mode(), handle_inter_mode(), intra_block_yrd(), motion_mode_rd(), palette_rd_y(), pick_sb_modes(), pick_sb_modes_nonrd(), rd_pick_filter_intra_sby(), rd_pick_intrabc_mode_sb(), and search_intra_modes_in_interframe().
int macroblockd::tx_type_map_stride |
Stride for 'tx_type_map'. Note that this may / may not be same as 'mi_stride', depending on which actual array 'tx_type_map' points to.
Referenced by pick_sb_modes(), and pick_sb_modes_nonrd().
int macroblockd::mb_to_left_edge |
Distance from left edge
int macroblockd::mb_to_right_edge |
Distance from right edge
int macroblockd::mb_to_top_edge |
Distance from top edge
int macroblockd::mb_to_bottom_edge |
Distance from bottom edge
const struct scale_factors* macroblockd::block_ref_scale_factors[2] |
Scale factors for reference frames of the current block. These are pointers into 'cm->ref_scale_factors'.
Referenced by av1_nonrd_pick_inter_mode_sb(), and search_filter_ref().
const YV12_BUFFER_CONFIG* macroblockd::cur_buf |
Referenced by rd_pick_intrabc_mode_sb().
ENTROPY_CONTEXT* macroblockd::above_entropy_context[3] |
Entropy contexts for the above blocks. above_entropy_context[i][j] corresponds to above entropy context for ith plane and jth mi column of this frame, wrt current 'mi_row'. These are pointers into 'cm->above_contexts.entropy'.
ENTROPY_CONTEXT macroblockd::left_entropy_context[3][MAX_MIB_SIZE] |
Entropy contexts for the left blocks. left_entropy_context[i][j] corresponds to left entropy context for ith plane and jth mi row of this superblock, wrt current 'mi_col'. Note: These contain actual data, NOT pointers.
PARTITION_CONTEXT* macroblockd::above_partition_context |
Partition contexts for the above blocks. above_partition_context[i] corresponds to above partition context for ith mi column of this frame, wrt current 'mi_row'. This is a pointer into 'cm->above_contexts.partition'.
PARTITION_CONTEXT macroblockd::left_partition_context[MAX_MIB_SIZE] |
Partition contexts for the left blocks. left_partition_context[i] corresponds to left partition context for ith mi row of this superblock, wrt current 'mi_col'. Note: These contain actual data, NOT pointers.
TXFM_CONTEXT* macroblockd::above_txfm_context |
Transform contexts for the above blocks. above_txfm_context[i] corresponds to above transform context for ith mi col from the current position (mi row and mi column) for this frame. This is a pointer into 'cm->above_contexts.txfm'.
Referenced by av1_nonrd_use_partition(), av1_rd_pick_partition(), and av1_rd_use_partition().
TXFM_CONTEXT* macroblockd::left_txfm_context |
Transform contexts for the left blocks. left_txfm_context[i] corresponds to left transform context for ith mi row from the current position (mi_row and mi_col) for this superblock. This is a pointer into 'left_txfm_context_buffer'.
Referenced by av1_nonrd_use_partition(), av1_rd_pick_partition(), and av1_rd_use_partition().
TXFM_CONTEXT macroblockd::left_txfm_context_buffer[MAX_MIB_SIZE] |
left_txfm_context_buffer[i] is the left transform context for ith mi_row in this superblock. Behaves like an internal actual buffer which 'left_txt_context' points to, and never accessed directly except to fill in initial default values.
Referenced by av1_nonrd_use_partition(), av1_rd_pick_partition(), and av1_rd_use_partition().
WienerInfo macroblockd::wiener_info[3] |
Defaults for Wiener filter
SgrprojInfo macroblockd::sgrproj_info[3] |
Defaults for SGR filter
uint8_t macroblockd::width |
Block width in MB_MODE_INFO units
Referenced by handle_inter_mode(), motion_mode_rd(), and rd_pick_intrabc_mode_sb().
uint8_t macroblockd::height |
Block height in MB_MODE_INFO units
Referenced by handle_inter_mode(), motion_mode_rd(), and rd_pick_intrabc_mode_sb().
CANDIDATE_MV macroblockd::ref_mv_stack[MODE_CTX_REF_FRAMES][MAX_REF_MV_STACK_SIZE] |
Contains the motion vector candidates found during motion vector prediction process. ref_mv_stack[i] contains the candidates for ith type of reference frame (single/compound). The actual number of candidates found in ref_mv_stack[i] is stored in either dcb->ref_mv_count[i] (decoder side) or mbmi_ext->ref_mv_count[i] (encoder side).
Referenced by find_predictors(), and rd_pick_intrabc_mode_sb().
uint16_t macroblockd::weight[MODE_CTX_REF_FRAMES][MAX_REF_MV_STACK_SIZE] |
weight[i][j] is the weight for ref_mv_stack[i][j] and used to compute the DRL (dynamic reference list) mode contexts.
Referenced by find_predictors(), and rd_pick_intrabc_mode_sb().
bool macroblockd::is_last_vertical_rect |
True if this is the last vertical rectangular block in a VERTICAL or VERTICAL_4 partition.
bool macroblockd::is_first_horizontal_rect |
True if this is the 1st horizontal rectangular block in a HORIZONTAL or HORIZONTAL_4 partition.
uint8_t macroblockd::neighbors_ref_counts[REF_FRAMES] |
Counts of each reference frame in the above and left neighboring blocks. NOTE: Take into account both single and comp references.
FRAME_CONTEXT* macroblockd::tile_ctx |
Current CDFs of all the symbols for the current tile.
Referenced by encode_sb(), and encode_sb_row().
int macroblockd::bd |
Bit depth: copied from cm->seq_params->bit_depth for convenience.
Referenced by av1_apply_temporal_filter_c(), av1_nonrd_pick_inter_mode_sb(), tf_build_predictor(), and tf_motion_search().
int macroblockd::qindex[8] |
Quantizer index for each segment (base qindex + delta for each segment).
Referenced by encode_frame_internal().
int macroblockd::lossless[8] |
lossless[s] is true if segment 's' is coded losslessly.
Referenced by av1_nonrd_pick_intra_mode(), av1_rd_pick_intra_sby_mode(), encode_frame_internal(), intra_block_yrd(), palette_rd_y(), and search_intra_modes_in_interframe().
int macroblockd::current_base_qindex |
Q index for the coding blocks in this superblock will be stored in mbmi->current_qindex. Now, when cm->delta_q_info.delta_q_present_flag is true, mbmi->current_qindex is computed by taking 'current_base_qindex' as the base, and adding any transmitted delta qindex on top of it. Precisely, this is the latest qindex used by the first coding block of a non-skip superblock in the current tile; OR same as cm->quant_params.base_qindex (if not explicitly set yet). Note: This is 'CurrentQIndex' in the AV1 spec.
Referenced by encode_b(), encode_sb_row(), and setup_delta_q().
int macroblockd::cur_frame_force_integer_mv |
Same as cm->features.cur_frame_force_integer_mv.
Referenced by encode_sb_row().
struct aom_internal_error_info* macroblockd::error_info |
Pointer to cm->error.
Referenced by av1_apply_temporal_filter_c(), av1_nonrd_use_partition(), av1_rd_use_partition(), encode_frame_internal(), and encode_rd_sb().
const WarpedMotionParams* macroblockd::global_motion |
Same as cm->global_motion.
Referenced by encode_b(), motion_mode_rd(), and prune_zero_mv_with_sse().
int8_t macroblockd::delta_lf_from_base |
Since actual frame level loop filtering level value is not available at the beginning of the tile (only available during actual filtering) at encoder side.we record the delta_lf (against the frame level loop filtering level) and code the delta between previous superblock's delta lf and current delta lf. It is equivalent to the delta between previous superblock's actual lf and current lf.
Referenced by encode_b().
int8_t macroblockd::delta_lf[FRAME_LF_COUNT] |
We have four frame filter levels for different plane and direction. So, to support the per superblock update, we need to add a few more params:
Referenced by encode_b().
bool macroblockd::cdef_transmitted[4] |
cdef_transmitted[i] is true if CDEF strength for ith CDEF unit in the current superblock has already been read from (decoder) / written to (encoder) the bitstream; and false otherwise. More detail:
uint8_t* macroblockd::seg_mask |
Mask for this block used for compound prediction.
CFL_CTX macroblockd::cfl |
CFL (chroma from luma) related parameters.
Referenced by av1_rd_pick_intra_sbuv_mode(), and cfl_rd_pick_alpha().
uint16_t macroblockd::color_index_map_offset[2] |
Offset to plane[p].color_index_map. Currently:
CONV_BUF_TYPE* macroblockd::tmp_conv_dst |
Temporary buffer used for convolution in case of compound reference only for (weighted or uniform) averaging operation. There are pointers to actual buffers allocated elsewhere: e.g.
uint8_t* macroblockd::tmp_obmc_bufs[2] |
Temporary buffers used to build OBMC prediction by above (index 0) and left (index 1) predictors respectively. tmp_obmc_bufs[i][p * MAX_SB_SQUARE] is the buffer used for plane 'p'. There are pointers to actual buffers allocated elsewhere: e.g.