15#ifndef AOM_AV1_ENCODER_BLOCK_H_
16#define AOM_AV1_ENCODER_BLOCK_H_
18#include "av1/common/blockd.h"
19#include "av1/common/entropymv.h"
20#include "av1/common/entropy.h"
22#include "av1/common/mvref_common.h"
24#include "av1/encoder/enc_enums.h"
25#if !CONFIG_REALTIME_ONLY
26#include "av1/encoder/partition_cnn_weights.h"
29#include "av1/encoder/hash.h"
36#define MIN_TPL_BSIZE_1D 16
38#define MAX_TPL_BLK_IN_SB (MAX_SB_SIZE / MIN_TPL_BSIZE_1D)
40#define MAX_WINNER_MODE_COUNT_INTRA 3
42#define MAX_WINNER_MODE_COUNT_INTER 1
44#define RD_RECORD_BUFFER_LEN 8
46#define TX_SIZE_RD_RECORD_BUFFER_LEN 256
168 int lps_cost[LEVEL_CONTEXTS][COEFF_BASE_RANGE + 1 + COEFF_BASE_RANGE + 1];
199 CANDIDATE_MV
ref_mv_stack[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE];
201 uint16_t
weight[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE];
220 uint16_t
weight[USABLE_REF_MV_STACK_SIZE];
301#define MAX_COMP_RD_STATS 64
389#if !CONFIG_REALTIME_ONLY
477#define MAX_NUM_8X8_TXBS ((MAX_MIB_SIZE >> 1) * (MAX_MIB_SIZE >> 1))
478#define MAX_NUM_16X16_TXBS ((MAX_MIB_SIZE >> 2) * (MAX_MIB_SIZE >> 2))
479#define MAX_NUM_32X32_TXBS ((MAX_MIB_SIZE >> 3) * (MAX_MIB_SIZE >> 3))
480#define MAX_NUM_64X64_TXBS ((MAX_MIB_SIZE >> 4) * (MAX_MIB_SIZE >> 4))
568#if CONFIG_SPEED_STATS
570 unsigned int tx_search_count;
573#undef MAX_NUM_8X8_TXBS
574#undef MAX_NUM_16X16_TXBS
575#undef MAX_NUM_32X32_TXBS
576#undef MAX_NUM_64X64_TXBS
610 int cfl_cost[CFL_JOINT_SIGNS][CFL_PRED_PLANES][CFL_ALPHABET_SIZE];
662 [CDF_SIZE(COMP_REFERENCE_TYPES)];
809#define SINGLE_REF_MODES ((REF_FRAMES - 1) * 4)
811struct inter_modes_info;
833 SOURCE_SAD source_sad;
1232#if CONFIG_RT_ML_PARTITIONING
1233 DECLARE_ALIGNED(16, uint8_t, est_pred[128 * 128]);
1237#undef SINGLE_REF_MODES
1240static INLINE
int is_rect_tx_allowed_bsize(BLOCK_SIZE bsize) {
1241 static const char LUT[BLOCK_SIZES_ALL] = {
1269static INLINE
int is_rect_tx_allowed(
const MACROBLOCKD *xd,
1271 return is_rect_tx_allowed_bsize(mbmi->
bsize) &&
1275static INLINE
int tx_size_to_depth(TX_SIZE tx_size, BLOCK_SIZE bsize) {
1276 TX_SIZE ctx_size = max_txsize_rect_lookup[bsize];
1278 while (tx_size != ctx_size) {
1280 ctx_size = sub_tx_size_map[ctx_size];
1281 assert(depth <= MAX_TX_DEPTH);
1286static INLINE
void set_blk_skip(uint8_t txb_skip[],
int plane,
int blk_idx,
1289 txb_skip[blk_idx] |= 1UL << plane;
1291 txb_skip[blk_idx] &= ~(1UL << plane);
1296 txb_skip[blk_idx] |= 1UL << (1 + 4);
1297 txb_skip[blk_idx] |= 1UL << (2 + 4);
1301 txb_skip[blk_idx] &= ~(1UL << (plane + 4));
1305static INLINE
int is_blk_skip(uint8_t *txb_skip,
int plane,
int blk_idx) {
1308 assert(!(txb_skip[blk_idx] & (1UL << (plane + 4))));
1311 assert((txb_skip[blk_idx] & 0x88) == 0);
1313 return (txb_skip[blk_idx] >> plane) & 1;
#define MAX_COMP_RD_STATS
Number of compound rd stats.
Definition block.h:301
#define MAX_TPL_BLK_IN_SB
Maximum number of tpl block in a super block.
Definition block.h:38
#define RD_RECORD_BUFFER_LEN
Number of txfm hash records kept for the partition block.
Definition block.h:44
struct macroblock_plane MACROBLOCK_PLANE
Each source plane of the current macroblock.
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
#define TX_SIZE_RD_RECORD_BUFFER_LEN
Number of txfm hash records kept for the txfm block.
Definition block.h:46
@ RESTORE_SWITCHABLE_TYPES
Definition enums.h:655
Stores the transforms coefficients for the whole superblock.
Definition block.h:180
uint8_t * entropy_ctx[3]
Transform block entropy contexts.
Definition block.h:191
uint16_t * eobs[3]
Where the transformed coefficients end.
Definition block.h:184
tran_low_t * tcoeff[3]
The transformed coefficients.
Definition block.h:182
Rdcost stats in compound mode.
Definition block.h:304
int64_t model_dist[COMPOUND_TYPES]
Estimated distortion of the compound modes.
Definition block.h:312
int_interpfilters filter
Current interpolation filter.
Definition block.h:322
int comp_rs2[COMPOUND_TYPES]
Rate need to send the mask type.
Definition block.h:314
INTERINTER_COMPOUND_DATA interinter_comp
Current parameters for interinter mode.
Definition block.h:328
int64_t dist[COMPOUND_TYPES]
Distortion of the compound modes.
Definition block.h:308
PREDICTION_MODE mode
Current prediction mode.
Definition block.h:320
int is_global[2]
Whether the predictors are GLOBALMV.
Definition block.h:326
int32_t rate[COMPOUND_TYPES]
Rate of the compound modes.
Definition block.h:306
int_mv mv[2]
Motion vector for each predictor.
Definition block.h:316
MV_REFERENCE_FRAME ref_frames[2]
Ref frame for each predictor.
Definition block.h:318
int32_t model_rate[COMPOUND_TYPES]
Estimated rate of the compound modes.
Definition block.h:310
int ref_mv_idx
Refmv index in the drl.
Definition block.h:324
Holds the costs needed to encode the coefficients.
Definition block.h:800
LV_MAP_EOB_COST eob_costs[7][2]
Costs for coding the eobs.
Definition block.h:804
LV_MAP_COEFF_COST coeff_costs[TX_SIZES][PLANE_TYPES]
Costs for coding the coefficients.
Definition block.h:802
Contains buffers used by av1_compound_type_rd()
Definition block.h:372
int16_t * diff10
Second prediction - first prediction.
Definition block.h:380
uint8_t * pred1
Second prediction.
Definition block.h:376
int16_t * residual1
Source - first prediction.
Definition block.h:378
uint8_t * pred0
First prediction.
Definition block.h:374
uint8_t * tmp_best_mask_buf
Backup of the best segmentation mask.
Definition block.h:382
Holds mv costs for intrabc.
Definition block.h:783
int * dv_costs[2]
Definition block.h:795
int dv_costs_alloc[2][((((1<<(11+1+2)) - 1)<< 1)+1)]
Cost of transmitting the actual motion vector. dv_costs_alloc[0][i] is the cost of motion vector with...
Definition block.h:792
int joint_mv[4]
Definition block.h:785
Costs for encoding the coefficients within a level.
Definition block.h:147
int base_cost[(26+16)][8]
Cost for encoding the base level of a coefficient.
Definition block.h:159
int lps_cost[21][(4 *((4) - 1))+1+(4 *((4) - 1))+1]
Cost for encoding an increment to the coefficient.
Definition block.h:168
int txb_skip_cost[13][2]
Cost to skip txfm for the current txfm block.
Definition block.h:149
int dc_sign_cost[3][2]
Cost for encoding the dc_sign.
Definition block.h:166
int eob_extra_cost[9][2]
Cost for encoding the last non-zero coefficient.
Definition block.h:164
int base_eob_cost[4][3]
Cost for encoding the base_eob of a level.
Definition block.h:154
Costs for encoding the eob.
Definition block.h:173
int eob_cost[2][11]
eob_cost.
Definition block.h:175
Stores best extended mode information at frame level.
Definition block.h:216
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition block.h:229
uint8_t ref_mv_count
Number of ref mvs in the drl.
Definition block.h:222
uint16_t weight[USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition block.h:220
CANDIDATE_MV ref_mv_stack[USABLE_REF_MV_STACK_SIZE]
The reference mv list for the current block.
Definition block.h:218
int16_t mode_context
Context used to encode the current mode.
Definition block.h:227
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition block.h:225
Extended mode info derived from mbmi.
Definition block.h:196
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition block.h:205
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
uint16_t weight[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition block.h:201
int16_t mode_context[MODE_CTX_REF_FRAMES]
Context used to encode the current mode.
Definition block.h:207
uint8_t ref_mv_count[MODE_CTX_REF_FRAMES]
Number of ref mvs in the drl.
Definition block.h:203
Stores the prediction/txfm mode of the current coding block.
Definition blockd.h:216
uint8_t segment_id
The segment id.
Definition blockd.h:304
BLOCK_SIZE bsize
The block size of the current coding block.
Definition blockd.h:222
Txfm search results for a partition.
Definition block.h:234
uint8_t blk_skip[MAX_MIB_SIZE *MAX_MIB_SIZE]
Map showing which txfm block skips the txfm process.
Definition block.h:240
TX_SIZE tx_size
Txfm size used if the current mode is intra mode.
Definition block.h:236
uint8_t tx_type_map[MAX_MIB_SIZE *MAX_MIB_SIZE]
Map showing the txfm types for each block.
Definition block.h:242
uint32_t hash_value
Hash value of the current record.
Definition block.h:246
RD_STATS rd_stats
Rd_stats for the whole partition block.
Definition block.h:244
TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN]
Txfm sizes used if the current mode is inter mode.
Definition block.h:238
Hash records of txfm search results for the partition block.
Definition block.h:251
MB_RD_INFO tx_rd_info[8]
Circular buffer that stores the txfm search results.
Definition block.h:253
int index_start
Index to insert the newest TXB_RD_INFO.
Definition block.h:255
int num
Number of info stored in this record.
Definition block.h:257
CRC32C crc_calculator
Hash function.
Definition block.h:259
Holds the entropy costs for various modes sent to the bitstream.
Definition block.h:583
int tx_size_cost[TX_SIZES - 1][3][TX_SIZES]
tx_size_cost
Definition block.h:727
int mbmode_cost[4][INTRA_MODES]
Luma mode cost for inter frame.
Definition block.h:597
int drl_mode_cost0[DRL_MODE_CONTEXTS][2]
drl_mode_cost0
Definition block.h:649
int intrabc_cost[2]
intrabc_cost
Definition block.h:618
int palette_uv_mode_cost[2][2]
palette_uv_mode_cost
Definition block.h:633
int palette_y_color_cost[PALETTE_SIZES][5][PALETTE_COLORS]
palette_y_color_cost
Definition block.h:626
int palette_y_size_cost[7][PALETTE_SIZES]
palette_y_size_cost
Definition block.h:621
int interintra_cost[4][2]
interintra_cost
Definition block.h:691
int palette_uv_size_cost[7][PALETTE_SIZES]
palette_uv_size_cost
Definition block.h:623
int palette_uv_color_cost[PALETTE_SIZES][5][PALETTE_COLORS]
palette_uv_color_cost
Definition block.h:629
int comp_inter_cost[COMP_INTER_CONTEXTS][2]
comp_inter_cost
Definition block.h:659
int inter_tx_type_costs[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES]
inter_tx_type_costs
Definition block.h:731
int filter_intra_cost[BLOCK_SIZES_ALL][2]
filter_intra_cost
Definition block.h:603
int txfm_partition_cost[TXFM_PARTITION_CONTEXTS][2]
txfm_partition_cost
Definition block.h:729
int newmv_mode_cost[NEWMV_MODE_CONTEXTS][2]
newmv_mode_cost
Definition block.h:643
int wedge_idx_cost[BLOCK_SIZES_ALL][16]
wedge_idx_cost
Definition block.h:689
int sgrproj_restore_cost[2]
sgrproj_restore_cost
Definition block.h:746
int switchable_restore_cost[RESTORE_SWITCHABLE_TYPES]
switchable_restore_cost
Definition block.h:742
int intra_inter_cost[INTRA_INTER_CONTEXTS][2]
intra_inter_cost
Definition block.h:683
int filter_intra_mode_cost[FILTER_INTRA_MODES]
filter_intra_mode_cost
Definition block.h:605
int skip_txfm_cost[SKIP_CONTEXTS][2]
skip_txfm_cost
Definition block.h:725
int refmv_mode_cost[REFMV_MODE_CONTEXTS][2]
refmv_mode_cost
Definition block.h:647
int intra_tx_type_costs[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES]
intra_tx_type_costs
Definition block.h:734
int interintra_mode_cost[4][INTERINTRA_MODES]
interintra_mode_cost
Definition block.h:695
int comp_bwdref_cost[REF_CONTEXTS][BWD_REFS - 1][2]
Cost for signaling ref_frame[1] in bidir-comp mode.
Definition block.h:675
int comp_group_idx_cost[COMP_GROUP_IDX_CONTEXTS][2]
comp_group_idx_cost
Definition block.h:705
int comp_ref_type_cost[COMP_REF_TYPE_CONTEXTS][((COMP_REFERENCE_TYPES)+1)]
comp_ref_type_cost
Definition block.h:662
int comp_ref_cost[REF_CONTEXTS][FWD_REFS - 1][2]
Cost for signaling ref_frame[0] in bidir-comp mode.
Definition block.h:670
int switchable_interp_costs[((SWITCHABLE_FILTERS+1) *4)][SWITCHABLE_FILTERS]
switchable_interp_costs
Definition block.h:717
int wiener_restore_cost[2]
wiener_restore_cost
Definition block.h:744
int single_ref_cost[REF_CONTEXTS][SINGLE_REFS - 1][2]
single_ref_cost
Definition block.h:657
int zeromv_mode_cost[GLOBALMV_MODE_CONTEXTS][2]
zeromv_mode_cost
Definition block.h:645
int uni_comp_ref_cost[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1][((2)+1)]
uni_comp_ref_cost
Definition block.h:665
int comp_idx_cost[COMP_INDEX_CONTEXTS][2]
comp_idx_cost
Definition block.h:703
int angle_delta_cost[DIRECTIONAL_MODES][2 *MAX_ANGLE_DELTA+1]
angle_delta_cost
Definition block.h:607
int motion_mode_cost1[BLOCK_SIZES_ALL][2]
motion_mode_cost1
Definition block.h:715
int palette_y_mode_cost[7][3][2]
palette_y_mode_cost
Definition block.h:631
int compound_type_cost[BLOCK_SIZES_ALL][MASKED_COMPOUND_TYPES]
compound_type_cost
Definition block.h:687
int skip_mode_cost[SKIP_MODE_CONTEXTS][2]
skip_mode_cost
Definition block.h:641
int inter_compound_mode_cost[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES]
inter_compound_mode_cost
Definition block.h:685
int partition_cost[PARTITION_CONTEXTS][EXT_PARTITION_TYPES]
Cost for coding the partition.
Definition block.h:589
int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES]
motion_mode_cost
Definition block.h:713
int intra_uv_mode_cost[CFL_ALLOWED_TYPES][INTRA_MODES][UV_INTRA_MODES]
Chroma mode cost.
Definition block.h:601
int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES]
Luma mode cost for intra frame.
Definition block.h:599
int cfl_cost[CFL_JOINT_SIGNS][CFL_PRED_PLANES][CFL_ALPHABET_SIZE]
Rate rate associated with each alpha codeword.
Definition block.h:610
int wedge_interintra_cost[BLOCK_SIZES_ALL][2]
wedge_interintra_cost
Definition block.h:693
Holds mv costs for encoding and motion search.
Definition block.h:752
int nmv_cost_hp_alloc[2][((((1<<(11+1+2)) - 1)<< 1)+1)]
Allocates memory for 1/8-pel motion vector costs.
Definition block.h:771
int nmv_joint_cost[4]
Costs for coding the zero components.
Definition block.h:766
int ** mv_cost_stack
Points to the nmv_cost_hp in use.
Definition block.h:777
int * nmv_cost[2]
Points to the middle of nmv_cost_alloc.
Definition block.h:773
int * nmv_cost_hp[2]
Points to the middle of nmv_cost_hp_alloc.
Definition block.h:775
int nmv_cost_alloc[2][((((1<<(11+1+2)) - 1)<< 1)+1)]
Allocates memory for 1/4-pel motion vector costs.
Definition block.h:769
Contains buffers used to speed up rdopt for obmc.
Definition block.h:335
uint8_t * left_pred
Prediction from the up predictor.
Definition block.h:355
int32_t * wsrc
A new source weighted with the above and left predictors.
Definition block.h:340
int32_t * mask
A new mask constructed from the original horz/vert mask.
Definition block.h:345
uint8_t * above_pred
Prediction from the up predictor.
Definition block.h:350
Contains color maps used in palette mode.
Definition block.h:360
uint8_t best_palette_color_map[MAX_PALETTE_SQUARE]
The best color map found.
Definition block.h:362
int kmeans_data_buf[2 *MAX_PALETTE_SQUARE]
A temporary buffer used for k-means clustering.
Definition block.h:364
Holds some parameters related to partitioning schemes in AV1.
Definition block.h:388
float cnn_buffer[((((20))+(((4) *2 *2))+(((20) *4 *4))+(((20) *8 *8))))]
A buffer used by our segmentation CNN for intra-frame partitioning.
Definition block.h:400
uint8_t variance_low[105]
Variance of the subblocks in the superblock.
Definition block.h:418
int cnn_output_valid
Whether the CNN buffer contains valid output.
Definition block.h:398
float log_q
log of the quantization parameter of the ancestor BLOCK_64X64.
Definition block.h:402
int quad_tree_idx
Current index on the partition block quad tree.
Definition block.h:396
Superblock level encoder info.
Definition block.h:54
int64_t tpl_intra_cost[(128/16) *(128/16)]
TPL's estimate of tpl cost for each tpl block.
Definition block.h:72
BLOCK_SIZE min_partition_size
Maximum partition size for the sb.
Definition block.h:56
int_mv tpl_mv[(128/16) *(128/16)][INTER_REFS_PER_FRAME]
Motion vectors found by TPL model for each tpl block.
Definition block.h:74
BLOCK_SIZE max_partition_size
Minimum partition size for the sb.
Definition block.h:58
int64_t tpl_inter_cost[(128/16) *(128/16)]
TPL's estimate of inter cost for each tpl block.
Definition block.h:70
int tpl_stride
TPL's stride for the arrays in this struct.
Definition block.h:76
int tpl_data_count
Number of TPL blocks in this superblock.
Definition block.h:68
Txfm search results for a tx block.
Definition block.h:264
uint16_t entropy_context
Unknown usage.
Definition block.h:276
int64_t sse
SSE of the prediction before the txfm process.
Definition block.h:268
int64_t dist
Distortion after the txfm process.
Definition block.h:266
uint16_t eob
Location of the end of non-zero entries.
Definition block.h:272
uint8_t valid
Whether the current info block contains valid info.
Definition block.h:280
uint8_t fast
Unused.
Definition block.h:282
TX_TYPE tx_type
Transform type used on the current block.
Definition block.h:274
uint8_t txb_entropy_ctx
Context used to code the coefficients.
Definition block.h:278
int rate
Rate used to encode the txfm.
Definition block.h:270
uint8_t perform_block_coeff_opt
Whether trellis optimization is done.
Definition block.h:284
Hash records of txfm search result for each tx block.
Definition block.h:289
int num
Number of info stored in this record.
Definition block.h:297
TXB_RD_INFO tx_rd_info[256]
The txfm search results.
Definition block.h:293
int index_start
Index to insert the newest TXB_RD_INFO.
Definition block.h:295
uint32_t hash_vals[256]
The hash values.
Definition block.h:291
Txfm hash records.
Definition block.h:494
TXB_RD_RECORD txb_rd_record_16X16[MAX_NUM_16X16_TXBS]
Inter mode txfm hash record for TX_16X16 blocks.
Definition block.h:505
TXB_RD_RECORD txb_rd_record_8X8[MAX_NUM_8X8_TXBS]
Inter mode txfm hash record for TX_8X8 blocks.
Definition block.h:503
TXB_RD_RECORD txb_rd_record_64X64[MAX_NUM_64X64_TXBS]
Inter mode txfm hash record for TX_64X64 blocks.
Definition block.h:509
TXB_RD_RECORD txb_rd_record_32X32[MAX_NUM_32X32_TXBS]
Inter mode txfm hash record for TX_32X32 blocks.
Definition block.h:507
MB_RD_RECORD mb_rd_record
Txfm hash record for the whole coding block.
Definition block.h:500
TXB_RD_RECORD txb_rd_record_intra
Intra mode txfm hash record for square tx blocks.
Definition block.h:511
Stores various encoding/search decisions related to txfm search.
Definition block.h:520
int skip_txfm
Whether to skip transform and quantization on a partition block level.
Definition block.h:522
unsigned int txb_split_count
Number of txb splits.
Definition block.h:567
uint8_t blk_skip[MAX_MIB_SIZE *MAX_MIB_SIZE]
Whether to skip transform and quantization on a txfm block level.
Definition block.h:531
TxbRdRecords * txb_rd_records
Txfm hash records.
Definition block.h:555
uint8_t tx_type_map_[MAX_MIB_SIZE *MAX_MIB_SIZE]
Transform types inside the partition block.
Definition block.h:542
Defines the parameters used to perform txfm search.
Definition block.h:425
int use_default_intra_tx_type
Whether to limit the intra txfm search type to the default txfm.
Definition block.h:431
int prune_2d_txfm_mode
Whether to prune 2d transforms based on 1d transform results.
Definition block.h:439
unsigned int coeff_opt_thresholds[2]
Variable from WinnerModeParams based on current eval mode.
Definition block.h:445
TX_MODE tx_mode_search_type
How to search for the optimal tx_size.
Definition block.h:468
int use_default_inter_tx_type
Whether to limit the inter txfm search type to the default txfm.
Definition block.h:436
TX_SIZE_SEARCH_METHOD tx_size_search_method
Variable from WinnerModeParams based on current eval mode.
Definition block.h:449
unsigned int predict_dc_level
Definition block.h:473
unsigned int tx_domain_dist_threshold
Variable from WinnerModeParams based on current eval mode.
Definition block.h:447
unsigned int skip_txfm_level
Variable from WinnerModeParams based on current eval mode.
Definition block.h:453
unsigned int use_transform_domain_distortion
Variable from WinnerModeParams based on current eval mode.
Definition block.h:451
Holds the motion samples for warp motion model estimation.
Definition block.h:815
int pts[16]
Sample locations in current frame.
Definition block.h:819
int num
Number of samples.
Definition block.h:817
int pts_inref[16]
Sample location in the reference frame.
Definition block.h:821
Stores the best performing modes.
Definition block.h:82
int rate_y
Luma rate of the winner mode.
Definition block.h:90
uint8_t color_index_map[MAX_SB_SQUARE]
The color map needed to reconstruct palette mode.
Definition block.h:94
RD_STATS rd_cost
Rdstats of the winner mode.
Definition block.h:86
MB_MODE_INFO mbmi
The mbmi used to reconstruct the winner mode.
Definition block.h:84
THR_MODES mode_index
The current winner mode.
Definition block.h:96
int rate_uv
Chroma rate of the winner mode.
Definition block.h:92
int64_t rd
Rdcost of the winner mode.
Definition block.h:88
Each source plane of the current macroblock.
Definition block.h:103
tran_low_t * qcoeff
Quantized coefficients.
Definition block.h:109
const int16_t * quant_shift_QTX
Scale factor to shift coefficients toward zero. Only used by QUANT_B.
Definition block.h:135
const int16_t * quant_fp_QTX
Quantization step size used by AV1_XFORM_QUANT_FP.
Definition block.h:127
const int16_t * dequant_QTX
Dequantizer.
Definition block.h:139
tran_low_t * dqcoeff
Dequantized coefficients.
Definition block.h:107
const int16_t * zbin_QTX
Size of the quantization bin around 0. Only Used by QUANT_B.
Definition block.h:137
const int16_t * quant_QTX
Quantization step size used by AV1_XFORM_QUANT_B.
Definition block.h:131
struct buf_2d src
A buffer containing the source frame.
Definition block.h:117
uint16_t * eobs
Location of the end of qcoeff (end of block).
Definition block.h:113
tran_low_t * coeff
Transformed coefficients.
Definition block.h:111
int16_t * src_diff
Stores source - pred so the txfm can be computed later.
Definition block.h:105
uint8_t * txb_entropy_ctx
Contexts used to code the transform coefficients.
Definition block.h:115
const int16_t * round_fp_QTX
Offset used for rounding in the quantizer process by AV1_XFORM_QUANT_FP.
Definition block.h:129
const int16_t * round_QTX
Offset used for rounding in the quantizer process by AV1_XFORM_QUANT_B.
Definition block.h:133
Encoder's parameters related to the current coding block.
Definition block.h:846
int delta_qindex
Difference between frame-level qindex and current qindex.
Definition block.h:941
WARP_SAMPLE_INFO warp_sample_info[REF_FRAMES]
Warp motion samples buffer.
Definition block.h:1052
MB_MODE_INFO_EXT_FRAME * mbmi_ext_frame
Finalized mbmi_ext for the whole frame.
Definition block.h:878
int sb_energy_level
Energy in the current source superblock. Used to calculate rdmult.
Definition block.h:956
uint8_t * tmp_pred_bufs[2]
Temporary buffer to hold prediction.
Definition block.h:922
int mb_energy
Energy in the current source coding block. Used to calculate rdmult.
Definition block.h:954
int skip_mode
Inter skip mode.
Definition block.h:1099
FullMvLimits mv_limits
Limit for the range of motion vectors.
Definition block.h:1194
CoeffCosts coeff_costs
The rate needed to signal the txfm coefficients to the bitstream.
Definition block.h:971
PartitionSearchInfo part_search_info
Stores some partition-search related buffers.
Definition block.h:1077
int rdmult
Rate-distortion multiplier.
Definition block.h:951
MACROBLOCKD e_mbd
Decoder's view of current coding block.
Definition block.h:864
int best_pred_mv_sad
The minimum of pred_mv_sad.
Definition block.h:1038
int actual_num_seg1_blocks
Number of segment 1 blocks Actual number of (4x4) blocks that were applied delta-q,...
Definition block.h:999
unsigned int source_variance
Variance of the source frame.
Definition block.h:1228
int seg_skip_block
Skip mode for the segment.
Definition block.h:993
FRAME_CONTEXT * row_ctx
Entropy context for the current row.
Definition block.h:881
WinnerModeStats * winner_mode_stats
Tracks the winner modes in the current coding block.
Definition block.h:1117
unsigned int pred_sse[REF_FRAMES]
SSE of the current predictor.
Definition block.h:1230
CONV_BUF_TYPE * tmp_conv_dst
Buffer to store convolution during averaging process in compound mode.
Definition block.h:911
ModeCosts mode_costs
The rate needed to signal a mode to the bitstream.
Definition block.h:959
int comp_rd_stats_idx
The idx for the latest compound mode in the cache comp_rd_stats.
Definition block.h:1154
int nonrd_prune_ref_frame_search
Prune ref frames in real-time mode.
Definition block.h:1069
unsigned int max_mv_context[REF_FRAMES]
Context used to determine the initial step size in motion search.
Definition block.h:1187
int sadperbit
A multiplier that converts mv cost to l1 error.
Definition block.h:981
uint8_t compound_idx
How to blend the compound predictions.
Definition block.h:1149
CompoundTypeRdBuffers comp_rd_buffer
Buffer used for compound_type_rd().
Definition block.h:909
int thresh_freq_fact[BLOCK_SIZES_ALL][MAX_MODES]
Factors used for rd-thresholding.
Definition block.h:1107
IntraBCMVCosts * dv_costs
Definition block.h:968
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:1175
PALETTE_BUFFER * palette_buffer
Buffer to store the best palette map.
Definition block.h:907
CONTENT_STATE_SB content_state_sb
Characteristics of the current superblock.
Definition block.h:1025
struct macroblock_plane plane[3]
Each of the encoding plane.
Definition block.h:856
int recalc_luma_mc_data
Whether to recompute the luma prediction.
Definition block.h:1163
OBMCBuffer obmc_buffer
Modified source and masks used for fast OBMC search.
Definition block.h:905
SuperBlockEnc sb_enc
Information on a whole superblock level.
Definition block.h:1018
COMP_RD_STATS comp_rd_stats[64]
A caches of results of compound type search so they can be reused later.
Definition block.h:1152
int use_mb_mode_cache
Whether to reuse the mode stored in mb_mode_cache.
Definition block.h:1172
CB_COEFF_BUFFER * cb_coef_buff
Buffer of transformed coefficients.
Definition block.h:900
uint8_t color_sensitivity[2]
Whether there is a strong color activity.
Definition block.h:1220
int qindex
Quantization index for the current partition block.
Definition block.h:934
int must_find_valid_partition
Whether to disable some features to force a mode in current block.
Definition block.h:1086
int actual_num_seg2_blocks
Number of segment 2 blocks Actual number of (4x4) blocks that were applied delta-q,...
Definition block.h:1005
int picked_ref_frames_mask[MAX_MIB_SIZE *MAX_MIB_SIZE]
Reference frames picked by the square subblocks in a superblock.
Definition block.h:1060
MvCosts * mv_costs
Definition block.h:963
TxfmSearchInfo txfm_search_info
Results of the txfm searches that have been done.
Definition block.h:1213
int pred_mv_sad[REF_FRAMES]
Sum absolute distortion of the predicted mv for each ref frame.
Definition block.h:1036
IntraBCHashInfo intrabc_hash_info
Data structure to speed up intrabc search.
Definition block.h:1169
int errorperbit
A multiplier that converts mv cost to l2 error.
Definition block.h:979
FRAME_CONTEXT * tile_pb_ctx
Entropy context for the current tile.
Definition block.h:890
struct inter_modes_info * inter_modes_info
Stores the inter mode information needed to build an rd model.
Definition block.h:1146
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition block.h:902
int winner_mode_count
Tracks how many winner modes there are.
Definition block.h:1119
int cnt_zeromv
Number of zero motion vectors.
Definition block.h:1009
TXFM_RD_MODEL rd_model
The model used for rd-estimation to avoid txfm.
Definition block.h:1133
TxfmSearchParams txfm_search_params
Parameters that control how motion search is done.
Definition block.h:1206
uint8_t tpl_keep_ref_frame[REF_FRAMES]
Disables certain ref frame pruning based on tpl.
Definition block.h:1046
MB_MODE_INFO_EXT mbmi_ext
Derived coding information.
Definition block.h:871
int lossless[8]
Definition blockd.h:815