AOMedia AV1 Codec
partition_search.h
1 /*
2  * Copyright (c) 2020, Alliance for Open Media. All rights reserved
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #ifndef AOM_AV1_ENCODER_PARTITION_SEARCH_H_
13 #define AOM_AV1_ENCODER_PARTITION_SEARCH_H_
14 
15 #include "av1/encoder/block.h"
16 #include "av1/encoder/encoder.h"
17 #include "av1/encoder/encodeframe.h"
18 #include "av1/encoder/tokenize.h"
19 
20 void av1_set_offsets_without_segment_id(const AV1_COMP *const cpi,
21  const TileInfo *const tile,
22  MACROBLOCK *const x, int mi_row,
23  int mi_col, BLOCK_SIZE bsize);
24 void av1_set_offsets(const AV1_COMP *const cpi, const TileInfo *const tile,
25  MACROBLOCK *const x, int mi_row, int mi_col,
26  BLOCK_SIZE bsize);
27 void av1_rd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data,
28  MB_MODE_INFO **mib, TokenExtra **tp, int mi_row,
29  int mi_col, BLOCK_SIZE bsize, int *rate,
30  int64_t *dist, int do_recon, PC_TREE *pc_tree);
31 void av1_nonrd_use_partition(AV1_COMP *cpi, ThreadData *td,
32  TileDataEnc *tile_data, MB_MODE_INFO **mib,
33  TokenExtra **tp, int mi_row, int mi_col,
34  BLOCK_SIZE bsize, PC_TREE *pc_tree);
35 #if CONFIG_RT_ML_PARTITIONING
36 void av1_nonrd_pick_partition(AV1_COMP *cpi, ThreadData *td,
37  TileDataEnc *tile_data, TokenExtra **tp,
38  int mi_row, int mi_col, BLOCK_SIZE bsize,
39  RD_STATS *rd_cost, int do_recon, int64_t best_rd,
40  PC_TREE *pc_tree);
41 #endif
42 void av1_reset_part_sf(PARTITION_SPEED_FEATURES *part_sf);
43 
44 bool av1_rd_partition_search(AV1_COMP *const cpi, ThreadData *td,
45  TileDataEnc *tile_data, TokenExtra **tp,
46  SIMPLE_MOTION_DATA_TREE *sms_root, int mi_row,
47  int mi_col, BLOCK_SIZE bsize,
48  RD_STATS *best_rd_cost);
49 bool av1_rd_pick_partition(AV1_COMP *const cpi, ThreadData *td,
50  TileDataEnc *tile_data, TokenExtra **tp, int mi_row,
51  int mi_col, BLOCK_SIZE bsize, RD_STATS *rd_cost,
52  RD_STATS best_rdc, PC_TREE *pc_tree,
53  SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd,
54  SB_MULTI_PASS_MODE multi_pass_mode,
55  RD_RECT_PART_WIN_INFO *rect_part_win_info);
56 
57 static AOM_INLINE void set_cb_offsets(uint16_t *cb_offset,
58  const uint16_t cb_offset_y,
59  const uint16_t cb_offset_uv) {
60  cb_offset[PLANE_TYPE_Y] = cb_offset_y;
61  cb_offset[PLANE_TYPE_UV] = cb_offset_uv;
62 }
63 
64 static AOM_INLINE void update_cb_offsets(MACROBLOCK *x, const BLOCK_SIZE bsize,
65  const int subsampling_x,
66  const int subsampling_y) {
67  x->cb_offset[PLANE_TYPE_Y] += block_size_wide[bsize] * block_size_high[bsize];
68  if (x->e_mbd.is_chroma_ref) {
69  const BLOCK_SIZE plane_bsize =
70  get_plane_block_size(bsize, subsampling_x, subsampling_y);
71  assert(plane_bsize != BLOCK_INVALID);
72  x->cb_offset[PLANE_TYPE_UV] +=
73  block_size_wide[plane_bsize] * block_size_high[plane_bsize];
74  }
75 }
76 
77 #endif // AOM_AV1_ENCODER_PARTITION_SEARCH_H_
macroblock::cb_offset
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition: block.h:834
SPEED_FEATURES::rt_sf
REAL_TIME_SPEED_FEATURES rt_sf
Definition: speed_features.h:1457
pick_sb_modes
static void pick_sb_modes(AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *const x, int mi_row, int mi_col, RD_STATS *rd_cost, PARTITION_TYPE partition, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, RD_STATS best_rd)
Interface for AV1 mode search for an individual coding block.
Definition: partition_search.c:780
TplParams::tpl_bsize_1d
uint8_t tpl_bsize_1d
Definition: tpl_model.h:153
MB_MODE_INFO_EXT::mode_context
int16_t mode_context[MODE_CTX_REF_FRAMES]
Context used to encode the current mode.
Definition: block.h:207
block.h
AV1Common::above_contexts
CommonContexts above_contexts
Definition: av1_common_int.h:1010
encoder.h
Declares top-level encoder structures and functions.
MB_MODE_INFO_EXT_FRAME
Stores best extended mode information at frame level.
Definition: block.h:216
FeatureFlags::interp_filter
InterpFilter interp_filter
Definition: av1_common_int.h:411
aom_partition_features::tpl_inter_cost
int64_t tpl_inter_cost
Inter cost in tpl model.
Definition: aom_external_partition.h:289
aom_sb_tpl_features::num_units
int num_units
The number of units inside the current superblock.
Definition: aom_external_partition.h:186
aom_partition_stats::rdcost
int64_t rdcost
Rate-distortion cost of the block.
Definition: aom_external_partition.h:334
aom_sb_tpl_features::mc_dep_cost
int64_t mc_dep_cost[64]
The motion compensated dependency cost.
Definition: aom_external_partition.h:189
MB_MODE_INFO::ref_mv_idx
uint8_t ref_mv_idx
Which ref_mv to use.
Definition: blockd.h:314
macroblockd::left_txfm_context_buffer
TXFM_CONTEXT left_txfm_context_buffer[MAX_MIB_SIZE]
Definition: blockd.h:754
aom_partition_decision::current_decision
int current_decision
Partition decision for the current block.
Definition: aom_external_partition.h:307
ModeCosts
Holds the entropy costs for various modes sent to the bitstream.
Definition: block.h:507
TxfmSearchInfo::tx_type_map_
uint8_t tx_type_map_[MAX_MIB_SIZE *MAX_MIB_SIZE]
Transform types inside the partition block.
Definition: block.h:476
aom_partition_decision
Partition decisions received from the external model.
Definition: aom_external_partition.h:302
AV1_COMP::ext_part_controller
ExtPartController ext_part_controller
Definition: encoder.h:3188
macroblock::plane
struct macroblock_plane plane[3]
Each of the encoding plane.
Definition: block.h:788
MB_MODE_INFO::tx_size
TX_SIZE tx_size
Transform size when fixed size txfm is used (e.g. intra modes).
Definition: blockd.h:290
MB_MODE_INFO::interintra_wedge_index
int8_t interintra_wedge_index
The type of wedge used in interintra mode.
Definition: blockd.h:261
av1_rd_use_partition
void av1_rd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, MB_MODE_INFO **mib, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, int *rate, int64_t *dist, int do_recon, PC_TREE *pc_tree)
AV1 block partition search (partition estimation and partial search).
Definition: partition_search.c:1709
AV1EncRowMultiThreadInfo
Encoder data related to row-based multi-threading.
Definition: encoder.h:1430
SuperBlockEnc::min_partition_size
BLOCK_SIZE min_partition_size
Maximum partition size for the sb.
Definition: block.h:56
GF_GROUP
Data related to the current GF/ARF group and the individual frames within the group.
Definition: firstpass.h:344
macroblockd::height
uint8_t height
Definition: blockd.h:773
macroblockd::block_ref_scale_factors
const struct scale_factors * block_ref_scale_factors[2]
Definition: blockd.h:694
aom_partition_features::block_sse
unsigned int block_sse
SSE of motion compensated residual.
Definition: aom_external_partition.h:276
SPEED_FEATURES::part_sf
PARTITION_SPEED_FEATURES part_sf
Definition: speed_features.h:1412
MB_MODE_INFO_EXT_FRAME::weight
uint16_t weight[USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition: block.h:220
ModeCosts::partition_cost
int partition_cost[PARTITION_CONTEXTS][EXT_PARTITION_TYPES]
Cost for coding the partition.
Definition: block.h:513
MB_MODE_INFO::delta_lf_from_base
int8_t delta_lf_from_base
Definition: blockd.h:300
TxfmSearchInfo::blk_skip
uint8_t blk_skip[MAX_MIB_SIZE *MAX_MIB_SIZE]
Whether to skip transform and quantization on a txfm block level.
Definition: block.h:465
SIMPLE_AGG_LVL0
@ SIMPLE_AGG_LVL0
Definition: speed_features.h:328
PartitionCfg::enable_1to4_partitions
bool enable_1to4_partitions
Definition: encoder.h:279
macroblock::mbmi_ext
MB_MODE_INFO_EXT mbmi_ext
Derived coding information.
Definition: block.h:803
CommonModeInfoParams
Params related to MB_MODE_INFO arrays and related info.
Definition: av1_common_int.h:505
macroblockd::above_mbmi
MB_MODE_INFO * above_mbmi
Definition: blockd.h:652
macroblockd::width
uint8_t width
Definition: blockd.h:772
AOM_BITS_8
@ AOM_BITS_8
Definition: aom_codec.h:319
TxfmSearchParams
Defines the parameters used to perform txfm search.
Definition: block.h:393
aom_partition_features::vert_block_var
unsigned int vert_block_var[2]
Variance of vert sub blocks.
Definition: aom_external_partition.h:283
macroblockd::mi_col
int mi_col
Definition: blockd.h:583
macroblockd::above_txfm_context
TXFM_CONTEXT * above_txfm_context
Definition: blockd.h:740
macroblockd::mb_to_bottom_edge
int mb_to_bottom_edge
Definition: blockd.h:687
aom_partition_features::horz_block_sse
unsigned int horz_block_sse[2]
SSE of horz sub blocks.
Definition: aom_external_partition.h:280
aom_partition_features::left_block_width
int left_block_width
Width of the left block, -1 if not exist.
Definition: aom_external_partition.h:263
AV1_COMP::sf
SPEED_FEATURES sf
Definition: encoder.h:2833
LAYER_CONTEXT::is_key_frame
int is_key_frame
Definition: svc_layercontext.h:76
AV1_COMP::gf_frame_index
unsigned char gf_frame_index
Definition: encoder.h:2864
MultiThreadInfo::enc_row_mt
AV1EncRowMultiThreadInfo enc_row_mt
Definition: encoder.h:1596
aom_partition_features::tpl_mc_dep_cost
int64_t tpl_mc_dep_cost
Motion compensated dependency cost in tpl model.
Definition: aom_external_partition.h:290
av1_rd_pick_inter_mode
void av1_rd_pick_inter_mode(struct AV1_COMP *cpi, struct TileDataEnc *tile_data, struct macroblock *x, struct RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, int64_t best_rd_so_far)
AV1 inter mode selection.
Definition: rdopt.c:5623
macroblock::sb_enc
SuperBlockEnc sb_enc
Information on a whole superblock level.
Definition: block.h:950
macroblockd::cfl
CFL_CTX cfl
Definition: blockd.h:901
AV1Common::seg
struct segmentation seg
Definition: av1_common_int.h:932
FeatureFlags::cur_frame_force_integer_mv
bool cur_frame_force_integer_mv
Definition: av1_common_int.h:375
macroblock_plane::txb_entropy_ctx
uint8_t * txb_entropy_ctx
Contexts used to code the transform coefficients.
Definition: block.h:115
encode_sb
static void encode_sb(const AV1_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, int mi_row, int mi_col, RUN_TYPE dry_run, BLOCK_SIZE bsize, PC_TREE *pc_tree, int *rate)
Reconstructs a partition (may contain multiple coding blocks)
Definition: partition_search.c:1526
av1_rd_pick_intra_mode_sb
void av1_rd_pick_intra_mode_sb(const struct AV1_COMP *cpi, struct macroblock *x, struct RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, int64_t best_rd)
AV1 intra mode selection for intra frames.
Definition: rdopt.c:3282
AV1_PRIMARY::gf_group
GF_GROUP gf_group
Definition: encoder.h:2453
macroblockd::delta_lf
int8_t delta_lf[FRAME_LF_COUNT]
Definition: blockd.h:875
aom_partition_features::pyramid_level
int pyramid_level
The level of this frame in the hierarchical structure.
Definition: aom_external_partition.h:258
TxfmSearchInfo::txb_split_count
unsigned int txb_split_count
Number of txb splits.
Definition: block.h:491
macroblockd::bd
int bd
Definition: blockd.h:815
aom_partition_features::rdmult
int rdmult
Rate-distortion multiplier.
Definition: aom_external_partition.h:257
macroblockd::is_chroma_ref
bool is_chroma_ref
Definition: blockd.h:608
MB_MODE_INFO::use_wedge_interintra
uint8_t use_wedge_interintra
Whether to use interintra wedge.
Definition: blockd.h:324
macroblock::mbmi_ext_frame
MB_MODE_INFO_EXT_FRAME * mbmi_ext_frame
Finalized mbmi_ext for the whole frame.
Definition: block.h:810
TplParams
Params related to temporal dependency model.
Definition: tpl_model.h:139
aom_partition_features::mi_col
int mi_col
Mi_col position of the block.
Definition: aom_external_partition.h:243
av1_nonrd_pick_intra_mode
void av1_nonrd_pick_intra_mode(AV1_COMP *cpi, MACROBLOCK *x, RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx)
AV1 intra mode selection based on Non-RD optimized model.
Definition: nonrd_pickmode.c:1713
AV1_COMP::sb_counter
int sb_counter
Definition: encoder.h:3177
aom_partition_features::mi_row
int mi_row
Mi_row position of the block.
Definition: aom_external_partition.h:242
SVC::layer_context
LAYER_CONTEXT layer_context[32]
Definition: svc_layercontext.h:125
aom_partition_stats::dist
int64_t dist
Distortion of the block.
Definition: aom_external_partition.h:333
FeatureFlags::allow_screen_content_tools
bool allow_screen_content_tools
Definition: av1_common_int.h:379
AV1Common::cur_frame
RefCntBuffer * cur_frame
Definition: av1_common_int.h:837
AV1_COMP::mt_info
MultiThreadInfo mt_info
Definition: encoder.h:2999
MB_MODE_INFO_EXT_FRAME::mode_context
int16_t mode_context
Context used to encode the current mode.
Definition: block.h:227
MB_MODE_INFO_EXT_FRAME::cb_offset
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition: block.h:229
AV1Common::last_frame_seg_map
uint8_t * last_frame_seg_map
Definition: av1_common_int.h:937
macroblock::rdmult
int rdmult
Rate-distortion multiplier.
Definition: block.h:883
macroblockd::left_mbmi
MB_MODE_INFO * left_mbmi
Definition: blockd.h:647
aom_partition_features::block_size
int block_size
As "BLOCK_SIZE" in av1/common/enums.h.
Definition: aom_external_partition.h:246
aom_sb_tpl_features::tpl_unit_length
int tpl_unit_length
The block length of tpl process.
Definition: aom_external_partition.h:185
AV1_COMP
Top level encoder structure.
Definition: encoder.h:2632
macroblock::part_search_info
PartitionSearchInfo part_search_info
Stores some partition-search related buffers.
Definition: block.h:1013
aom_ext_part_decision_mode_t
enum aom_ext_part_decision_mode aom_ext_part_decision_mode_t
Decision mode of the external partition model. AOM_EXT_PART_WHOLE_TREE: the external partition model ...
MB_MODE_INFO::compound_idx
uint8_t compound_idx
Indicates whether dist_wtd_comp(0) is used or not (0).
Definition: blockd.h:322
AV1Common::height
int height
Definition: av1_common_int.h:781
AV1_PRIMARY::tpl_data
TplParams tpl_data
Definition: encoder.h:2551
MB_MODE_INFO_EXT::ref_mv_stack
CANDIDATE_MV ref_mv_stack[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE]
The reference mv list for the current block.
Definition: block.h:199
aom_partition_features::sb_features
aom_sb_features_t sb_features
Features collected for the super block.
Definition: aom_external_partition.h:241
macroblock::qindex
int qindex
Quantization index for the current partition block.
Definition: block.h:866
PartitionCfg
Encoder config for coding block partitioning.
Definition: encoder.h:267
aom_sb_tpl_features::inter_cost
int64_t inter_cost[64]
The inter cost of each unit.
Definition: aom_external_partition.h:188
LOOPFILTER_SELECTIVELY
@ LOOPFILTER_SELECTIVELY
Definition: encoder.h:240
macroblockd::mb_to_right_edge
int mb_to_right_edge
Definition: blockd.h:685
MB_MODE_INFO::interintra_mode
INTERINTRA_MODE interintra_mode
The type of intra mode used by inter-intra.
Definition: blockd.h:259
MB_MODE_INFO::palette_mode_info
PALETTE_MODE_INFO palette_mode_info
Stores the size and colors of palette mode.
Definition: blockd.h:280
PartitionSearchInfo::quad_tree_idx
int quad_tree_idx
Current index on the partition block quad tree.
Definition: block.h:364
TplParams::ready
int ready
Definition: tpl_model.h:143
aom_partition_features::horz_block_var
unsigned int horz_block_var[2]
Variance of horz sub blocks.
Definition: aom_external_partition.h:281
CommonModeInfoParams::mi_stride
int mi_stride
Definition: av1_common_int.h:571
macroblock_plane::eobs
uint16_t * eobs
Location of the end of qcoeff (end of block).
Definition: block.h:113
aom_partition_features::above_block_width
int above_block_width
Width of the above block, -1 if not exist.
Definition: aom_external_partition.h:260
AV1Common::seq_params
SequenceHeader * seq_params
Definition: av1_common_int.h:981
MB_MODE_INFO::skip_mode
uint8_t skip_mode
Inter skip mode.
Definition: blockd.h:316
AV1_COMP::common
AV1_COMMON common
Definition: encoder.h:2675
MB_MODE_INFO::ref_frame
MV_REFERENCE_FRAME ref_frame[2]
The reference frames for the MV.
Definition: blockd.h:246
MB_MODE_INFO::uv_mode
UV_PREDICTION_MODE uv_mode
The UV mode when intra is used.
Definition: blockd.h:234
MB_MODE_INFO::interinter_comp
INTERINTER_COMPOUND_DATA interinter_comp
Struct that stores the data used in interinter compound mode.
Definition: blockd.h:263
macroblock_plane
Each source plane of the current macroblock.
Definition: block.h:103
aom_partition_features::tpl_intra_cost
int64_t tpl_intra_cost
Intra cost, ref to "TplDepStats" in tpl_model.h.
Definition: aom_external_partition.h:288
aom_partition_features::update_type
int update_type
Frame update type, defined in ratectrl.h.
Definition: aom_external_partition.h:255
macroblockd::cur_buf
const YV12_BUFFER_CONFIG * cur_buf
Definition: blockd.h:702
aom_partition_stats::rate
int rate
Rate cost of the block.
Definition: aom_external_partition.h:332
PartitionCfg::enable_ab_partitions
bool enable_ab_partitions
Definition: encoder.h:275
aom_partition_features::block_var
unsigned int block_var
Variance of motion compensated residual.
Definition: aom_external_partition.h:277
macroblock::use_mb_mode_cache
int use_mb_mode_cache
Whether to reuse the mode stored in mb_mode_cache.
Definition: block.h:1108
aom_partition_decision::is_final_decision
int is_final_decision
The flag whether it's the final decision.
Definition: aom_external_partition.h:304
MB_MODE_INFO_EXT_FRAME::ref_mv_stack
CANDIDATE_MV ref_mv_stack[USABLE_REF_MV_STACK_SIZE]
The reference mv list for the current block.
Definition: block.h:218
macroblockd::tile_ctx
FRAME_CONTEXT * tile_ctx
Definition: blockd.h:810
SPEED_FEATURES::winner_mode_sf
WINNER_MODE_SPEED_FEATURES winner_mode_sf
Definition: speed_features.h:1447
aom_partition_features::sub_block_var
unsigned int sub_block_var[4]
Variance of sub blocks.
Definition: aom_external_partition.h:279
CommonModeInfoParams::mi_rows
int mi_rows
Definition: av1_common_int.h:526
AV1_COMP::enc_seg
EncSegmentationInfo enc_seg
Definition: encoder.h:2849
macroblockd::global_motion
const WarpedMotionParams * global_motion
Definition: blockd.h:850
hybrid_intra_mode_search
static void hybrid_intra_mode_search(AV1_COMP *cpi, MACROBLOCK *const x, RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx)
Hybrid intra mode search.
Definition: partition_search.c:705
macroblock_plane::dqcoeff
tran_low_t * dqcoeff
Dequantized coefficients.
Definition: block.h:107
aom_partition_features::left_block_height
int left_block_height
Height of the left block, -1 if not exist.
Definition: aom_external_partition.h:264
aom_partition_decision::num_nodes
int num_nodes
The number of leaf nodes.
Definition: aom_external_partition.h:305
MB_MODE_INFO_EXT::weight
uint16_t weight[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition: block.h:201
macroblock::mv_limits
FullMvLimits mv_limits
Limit for the range of motion vectors.
Definition: block.h:1139
AV1EncoderConfig::pass
enum aom_enc_pass pass
Definition: encoder.h:1019
aom_partition_features::frame_width
int frame_width
Frame width.
Definition: aom_external_partition.h:244
SPEED_FEATURES::inter_sf
INTER_MODE_SPEED_FEATURES inter_sf
Definition: speed_features.h:1422
MB_MODE_INFO_EXT
Extended mode info derived from mbmi.
Definition: block.h:196
MB_MODE_INFO::bsize
BLOCK_SIZE bsize
The block size of the current coding block.
Definition: blockd.h:228
macroblock_plane::qcoeff
tran_low_t * qcoeff
Quantized coefficients.
Definition: block.h:109
MB_MODE_INFO::partition
PARTITION_TYPE partition
The partition type of the current coding block.
Definition: blockd.h:230
AV1_COMP::mbmi_ext_info
MBMIExtFrameBufferInfo mbmi_ext_info
Definition: encoder.h:2657
AV1EncRowMultiThreadSync
Encoder parameters for synchronization of row based multi-threading.
Definition: encoder.h:1333
MB_MODE_INFO::skip_cdef_curr_sb
uint8_t skip_cdef_curr_sb
Skip CDEF for this superblock.
Definition: blockd.h:330
aom_partition_features::above_block_height
int above_block_height
Height of the above block, -1 if not exist.
Definition: aom_external_partition.h:261
MB_MODE_INFO::motion_mode
MOTION_MODE motion_mode
The motion mode used by the inter prediction.
Definition: blockd.h:250
AV1_COMP::rd
RD_OPT rd
Definition: encoder.h:2787
AV1Common::show_frame
int show_frame
Definition: av1_common_int.h:890
AV1EncRowMultiThreadInfo::sync_read_ptr
void(* sync_read_ptr)(AV1EncRowMultiThreadSync *const, int, int)
Definition: encoder.h:1473
pick_sb_modes_nonrd
static void pick_sb_modes_nonrd(AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *const x, int mi_row, int mi_col, RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx)
Top level function to pick block mode for non-RD optimized case.
Definition: partition_search.c:2136
MB_MODE_INFO_EXT::ref_mv_count
uint8_t ref_mv_count[MODE_CTX_REF_FRAMES]
Number of ref mvs in the drl.
Definition: block.h:203
macroblockd::delta_lf_from_base
int8_t delta_lf_from_base
Definition: blockd.h:860
macroblock::color_sensitivity
uint8_t color_sensitivity[2]
Color sensitivity flag for the coding block.
Definition: block.h:1167
encode_b
static void encode_b(const AV1_COMP *const cpi, TileDataEnc *tile_data, ThreadData *td, TokenExtra **tp, int mi_row, int mi_col, RUN_TYPE dry_run, BLOCK_SIZE bsize, PARTITION_TYPE partition, PICK_MODE_CONTEXT *const ctx, int *rate)
Reconstructs an individual coding block.
Definition: partition_search.c:1364
AV1Common::quant_params
CommonQuantParams quant_params
Definition: av1_common_int.h:927
AV1_PRIMARY::use_svc
int use_svc
Definition: encoder.h:2503
yv12_buffer_config
YV12 frame buffer data structure.
Definition: yv12config.h:39
aom_partition_features::valid_partition_types
int valid_partition_types
Definition: aom_external_partition.h:254
macroblock_plane::coeff
tran_low_t * coeff
Transformed coefficients.
Definition: block.h:111
MB_MODE_INFO::mode
PREDICTION_MODE mode
The prediction mode used.
Definition: blockd.h:232
aom_partition_features
Features pass to the external model to make partition decisions.
Definition: aom_external_partition.h:225
AOM_RC_ONE_PASS
@ AOM_RC_ONE_PASS
Definition: aom_encoder.h:176
aom_partition_features::sub_block_sse
unsigned int sub_block_sse[4]
SSE of sub blocks.
Definition: aom_external_partition.h:278
MB_MODE_INFO::mv
int_mv mv[2]
The motion vectors used by the current inter mode.
Definition: blockd.h:244
FeatureFlags::allow_warped_motion
bool allow_warped_motion
Definition: av1_common_int.h:381
macroblock_plane::src
struct buf_2d src
A buffer containing the source frame.
Definition: block.h:117
AV1_COMP::winner_mode_params
WinnerModeParams winner_mode_params
Definition: encoder.h:2803
AV1_COMP::rc
RATE_CONTROL rc
Definition: encoder.h:2813
AV1Common::fc
FRAME_CONTEXT * fc
Definition: av1_common_int.h:986
CommonContexts::txfm
TXFM_CONTEXT ** txfm
Definition: av1_common_int.h:741
AlgoCfg::loopfilter_control
LOOPFILTER_CONTROL loopfilter_control
Definition: encoder.h:848
CommonQuantParams::base_qindex
int base_qindex
Definition: av1_common_int.h:618
av1_update_intra_mb_txb_context
void av1_update_intra_mb_txb_context(const AV1_COMP *cpi, ThreadData *td, RUN_TYPE dry_run, BLOCK_SIZE bsize, uint8_t allow_update_cdf)
Update the probability model (cdf) and the entropy context related to coefficient coding for all tran...
macroblock::must_find_valid_partition
int must_find_valid_partition
Whether to disable some features to force a mode in current block.
Definition: block.h:1022
EncSegmentationInfo::map
uint8_t * map
Definition: encoder.h:2227
FeatureFlags::switchable_motion_mode
bool switchable_motion_mode
Definition: av1_common_int.h:409
AV1Common
Top level common structure used by both encoder and decoder.
Definition: av1_common_int.h:755
macroblock::mb_energy
int mb_energy
Energy in the current source coding block. Used to calculate rdmult.
Definition: block.h:886
aom_partition_features::has_above_block
int has_above_block
Has above neighbor block.
Definition: aom_external_partition.h:259
macroblockd::lossless
int lossless[8]
Definition: blockd.h:824
AV1EncoderConfig::algo_cfg
AlgoCfg algo_cfg
Definition: encoder.h:906
aom_partition_features::has_left_block
int has_left_block
Has left neighbor block.
Definition: aom_external_partition.h:262
macroblock::txfm_search_info
TxfmSearchInfo txfm_search_info
Results of the txfm searches that have been done.
Definition: block.h:1158
CommonModeInfoParams::mi_grid_base
MB_MODE_INFO ** mi_grid_base
Definition: av1_common_int.h:563
av1_cyclic_reset_segment_skip
void av1_cyclic_reset_segment_skip(const struct AV1_COMP *cpi, MACROBLOCK *const x, int mi_row, int mi_col, BLOCK_SIZE bsize)
Update segment_id for blocks are skipped.
MB_MODE_INFO_EXT_FRAME::global_mvs
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition: block.h:225
macroblock::errorperbit
int errorperbit
A multiplier that converts mv cost to l2 error.
Definition: block.h:911
TxfmSearchParams::tx_mode_search_type
TX_MODE tx_mode_search_type
How to search for the optimal tx_size.
Definition: block.h:434
av1_nonrd_use_partition
void av1_nonrd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, MB_MODE_INFO **mib, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, PC_TREE *pc_tree)
AV1 block partition application (minimal RD search).
Definition: partition_search.c:2265
MB_MODE_INFO_EXT::global_mvs
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition: block.h:205
MB_MODE_INFO::skip_txfm
int8_t skip_txfm
Whether to skip transforming and sending.
Definition: blockd.h:288
aom_sb_features::tpl_features
aom_sb_tpl_features_t tpl_features
Definition: aom_external_partition.h:214
enums.h
macroblockd::current_base_qindex
int current_base_qindex
Definition: blockd.h:835
aom_partition_features::vert_block_sse
unsigned int vert_block_sse[2]
SSE of vert sub blocks.
Definition: aom_external_partition.h:282
MB_MODE_INFO::comp_group_idx
uint8_t comp_group_idx
Indicates if masked compound is used(1) or not (0).
Definition: blockd.h:320
macroblock::mb_mode_cache
const MB_MODE_INFO * mb_mode_cache
The mode to reuse during av1_rd_pick_intra_mode_sb and av1_rd_pick_inter_mode.
Definition: block.h:1111
TxfmSearchInfo
Stores various encoding/search decisions related to txfm search.
Definition: block.h:454
macroblockd::mi_row
int mi_row
Definition: blockd.h:582
AV1_COMP::ppi
AV1_PRIMARY * ppi
Definition: encoder.h:2636
TplParams::tpl_stats_block_mis_log2
uint8_t tpl_stats_block_mis_log2
Definition: tpl_model.h:148
MB_MODE_INFO
Stores the prediction/txfm mode of the current coding block.
Definition: blockd.h:222
macroblockd::tx_type_map_stride
int tx_type_map_stride
Definition: blockd.h:678
AV1Common::delta_q_info
DeltaQInfo delta_q_info
Definition: av1_common_int.h:970
aom_sb_tpl_features::available
int available
If tpl stats are available.
Definition: aom_external_partition.h:184
macroblockd
Variables related to current coding block.
Definition: blockd.h:577
av1_rd_pick_partition
bool av1_rd_pick_partition(AV1_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, RD_STATS *rd_cost, RD_STATS best_rdc, PC_TREE *pc_tree, SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd, SB_MULTI_PASS_MODE multi_pass_mode, RD_RECT_PART_WIN_INFO *rect_part_win_info)
AV1 block partition search (full search).
Definition: partition_search.c:4698
macroblock::e_mbd
MACROBLOCKD e_mbd
Decoder's view of current coding block.
Definition: block.h:796
CommonModeInfoParams::mi_cols
int mi_cols
Definition: av1_common_int.h:531
macroblock::try_merge_partition
int try_merge_partition
Prediction for ML based partition.
Definition: block.h:1190
macroblock::txfm_search_params
TxfmSearchParams txfm_search_params
Parameters that control how motion search is done.
Definition: block.h:1151
MB_MODE_INFO::segment_id
uint8_t segment_id
The segment id.
Definition: blockd.h:310
MB_MODE_INFO::delta_lf
int8_t delta_lf[FRAME_LF_COUNT]
Definition: blockd.h:302
AV1_COMP::vaq_refresh
int vaq_refresh
Definition: encoder.h:2940
EncSegmentationInfo::has_lossless_segment
bool has_lossless_segment
Definition: encoder.h:2233
AV1Common::width
int width
Definition: av1_common_int.h:780
AV1_COMP::cyclic_refresh
CYCLIC_REFRESH * cyclic_refresh
Definition: encoder.h:2854
macroblockd::mi_stride
int mi_stride
Definition: blockd.h:589
AV1_COMP::oxcf
AV1EncoderConfig oxcf
Definition: encoder.h:2680
TplParams::tpl_frame
TplDepFrame * tpl_frame
Definition: tpl_model.h:184
macroblockd::left_txfm_context
TXFM_CONTEXT * left_txfm_context
Definition: blockd.h:747
aom_partition_decision::partition_decision
int partition_decision[2048]
Partition decisions.
Definition: aom_external_partition.h:306
macroblock::mode_costs
ModeCosts mode_costs
The rate needed to signal a mode to the bitstream.
Definition: block.h:891
aom_partition_stats
Encoding stats for the given partition decision.
Definition: aom_external_partition.h:331
AV1_PRIMARY::fn_ptr
aom_variance_fn_ptr_t fn_ptr[BLOCK_SIZES_ALL]
Definition: encoder.h:2530
MB_MODE_INFO::inter_tx_size
TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN]
Transform size when recursive txfm tree is on.
Definition: blockd.h:292
FeatureFlags::allow_high_precision_mv
bool allow_high_precision_mv
Definition: av1_common_int.h:371
macroblockd::plane
struct macroblockd_plane plane[3]
Definition: blockd.h:613
aom_sb_tpl_features::intra_cost
int64_t intra_cost[64]
The intra cost of each unit.
Definition: aom_external_partition.h:187
MB_MODE_INFO_EXT_FRAME::ref_mv_count
uint8_t ref_mv_count
Number of ref mvs in the drl.
Definition: block.h:222
macroblockd::tile
TileInfo tile
Definition: blockd.h:618
AV1_COMP::consec_zero_mv
uint8_t * consec_zero_mv
Definition: encoder.h:3166
AV1Common::current_frame
CurrentFrame current_frame
Definition: av1_common_int.h:759
AV1Common::features
FeatureFlags features
Definition: av1_common_int.h:910
AV1_COMP::optimize_seg_arr
TRELLIS_OPT_TYPE optimize_seg_arr[8]
Definition: encoder.h:2686
AV1_COMP::frame_info
FRAME_INFO frame_info
Definition: encoder.h:2897
AV1_COMP::source
YV12_BUFFER_CONFIG * source
Definition: encoder.h:2693
MB_MODE_INFO::current_qindex
int current_qindex
The q index for the current coding block.
Definition: blockd.h:236
aom_partition_features::qindex
int qindex
Quantization index, range: [0, 255].
Definition: aom_external_partition.h:256
AV1Common::mi_params
CommonModeInfoParams mi_params
Definition: av1_common_int.h:915
aom_partition_features::frame_height
int frame_height
Frame height.
Definition: aom_external_partition.h:245
macroblock::source_variance
unsigned int source_variance
Variance of the source frame.
Definition: block.h:1175
macroblock
Encoder's parameters related to the current coding block.
Definition: block.h:778
macroblockd::tx_type_map
uint8_t * tx_type_map
Definition: blockd.h:673
macroblockd::mi
MB_MODE_INFO ** mi
Definition: blockd.h:624
av1_nonrd_pick_inter_mode_sb
void av1_nonrd_pick_inter_mode_sb(struct AV1_COMP *cpi, struct TileDataEnc *tile_data, struct macroblock *x, struct RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx)
AV1 inter mode selection based on Non-RD optimized model.
Definition: nonrd_pickmode.c:2242
AV1_COMP::svc
SVC svc
Definition: encoder.h:3120