AOMedia AV1 Codec
block.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016, 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
15#ifndef AOM_AV1_ENCODER_BLOCK_H_
16#define AOM_AV1_ENCODER_BLOCK_H_
17
18#include "av1/common/blockd.h"
19#include "av1/common/entropymv.h"
20#include "av1/common/entropy.h"
21#include "av1/common/enums.h"
22#include "av1/common/mvref_common.h"
23
24#include "av1/encoder/enc_enums.h"
25#include "av1/encoder/mcomp_structs.h"
26#if !CONFIG_REALTIME_ONLY
27#include "av1/encoder/partition_cnn_weights.h"
28#endif
29
30#include "av1/encoder/hash_motion.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
37#define MIN_TPL_BSIZE_1D 16
39#define MAX_TPL_BLK_IN_SB (MAX_SB_SIZE / MIN_TPL_BSIZE_1D)
41#define RD_RECORD_BUFFER_LEN 8
42
44#define MAX_TX_TYPE_PROB 1024
45
47#define COLOR_SENS_IDX(plane) ((plane)-1)
48
50#define COLLECT_NONRD_PICK_MODE_STAT 0
51
53#if COLLECT_NONRD_PICK_MODE_STAT
54#include "aom_ports/aom_timer.h"
55
56typedef struct _mode_search_stat_nonrd {
57 int32_t num_blocks[BLOCK_SIZES];
58 int64_t total_block_times[BLOCK_SIZES];
59 int32_t num_searches[BLOCK_SIZES][MB_MODE_COUNT];
60 int32_t num_nonskipped_searches[BLOCK_SIZES][MB_MODE_COUNT];
61 int64_t search_times[BLOCK_SIZES][MB_MODE_COUNT];
62 int64_t nonskipped_search_times[BLOCK_SIZES][MB_MODE_COUNT];
63 int64_t ms_time[BLOCK_SIZES][MB_MODE_COUNT];
64 int64_t ifs_time[BLOCK_SIZES][MB_MODE_COUNT];
65 int64_t model_rd_time[BLOCK_SIZES][MB_MODE_COUNT];
66 int64_t txfm_time[BLOCK_SIZES][MB_MODE_COUNT];
67 struct aom_usec_timer timer1;
68 struct aom_usec_timer timer2;
69 struct aom_usec_timer bsize_timer;
70} mode_search_stat_nonrd;
71#endif // COLLECT_NONRD_PICK_MODE_STAT
73
105
108typedef struct {
112 RD_STATS rd_cost;
114 int64_t rd;
120 uint8_t color_index_map[MAX_SB_SQUARE];
122 THR_MODES mode_index;
124
129typedef struct macroblock_plane {
131 int16_t *src_diff;
133 tran_low_t *dqcoeff;
135 tran_low_t *qcoeff;
137 tran_low_t *coeff;
139 uint16_t *eobs;
143 struct buf_2d src;
144
153 const int16_t *quant_fp_QTX;
155 const int16_t *round_fp_QTX;
157 const int16_t *quant_QTX;
159 const int16_t *round_QTX;
161 const int16_t *quant_shift_QTX;
163 const int16_t *zbin_QTX;
165 const int16_t *dequant_QTX;
168
173typedef struct {
175 int txb_skip_cost[TXB_SKIP_CONTEXTS][2];
180 int base_eob_cost[SIG_COEF_CONTEXTS_EOB][3];
185 int base_cost[SIG_COEF_CONTEXTS][8];
190 int eob_extra_cost[EOB_COEF_CONTEXTS][2];
192 int dc_sign_cost[DC_SIGN_CONTEXTS][2];
194 int lps_cost[LEVEL_CONTEXTS][COEFF_BASE_RANGE + 1 + COEFF_BASE_RANGE + 1];
196
199typedef struct {
201 int eob_cost[2][11];
203
206typedef struct {
208 tran_low_t *tcoeff[MAX_MB_PLANE];
210 uint16_t *eobs[MAX_MB_PLANE];
217 uint8_t *entropy_ctx[MAX_MB_PLANE];
219
222typedef struct {
223 // TODO(angiebird): Reduce the buffer size according to sb_type
225 CANDIDATE_MV ref_mv_stack[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE];
227 uint16_t weight[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE];
229 uint8_t ref_mv_count[MODE_CTX_REF_FRAMES];
231 int_mv global_mvs[REF_FRAMES];
233 int16_t mode_context[MODE_CTX_REF_FRAMES];
235
242typedef struct {
244 CANDIDATE_MV ref_mv_stack[USABLE_REF_MV_STACK_SIZE];
246 uint16_t weight[USABLE_REF_MV_STACK_SIZE];
249 // TODO(Ravi/Remya): Reduce the buffer size of global_mvs
251 int_mv global_mvs[REF_FRAMES];
255 uint16_t cb_offset[PLANE_TYPES];
257
260typedef struct {
262 TX_SIZE tx_size;
264 TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN];
266 uint8_t blk_skip[MAX_MIB_SIZE * MAX_MIB_SIZE];
268 uint8_t tx_type_map[MAX_MIB_SIZE * MAX_MIB_SIZE];
270 RD_STATS rd_stats;
272 uint32_t hash_value;
273} MB_RD_INFO;
274
293
295#define MAX_COMP_RD_STATS 64
298typedef struct {
300 int32_t rate[COMPOUND_TYPES];
302 int64_t dist[COMPOUND_TYPES];
304 int32_t model_rate[COMPOUND_TYPES];
306 int64_t model_dist[COMPOUND_TYPES];
308 int comp_rs2[COMPOUND_TYPES];
310 int_mv mv[2];
312 MV_REFERENCE_FRAME ref_frames[2];
314 PREDICTION_MODE mode;
316 int_interpfilters filter;
320 int is_global[2];
322 INTERINTER_COMPOUND_DATA interinter_comp;
324
329typedef struct {
334 int32_t *wsrc;
339 int32_t *mask;
344 uint8_t *above_pred;
349 uint8_t *left_pred;
350} OBMCBuffer;
351
354typedef struct {
356 uint8_t best_palette_color_map[MAX_PALETTE_SQUARE];
358 int16_t kmeans_data_buf[2 * MAX_PALETTE_SQUARE];
360
366typedef struct {
368 uint8_t *pred0;
370 uint8_t *pred1;
372 int16_t *residual1;
374 int16_t *diff10;
378
381// TODO(chiyotsai@google.com): Consolidate this with SIMPLE_MOTION_DATA_TREE
382typedef struct {
383#if !CONFIG_REALTIME_ONLY
384 // The following 4 parameters are used for cnn-based partitioning on intra
385 // frame.
394 float cnn_buffer[CNN_OUT_BUF_SIZE];
396 float log_q;
397#endif
398
412 uint8_t variance_low[105];
414
416enum {
420 TX_PRUNE_NONE = 0,
424 TX_PRUNE_LARGEST = 1,
428 TX_PRUNE_SPLIT = 2,
429} UENUM1BYTE(TX_PRUNE_TYPE);
431
436typedef struct {
443
446
449
454 unsigned int coeff_opt_thresholds[2];
458 TX_SIZE_SEARCH_METHOD tx_size_search_method;
462 unsigned int skip_txfm_level;
463
478
487 unsigned int predict_dc_level;
488
494
500
501#if !CONFIG_REALTIME_ONLY
504
511#endif
513
515#define MAX_NUM_8X8_TXBS ((MAX_MIB_SIZE >> 1) * (MAX_MIB_SIZE >> 1))
516#define MAX_NUM_16X16_TXBS ((MAX_MIB_SIZE >> 2) * (MAX_MIB_SIZE >> 2))
517#define MAX_NUM_32X32_TXBS ((MAX_MIB_SIZE >> 3) * (MAX_MIB_SIZE >> 3))
518#define MAX_NUM_64X64_TXBS ((MAX_MIB_SIZE >> 4) * (MAX_MIB_SIZE >> 4))
520
526typedef struct {
528 uint8_t skip_txfm;
529
537 uint8_t blk_skip[MAX_MIB_SIZE * MAX_MIB_SIZE];
538
548 uint8_t tx_type_map_[MAX_MIB_SIZE * MAX_MIB_SIZE];
549
552
561 // TODO(chiyotsai@google.com): Move this to a more appropriate location such
562 // as ThreadData.
563 unsigned int txb_split_count;
564#if CONFIG_SPEED_STATS
566 unsigned int tx_search_count;
567#endif // CONFIG_SPEED_STATS
569#undef MAX_NUM_8X8_TXBS
570#undef MAX_NUM_16X16_TXBS
571#undef MAX_NUM_32X32_TXBS
572#undef MAX_NUM_64X64_TXBS
573
579typedef struct {
580
585 int partition_cost[PARTITION_CONTEXTS][EXT_PARTITION_TYPES];
587
588
593 int mbmode_cost[BLOCK_SIZE_GROUPS][INTRA_MODES];
595 int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES];
597 int intra_uv_mode_cost[CFL_ALLOWED_TYPES][INTRA_MODES][UV_INTRA_MODES];
599 int filter_intra_cost[BLOCK_SIZES_ALL][2];
601 int filter_intra_mode_cost[FILTER_INTRA_MODES];
603 int angle_delta_cost[DIRECTIONAL_MODES][2 * MAX_ANGLE_DELTA + 1];
604
606 int cfl_cost[CFL_JOINT_SIGNS][CFL_PRED_PLANES][CFL_ALPHABET_SIZE];
608
609
615
617 int palette_y_size_cost[PALATTE_BSIZE_CTXS][PALETTE_SIZES];
619 int palette_uv_size_cost[PALATTE_BSIZE_CTXS][PALETTE_SIZES];
621 int palette_y_color_cost[PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS]
622 [PALETTE_COLORS];
624 int palette_uv_color_cost[PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS]
625 [PALETTE_COLORS];
627 int palette_y_mode_cost[PALATTE_BSIZE_CTXS][PALETTE_Y_MODE_CONTEXTS][2];
629 int palette_uv_mode_cost[PALETTE_UV_MODE_CONTEXTS][2];
631
632
637 int skip_mode_cost[SKIP_MODE_CONTEXTS][2];
639 int newmv_mode_cost[NEWMV_MODE_CONTEXTS][2];
641 int zeromv_mode_cost[GLOBALMV_MODE_CONTEXTS][2];
643 int refmv_mode_cost[REFMV_MODE_CONTEXTS][2];
645 int drl_mode_cost0[DRL_MODE_CONTEXTS][2];
647
648
653 int single_ref_cost[REF_CONTEXTS][SINGLE_REFS - 1][2];
655 int comp_inter_cost[COMP_INTER_CONTEXTS][2];
657 int comp_ref_type_cost[COMP_REF_TYPE_CONTEXTS]
658 [CDF_SIZE(COMP_REFERENCE_TYPES)];
660 int uni_comp_ref_cost[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1]
661 [CDF_SIZE(2)];
666 int comp_ref_cost[REF_CONTEXTS][FWD_REFS - 1][2];
671 int comp_bwdref_cost[REF_CONTEXTS][BWD_REFS - 1][2];
673
674
679 int intra_inter_cost[INTRA_INTER_CONTEXTS][2];
681 int inter_compound_mode_cost[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES];
683 int compound_type_cost[BLOCK_SIZES_ALL][MASKED_COMPOUND_TYPES];
685 int wedge_idx_cost[BLOCK_SIZES_ALL][16];
687 int interintra_cost[BLOCK_SIZE_GROUPS][2];
689 int wedge_interintra_cost[BLOCK_SIZES_ALL][2];
691 int interintra_mode_cost[BLOCK_SIZE_GROUPS][INTERINTRA_MODES];
693
694
699 int comp_idx_cost[COMP_INDEX_CONTEXTS][2];
701 int comp_group_idx_cost[COMP_GROUP_IDX_CONTEXTS][2];
703
704
709 int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES];
711 int motion_mode_cost1[BLOCK_SIZES_ALL][2];
713 int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
715
716
721 int skip_txfm_cost[SKIP_CONTEXTS][2];
723 int tx_size_cost[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES];
725 int txfm_partition_cost[TXFM_PARTITION_CONTEXTS][2];
727 int inter_tx_type_costs[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
729 int intra_tx_type_costs[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
730 [TX_TYPES];
732
733
744
745
750 int tmp_pred_cost[SEG_TEMPORAL_PRED_CTXS][2];
752 int spatial_pred_cost[SPATIAL_PREDICTION_PROBS][MAX_SEGMENTS];
754} ModeCosts;
755
758typedef struct {
759
772 int nmv_joint_cost[MV_JOINTS];
773
775 int nmv_cost_alloc[2][MV_VALS];
777 int nmv_cost_hp_alloc[2][MV_VALS];
779 int *nmv_cost[2];
781 int *nmv_cost_hp[2];
785} MvCosts;
786
789typedef struct {
791 int joint_mv[MV_JOINTS];
792
798 int dv_costs_alloc[2][MV_VALS];
799
801 int *dv_costs[2];
803
806typedef struct {
808 LV_MAP_COEFF_COST coeff_costs[TX_SIZES][PLANE_TYPES];
811} CoeffCosts;
812
814// 4: NEAREST, NEW, NEAR, GLOBAL
815#define SINGLE_REF_MODES ((REF_FRAMES - 1) * 4)
817struct inter_modes_info;
818
821typedef struct {
823 int num;
825 int pts[16];
827 int pts_inref[16];
829
831typedef enum {
832 kZeroSad = 0,
833 kVeryLowSad = 1,
834 kLowSad = 2,
835 kMedSad = 3,
836 kHighSad = 4
837} SOURCE_SAD;
838
839typedef struct {
841 SOURCE_SAD source_sad_nonrd;
843 SOURCE_SAD source_sad_rd;
844 int lighting_change;
845 int low_sumdiff;
846} CONTENT_STATE_SB;
847
848// Structure to hold pixel level gradient info.
849typedef struct {
850 uint16_t abs_dx_abs_dy_sum;
851 int8_t hist_bin_idx;
852 bool is_dx_zero;
853} PixelLevelGradientInfo;
854
855// Structure to hold the variance and log(1 + variance) for 4x4 sub-blocks.
856typedef struct {
857 double log_var;
858 int var;
859} Block4x4VarInfo;
860
861#ifndef NDEBUG
862typedef struct SetOffsetsLoc {
863 int mi_row;
864 int mi_col;
865 BLOCK_SIZE bsize;
866} SetOffsetsLoc;
867#endif // NDEBUG
868
870
878typedef struct macroblock {
879
888 struct macroblock_plane plane[MAX_MB_PLANE];
889
896 MACROBLOCKD e_mbd;
897
904
911
913 FRAME_CONTEXT *row_ctx;
922 FRAME_CONTEXT *tile_pb_ctx;
923
934 uint16_t cb_offset[PLANE_TYPES];
935
943 CONV_BUF_TYPE *tmp_conv_dst;
944
954 uint8_t *tmp_pred_bufs[2];
956
957
967
974
984
989
999
1002
1004 double rb;
1005
1010
1013
1017
1022
1026
1027
1036
1037
1047
1053
1059
1063
1070
1074
1080
1081
1086 // TODO(chiyotsai@google.com): Refactor this out of macroblock
1088
1094 CONTENT_STATE_SB content_state_sb;
1096
1097
1105 int pred_mv_sad[REF_FRAMES];
1113 int pred_mv0_sad[REF_FRAMES];
1115 int pred_mv1_sad[REF_FRAMES];
1116
1123 uint8_t tpl_keep_ref_frame[REF_FRAMES];
1124
1130
1137 int picked_ref_frames_mask[MAX_MIB_SIZE * MAX_MIB_SIZE];
1138
1148
1149
1155
1165
1166
1177
1184 int thresh_freq_fact[BLOCK_SIZES_ALL][MAX_MODES];
1185
1197
1210 TXFM_RD_MODEL rd_model;
1211
1221 // TODO(any): try to consolidate this speed feature with winner mode
1222 // processing.
1224
1227
1232
1241
1246 IntraBCHashInfo intrabc_hash_info;
1247
1259 PixelLevelGradientInfo *pixel_gradient_info;
1261 bool is_sb_gradient_cached[PLANE_TYPES];
1262
1266
1267
1276 unsigned int max_mv_context[REF_FRAMES];
1277
1283 FullMvLimits mv_limits;
1284
1292 search_site_config search_site_cfg_buf[NUM_DISTINCT_SEARCH_METHODS];
1294
1295
1305
1312
1318 uint8_t color_sensitivity_sb[MAX_MB_PLANE - 1];
1320 uint8_t color_sensitivity_sb_g[MAX_MB_PLANE - 1];
1322 uint8_t color_sensitivity_sb_alt[MAX_MB_PLANE - 1];
1324 uint8_t color_sensitivity[MAX_MB_PLANE - 1];
1327
1330
1332 // should be checked at the coding block level.
1334
1336 // so we can keep dqcoeff of the best tx_type.
1337 tran_low_t *dqcoeff_buf;
1339
1340
1345 unsigned int source_variance;
1349 // good/reliable, and so the superblock MV will be tested in the
1350 // nonrd_pickmode. This is only used for LAST_FRAME.
1353 // nonrd_pickmode.
1356 // the variance_partitioning.
1357 int_mv sb_me_mv;
1359 // speed feature rt_sf->use_fast_fixed_part is enabled.
1362 unsigned int pred_sse[REF_FRAMES];
1364#if CONFIG_RT_ML_PARTITIONING
1365 DECLARE_ALIGNED(16, uint8_t, est_pred[128 * 128]);
1366#endif
1368
1376
1384#ifndef NDEBUG
1387#endif // NDEBUG
1388
1389#if COLLECT_NONRD_PICK_MODE_STAT
1390 mode_search_stat_nonrd ms_stat_nonrd;
1391#endif // COLLECT_NONRD_PICK_MODE_STAT
1392
1397
1401 struct SB_FIRST_PASS_STATS *sb_stats_cache;
1402
1406 struct SB_FIRST_PASS_STATS *sb_fp_stats;
1407
1408#if CONFIG_PARTITION_SEARCH_ORDER
1412 RD_STATS *rdcost;
1413#endif // CONFIG_PARTITION_SEARCH_ORDER
1415#undef SINGLE_REF_MODES
1416
1418// Zeroes out 'n_stats' elements in the array x->winner_mode_stats.
1419// It only zeroes out what is necessary in 'color_index_map' (just the block
1420// size, not the whole array).
1421static inline void zero_winner_mode_stats(BLOCK_SIZE bsize, int n_stats,
1422 WinnerModeStats *stats) {
1423 // When winner mode stats are not required, the memory allocation is avoided
1424 // for x->winner_mode_stats. The stats pointer will be NULL in such cases.
1425 if (stats == NULL) return;
1426
1427 const int block_height = block_size_high[bsize];
1428 const int block_width = block_size_wide[bsize];
1429 for (int i = 0; i < n_stats; ++i) {
1430 WinnerModeStats *const stat = &stats[i];
1431 memset(&stat->mbmi, 0, sizeof(stat->mbmi));
1432 memset(&stat->rd_cost, 0, sizeof(stat->rd_cost));
1433 memset(&stat->rd, 0, sizeof(stat->rd));
1434 memset(&stat->rate_y, 0, sizeof(stat->rate_y));
1435 memset(&stat->rate_uv, 0, sizeof(stat->rate_uv));
1436 // Do not reset the whole array as it is CPU intensive.
1437 memset(&stat->color_index_map, 0,
1438 block_width * block_height * sizeof(stat->color_index_map[0]));
1439 memset(&stat->mode_index, 0, sizeof(stat->mode_index));
1440 }
1441}
1442
1443static inline int is_rect_tx_allowed_bsize(BLOCK_SIZE bsize) {
1444 static const char LUT[BLOCK_SIZES_ALL] = {
1445 0, // BLOCK_4X4
1446 1, // BLOCK_4X8
1447 1, // BLOCK_8X4
1448 0, // BLOCK_8X8
1449 1, // BLOCK_8X16
1450 1, // BLOCK_16X8
1451 0, // BLOCK_16X16
1452 1, // BLOCK_16X32
1453 1, // BLOCK_32X16
1454 0, // BLOCK_32X32
1455 1, // BLOCK_32X64
1456 1, // BLOCK_64X32
1457 0, // BLOCK_64X64
1458 0, // BLOCK_64X128
1459 0, // BLOCK_128X64
1460 0, // BLOCK_128X128
1461 1, // BLOCK_4X16
1462 1, // BLOCK_16X4
1463 1, // BLOCK_8X32
1464 1, // BLOCK_32X8
1465 1, // BLOCK_16X64
1466 1, // BLOCK_64X16
1467 };
1468
1469 return LUT[bsize];
1470}
1471
1472static inline int is_rect_tx_allowed(const MACROBLOCKD *xd,
1473 const MB_MODE_INFO *mbmi) {
1474 return is_rect_tx_allowed_bsize(mbmi->bsize) &&
1475 !xd->lossless[mbmi->segment_id];
1476}
1477
1478static inline int tx_size_to_depth(TX_SIZE tx_size, BLOCK_SIZE bsize) {
1479 TX_SIZE ctx_size = max_txsize_rect_lookup[bsize];
1480 int depth = 0;
1481 while (tx_size != ctx_size) {
1482 depth++;
1483 ctx_size = sub_tx_size_map[ctx_size];
1484 assert(depth <= MAX_TX_DEPTH);
1485 }
1486 return depth;
1487}
1488
1489static inline void set_blk_skip(uint8_t txb_skip[], int plane, int blk_idx,
1490 int skip) {
1491 if (skip)
1492 txb_skip[blk_idx] |= 1UL << plane;
1493 else
1494 txb_skip[blk_idx] &= ~(1UL << plane);
1495#ifndef NDEBUG
1496 // Set chroma planes to uninitialized states when luma is set to check if
1497 // it will be set later
1498 if (plane == 0) {
1499 txb_skip[blk_idx] |= 1UL << (1 + 4);
1500 txb_skip[blk_idx] |= 1UL << (2 + 4);
1501 }
1502
1503 // Clear the initialization checking bit
1504 txb_skip[blk_idx] &= ~(1UL << (plane + 4));
1505#endif
1506}
1507
1508static inline int is_blk_skip(uint8_t *txb_skip, int plane, int blk_idx) {
1509#ifndef NDEBUG
1510 // Check if this is initialized
1511 assert(!(txb_skip[blk_idx] & (1UL << (plane + 4))));
1512
1513 // The magic number is 0x77, this is to test if there is garbage data
1514 assert((txb_skip[blk_idx] & 0x88) == 0);
1515#endif
1516 return (txb_skip[blk_idx] >> plane) & 1;
1517}
1518
1520
1521#ifdef __cplusplus
1522} // extern "C"
1523#endif
1524
1525#endif // AOM_AV1_ENCODER_BLOCK_H_
#define MAX_COMP_RD_STATS
Number of compound rd stats.
Definition block.h:295
#define MAX_TPL_BLK_IN_SB
Maximum number of tpl block in a super block.
Definition block.h:39
#define RD_RECORD_BUFFER_LEN
Number of txfm hash records kept for the partition block.
Definition block.h:41
struct macroblock_plane MACROBLOCK_PLANE
Each source plane of the current macroblock.
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
@ RESTORE_SWITCHABLE_TYPES
Definition enums.h:614
Stores the transforms coefficients for the whole superblock.
Definition block.h:206
uint8_t * entropy_ctx[3]
Transform block entropy contexts.
Definition block.h:217
uint16_t * eobs[3]
Where the transformed coefficients end.
Definition block.h:210
tran_low_t * tcoeff[3]
The transformed coefficients.
Definition block.h:208
Rdcost stats in compound mode.
Definition block.h:298
int64_t model_dist[COMPOUND_TYPES]
Estimated distortion of the compound modes.
Definition block.h:306
int_interpfilters filter
Current interpolation filter.
Definition block.h:316
int comp_rs2[COMPOUND_TYPES]
Rate need to send the mask type.
Definition block.h:308
INTERINTER_COMPOUND_DATA interinter_comp
Current parameters for interinter mode.
Definition block.h:322
int64_t dist[COMPOUND_TYPES]
Distortion of the compound modes.
Definition block.h:302
PREDICTION_MODE mode
Current prediction mode.
Definition block.h:314
int is_global[2]
Whether the predictors are GLOBALMV.
Definition block.h:320
int32_t rate[COMPOUND_TYPES]
Rate of the compound modes.
Definition block.h:300
int_mv mv[2]
Motion vector for each predictor.
Definition block.h:310
MV_REFERENCE_FRAME ref_frames[2]
Ref frame for each predictor.
Definition block.h:312
int32_t model_rate[COMPOUND_TYPES]
Estimated rate of the compound modes.
Definition block.h:304
int ref_mv_idx
Refmv index in the drl.
Definition block.h:318
Holds the costs needed to encode the coefficients.
Definition block.h:806
LV_MAP_EOB_COST eob_costs[7][2]
Costs for coding the eobs.
Definition block.h:810
LV_MAP_COEFF_COST coeff_costs[TX_SIZES][PLANE_TYPES]
Costs for coding the coefficients.
Definition block.h:808
Contains buffers used by av1_compound_type_rd()
Definition block.h:366
int16_t * diff10
Second prediction - first prediction.
Definition block.h:374
uint8_t * pred1
Second prediction.
Definition block.h:370
int16_t * residual1
Source - first prediction.
Definition block.h:372
uint8_t * pred0
First prediction.
Definition block.h:368
uint8_t * tmp_best_mask_buf
Backup of the best segmentation mask.
Definition block.h:376
Holds mv costs for intrabc.
Definition block.h:789
int * dv_costs[2]
Definition block.h:801
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:798
int joint_mv[4]
Definition block.h:791
Costs for encoding the coefficients within a level.
Definition block.h:173
int base_cost[(26+16)][8]
Cost for encoding the base level of a coefficient.
Definition block.h:185
int lps_cost[21][(4 *((4) - 1))+1+(4 *((4) - 1))+1]
Cost for encoding an increment to the coefficient.
Definition block.h:194
int txb_skip_cost[13][2]
Cost to skip txfm for the current txfm block.
Definition block.h:175
int dc_sign_cost[3][2]
Cost for encoding the dc_sign.
Definition block.h:192
int eob_extra_cost[9][2]
Cost for encoding the last non-zero coefficient.
Definition block.h:190
int base_eob_cost[4][3]
Cost for encoding the base_eob of a level.
Definition block.h:180
Costs for encoding the eob.
Definition block.h:199
int eob_cost[2][11]
eob_cost.
Definition block.h:201
Stores best extended mode information at frame level.
Definition block.h:242
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition block.h:255
uint8_t ref_mv_count
Number of ref mvs in the drl.
Definition block.h:248
uint16_t weight[USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition block.h:246
CANDIDATE_MV ref_mv_stack[USABLE_REF_MV_STACK_SIZE]
The reference mv list for the current block.
Definition block.h:244
int16_t mode_context
Context used to encode the current mode.
Definition block.h:253
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition block.h:251
Extended mode info derived from mbmi.
Definition block.h:222
int_mv global_mvs[REF_FRAMES]
Global mvs.
Definition block.h:231
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:225
uint16_t weight[MODE_CTX_REF_FRAMES][USABLE_REF_MV_STACK_SIZE]
The weights used to compute the ref mvs.
Definition block.h:227
int16_t mode_context[MODE_CTX_REF_FRAMES]
Context used to encode the current mode.
Definition block.h:233
uint8_t ref_mv_count[MODE_CTX_REF_FRAMES]
Number of ref mvs in the drl.
Definition block.h:229
Stores the prediction/txfm mode of the current coding block.
Definition blockd.h:222
uint8_t segment_id
The segment id.
Definition blockd.h:310
BLOCK_SIZE bsize
The block size of the current coding block.
Definition blockd.h:228
Inter-mode txfm results for a partition block.
Definition block.h:260
uint8_t blk_skip[MAX_MIB_SIZE *MAX_MIB_SIZE]
Map showing which txfm block skips the txfm process.
Definition block.h:266
TX_SIZE tx_size
Txfm size used if the current mode is intra mode.
Definition block.h:262
uint8_t tx_type_map[MAX_MIB_SIZE *MAX_MIB_SIZE]
Map showing the txfm types for each block.
Definition block.h:268
uint32_t hash_value
Hash value of the current record.
Definition block.h:272
RD_STATS rd_stats
Rd_stats for the whole partition block.
Definition block.h:270
TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN]
Txfm sizes used if the current mode is inter mode.
Definition block.h:264
Hash records of the inter-mode transform results.
Definition block.h:281
MB_RD_INFO mb_rd_info[8]
Definition block.h:285
int index_start
Index to insert the newest rd record.
Definition block.h:287
int num
Number of info stored in this record.
Definition block.h:289
CRC32C crc_calculator
Hash function.
Definition block.h:291
Holds the entropy costs for various modes sent to the bitstream.
Definition block.h:579
int tx_size_cost[TX_SIZES - 1][3][TX_SIZES]
tx_size_cost
Definition block.h:723
int mbmode_cost[4][INTRA_MODES]
Luma mode cost for inter frame.
Definition block.h:593
int drl_mode_cost0[DRL_MODE_CONTEXTS][2]
drl_mode_cost0
Definition block.h:645
int intrabc_cost[2]
intrabc_cost
Definition block.h:614
int palette_uv_mode_cost[2][2]
palette_uv_mode_cost
Definition block.h:629
int palette_y_color_cost[PALETTE_SIZES][5][PALETTE_COLORS]
palette_y_color_cost
Definition block.h:622
int palette_y_size_cost[7][PALETTE_SIZES]
palette_y_size_cost
Definition block.h:617
int interintra_cost[4][2]
interintra_cost
Definition block.h:687
int palette_uv_size_cost[7][PALETTE_SIZES]
palette_uv_size_cost
Definition block.h:619
int palette_uv_color_cost[PALETTE_SIZES][5][PALETTE_COLORS]
palette_uv_color_cost
Definition block.h:625
int comp_inter_cost[COMP_INTER_CONTEXTS][2]
comp_inter_cost
Definition block.h:655
int tmp_pred_cost[3][2]
tmp_pred_cost
Definition block.h:750
int inter_tx_type_costs[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES]
inter_tx_type_costs
Definition block.h:727
int filter_intra_cost[BLOCK_SIZES_ALL][2]
filter_intra_cost
Definition block.h:599
int txfm_partition_cost[TXFM_PARTITION_CONTEXTS][2]
txfm_partition_cost
Definition block.h:725
int spatial_pred_cost[3][8]
spatial_pred_cost
Definition block.h:752
int newmv_mode_cost[NEWMV_MODE_CONTEXTS][2]
newmv_mode_cost
Definition block.h:639
int wedge_idx_cost[BLOCK_SIZES_ALL][16]
wedge_idx_cost
Definition block.h:685
int sgrproj_restore_cost[2]
sgrproj_restore_cost
Definition block.h:742
int switchable_restore_cost[RESTORE_SWITCHABLE_TYPES]
switchable_restore_cost
Definition block.h:738
int intra_inter_cost[INTRA_INTER_CONTEXTS][2]
intra_inter_cost
Definition block.h:679
int filter_intra_mode_cost[FILTER_INTRA_MODES]
filter_intra_mode_cost
Definition block.h:601
int skip_txfm_cost[SKIP_CONTEXTS][2]
skip_txfm_cost
Definition block.h:721
int refmv_mode_cost[REFMV_MODE_CONTEXTS][2]
refmv_mode_cost
Definition block.h:643
int intra_tx_type_costs[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES]
intra_tx_type_costs
Definition block.h:730
int interintra_mode_cost[4][INTERINTRA_MODES]
interintra_mode_cost
Definition block.h:691
int comp_bwdref_cost[REF_CONTEXTS][BWD_REFS - 1][2]
Cost for signaling ref_frame[1] in bidir-comp mode.
Definition block.h:671
int comp_group_idx_cost[COMP_GROUP_IDX_CONTEXTS][2]
comp_group_idx_cost
Definition block.h:701
int comp_ref_type_cost[COMP_REF_TYPE_CONTEXTS][((COMP_REFERENCE_TYPES)+1)]
comp_ref_type_cost
Definition block.h:658
int comp_ref_cost[REF_CONTEXTS][FWD_REFS - 1][2]
Cost for signaling ref_frame[0] in bidir-comp mode.
Definition block.h:666
int switchable_interp_costs[((SWITCHABLE_FILTERS+1) *4)][SWITCHABLE_FILTERS]
switchable_interp_costs
Definition block.h:713
int wiener_restore_cost[2]
wiener_restore_cost
Definition block.h:740
int single_ref_cost[REF_CONTEXTS][SINGLE_REFS - 1][2]
single_ref_cost
Definition block.h:653
int zeromv_mode_cost[GLOBALMV_MODE_CONTEXTS][2]
zeromv_mode_cost
Definition block.h:641
int uni_comp_ref_cost[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1][((2)+1)]
uni_comp_ref_cost
Definition block.h:661
int comp_idx_cost[COMP_INDEX_CONTEXTS][2]
comp_idx_cost
Definition block.h:699
int angle_delta_cost[DIRECTIONAL_MODES][2 *MAX_ANGLE_DELTA+1]
angle_delta_cost
Definition block.h:603
int motion_mode_cost1[BLOCK_SIZES_ALL][2]
motion_mode_cost1
Definition block.h:711
int palette_y_mode_cost[7][3][2]
palette_y_mode_cost
Definition block.h:627
int compound_type_cost[BLOCK_SIZES_ALL][MASKED_COMPOUND_TYPES]
compound_type_cost
Definition block.h:683
int skip_mode_cost[SKIP_MODE_CONTEXTS][2]
skip_mode_cost
Definition block.h:637
int inter_compound_mode_cost[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES]
inter_compound_mode_cost
Definition block.h:681
int partition_cost[PARTITION_CONTEXTS][EXT_PARTITION_TYPES]
Cost for coding the partition.
Definition block.h:585
int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES]
motion_mode_cost
Definition block.h:709
int intra_uv_mode_cost[CFL_ALLOWED_TYPES][INTRA_MODES][UV_INTRA_MODES]
Chroma mode cost.
Definition block.h:597
int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES]
Luma mode cost for intra frame.
Definition block.h:595
int cfl_cost[CFL_JOINT_SIGNS][CFL_PRED_PLANES][CFL_ALPHABET_SIZE]
Rate rate associated with each alpha codeword.
Definition block.h:606
int wedge_interintra_cost[BLOCK_SIZES_ALL][2]
wedge_interintra_cost
Definition block.h:689
Holds mv costs for encoding and motion search.
Definition block.h:758
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:777
int nmv_joint_cost[4]
Costs for coding the zero components.
Definition block.h:772
int ** mv_cost_stack
Points to the nmv_cost_hp in use.
Definition block.h:783
int * nmv_cost[2]
Points to the middle of nmv_cost_alloc.
Definition block.h:779
int * nmv_cost_hp[2]
Points to the middle of nmv_cost_hp_alloc.
Definition block.h:781
int nmv_cost_alloc[2][((((1<<(11+1+2)) - 1)<< 1)+1)]
Allocates memory for 1/4-pel motion vector costs.
Definition block.h:775
Contains buffers used to speed up rdopt for obmc.
Definition block.h:329
uint8_t * left_pred
Prediction from the up predictor.
Definition block.h:349
int32_t * wsrc
A new source weighted with the above and left predictors.
Definition block.h:334
int32_t * mask
A new mask constructed from the original horz/vert mask.
Definition block.h:339
uint8_t * above_pred
Prediction from the up predictor.
Definition block.h:344
Contains color maps used in palette mode.
Definition block.h:354
int16_t kmeans_data_buf[2 *MAX_PALETTE_SQUARE]
A temporary buffer used for k-means clustering.
Definition block.h:358
uint8_t best_palette_color_map[MAX_PALETTE_SQUARE]
The best color map found.
Definition block.h:356
Holds some parameters related to partitioning schemes in AV1.
Definition block.h:382
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:394
uint8_t variance_low[105]
Variance of the subblocks in the superblock.
Definition block.h:412
int cnn_output_valid
Whether the CNN buffer contains valid output.
Definition block.h:392
float log_q
log of the quantization parameter of the ancestor BLOCK_64X64.
Definition block.h:396
int quad_tree_idx
Current index on the partition block quad tree.
Definition block.h:390
Superblock level encoder info.
Definition block.h:80
int_mv tpl_mv[(MAX_SB_SIZE/16) *(MAX_SB_SIZE/16)][INTER_REFS_PER_FRAME]
Motion vectors found by TPL model for each tpl block.
Definition block.h:100
BLOCK_SIZE min_partition_size
Maximum partition size for the sb.
Definition block.h:82
int64_t tpl_inter_cost[(MAX_SB_SIZE/16) *(MAX_SB_SIZE/16)]
TPL's estimate of inter cost for each tpl block.
Definition block.h:96
BLOCK_SIZE max_partition_size
Minimum partition size for the sb.
Definition block.h:84
int tpl_stride
TPL's stride for the arrays in this struct.
Definition block.h:102
int64_t tpl_intra_cost[(MAX_SB_SIZE/16) *(MAX_SB_SIZE/16)]
TPL's estimate of tpl cost for each tpl block.
Definition block.h:98
int tpl_data_count
Number of TPL blocks in this superblock.
Definition block.h:94
Stores various encoding/search decisions related to txfm search.
Definition block.h:526
unsigned int txb_split_count
Number of txb splits.
Definition block.h:563
uint8_t blk_skip[MAX_MIB_SIZE *MAX_MIB_SIZE]
Whether to skip transform and quantization on a txfm block level.
Definition block.h:537
MB_RD_RECORD * mb_rd_record
Txfm hash records of inter-modes.
Definition block.h:551
uint8_t tx_type_map_[MAX_MIB_SIZE *MAX_MIB_SIZE]
Transform types inside the partition block.
Definition block.h:548
uint8_t skip_txfm
Whether to skip transform and quantization on a partition block level.
Definition block.h:528
Defines the parameters used to perform txfm search.
Definition block.h:436
int mode_eval_type
Definition block.h:499
int use_qm_dist_metric
Definition block.h:493
int use_default_intra_tx_type
Whether to limit the intra txfm search type to the default txfm.
Definition block.h:442
int prune_2d_txfm_mode
Whether to prune 2d transforms based on 1d transform results.
Definition block.h:448
bool enable_nn_prune_intra_tx_depths
Indicates if NN model should be invoked to prune transform depths.
Definition block.h:510
unsigned int coeff_opt_thresholds[2]
Variable from WinnerModeParams based on current eval mode.
Definition block.h:454
TX_MODE tx_mode_search_type
How to search for the optimal tx_size.
Definition block.h:477
TX_SIZE_SEARCH_METHOD tx_size_search_method
Variable from WinnerModeParams based on current eval mode.
Definition block.h:458
int default_inter_tx_type_prob_thresh
Definition block.h:445
unsigned int predict_dc_level
Definition block.h:487
unsigned int tx_domain_dist_threshold
Variable from WinnerModeParams based on current eval mode.
Definition block.h:456
unsigned int skip_txfm_level
Variable from WinnerModeParams based on current eval mode.
Definition block.h:462
TX_PRUNE_TYPE nn_prune_depths_for_intra_tx
Indicates the transform depths for which RD evaluation is skipped.
Definition block.h:503
unsigned int use_transform_domain_distortion
Variable from WinnerModeParams based on current eval mode.
Definition block.h:460
Holds the motion samples for warp motion model estimation.
Definition block.h:821
int pts[16]
Sample locations in current frame.
Definition block.h:825
int num
Number of samples.
Definition block.h:823
int pts_inref[16]
Sample location in the reference frame.
Definition block.h:827
Stores the best performing modes.
Definition block.h:108
int rate_y
Luma rate of the winner mode.
Definition block.h:116
uint8_t color_index_map[MAX_SB_SQUARE]
The color map needed to reconstruct palette mode.
Definition block.h:120
RD_STATS rd_cost
Rdstats of the winner mode.
Definition block.h:112
MB_MODE_INFO mbmi
The mbmi used to reconstruct the winner mode.
Definition block.h:110
THR_MODES mode_index
The current winner mode.
Definition block.h:122
int rate_uv
Chroma rate of the winner mode.
Definition block.h:118
int64_t rd
Rdcost of the winner mode.
Definition block.h:114
Struct used to hold inter mode data for fast tx search.
Definition encoder.h:1277
Each source plane of the current macroblock.
Definition block.h:129
tran_low_t * qcoeff
Quantized coefficients.
Definition block.h:135
const int16_t * quant_shift_QTX
Scale factor to shift coefficients toward zero. Only used by QUANT_B.
Definition block.h:161
const int16_t * quant_fp_QTX
Quantization step size used by AV1_XFORM_QUANT_FP.
Definition block.h:153
const int16_t * dequant_QTX
Dequantizer.
Definition block.h:165
tran_low_t * dqcoeff
Dequantized coefficients.
Definition block.h:133
const int16_t * zbin_QTX
Size of the quantization bin around 0. Only Used by QUANT_B.
Definition block.h:163
const int16_t * quant_QTX
Quantization step size used by AV1_XFORM_QUANT_B.
Definition block.h:157
struct buf_2d src
A buffer containing the source frame.
Definition block.h:143
uint16_t * eobs
Location of the end of qcoeff (end of block).
Definition block.h:139
tran_low_t * coeff
Transformed coefficients.
Definition block.h:137
int16_t * src_diff
Stores source - pred so the txfm can be computed later.
Definition block.h:131
uint8_t * txb_entropy_ctx
Contexts used to code the transform coefficients.
Definition block.h:141
const int16_t * round_fp_QTX
Offset used for rounding in the quantizer process by AV1_XFORM_QUANT_FP.
Definition block.h:155
const int16_t * round_QTX
Offset used for rounding in the quantizer process by AV1_XFORM_QUANT_B.
Definition block.h:159
Encoder's parameters related to the current coding block.
Definition block.h:878
int delta_qindex
Difference between frame-level qindex and current qindex.
Definition block.h:973
WARP_SAMPLE_INFO warp_sample_info[REF_FRAMES]
Warp motion samples buffer.
Definition block.h:1129
MB_MODE_INFO_EXT_FRAME * mbmi_ext_frame
Finalized mbmi_ext for the whole frame.
Definition block.h:910
int sb_energy_level
Energy in the current source superblock. Used to calculate rdmult.
Definition block.h:1009
uint8_t * tmp_pred_bufs[2]
Temporary buffer to hold prediction.
Definition block.h:954
int mb_energy
Energy in the current source coding block. Used to calculate rdmult.
Definition block.h:1007
int64_t min_dist_inter_uv
Coding block distortion value for uv/color, minimum over the inter modes.
Definition block.h:1326
search_site_config search_site_cfg_buf[NUM_DISTINCT_SEARCH_METHODS]
Buffer for storing the search site config.
Definition block.h:1292
int rdmult_cur_qindex
Current qindex (before being adjusted by delta_q_res) used to derive rdmult_delta_qindex.
Definition block.h:988
int skip_mode
Inter skip mode.
Definition block.h:1176
int block_is_zero_sad
Flag to indicate coding block is zero sad.
Definition block.h:1347
FullMvLimits mv_limits
Limit for the range of motion vectors.
Definition block.h:1283
CoeffCosts coeff_costs
The rate needed to signal the txfm coefficients to the bitstream.
Definition block.h:1024
PartitionSearchInfo part_search_info
Stores some partition-search related buffers.
Definition block.h:1154
int rdmult
Rate-distortion multiplier.
Definition block.h:998
int sb_force_fixed_part
Flag to indicate if a fixed partition should be used, only if the.
Definition block.h:1360
double rb
Superblock level distortion propagation factor.
Definition block.h:1004
MACROBLOCKD e_mbd
Decoder's view of current coding block.
Definition block.h:896
SetOffsetsLoc last_set_offsets_loc
A hash to make sure av1_set_offsets is called.
Definition block.h:1386
int actual_num_seg1_blocks
Number of segment 1 blocks Actual number of (4x4) blocks that were applied delta-q,...
Definition block.h:1052
unsigned int source_variance
Variance of the source frame.
Definition block.h:1345
int seg_skip_block
Skip mode for the segment.
Definition block.h:1046
int pred_mv1_sad[REF_FRAMES]
The sad of the 2nd mv ref (near).
Definition block.h:1115
int sb_me_block
Flag to indicate to test the superblock MV for the coding block in the.
Definition block.h:1354
FRAME_CONTEXT * row_ctx
Entropy context for the current row.
Definition block.h:913
WinnerModeStats * winner_mode_stats
Tracks the winner modes in the current coding block.
Definition block.h:1194
unsigned int pred_sse[REF_FRAMES]
SSE of the current predictor.
Definition block.h:1362
CONV_BUF_TYPE * tmp_conv_dst
Buffer to store convolution during averaging process in compound mode.
Definition block.h:943
ModeCosts mode_costs
The rate needed to signal a mode to the bitstream.
Definition block.h:1012
int pred_mv0_sad[REF_FRAMES]
The sad of the 1st mv ref (nearest).
Definition block.h:1113
int comp_rd_stats_idx
The idx for the latest compound mode in the cache comp_rd_stats.
Definition block.h:1231
int nonrd_prune_ref_frame_search
Prune ref frames in real-time mode.
Definition block.h:1146
int prev_segment_id
Previous segment id for which qmatrices were updated. This is used to bypass setting of qmatrices if ...
Definition block.h:1078
int try_merge_partition
Prediction for ML based partition.
Definition block.h:1375
tran_low_t * dqcoeff_buf
The buffer used by search_tx_type() to swap dqcoeff in macroblockd_plane.
Definition block.h:1337
bool reuse_inter_pred
Flag to reuse predicted samples of inter block.
Definition block.h:1264
PixelLevelGradientInfo * pixel_gradient_info
Pointer to the buffer which caches gradient information.
Definition block.h:1259
unsigned int max_mv_context[REF_FRAMES]
Context used to determine the initial step size in motion search.
Definition block.h:1276
int sadperbit
A multiplier that converts mv cost to l1 error.
Definition block.h:1034
uint8_t compound_idx
How to blend the compound predictions.
Definition block.h:1226
int intra_sb_rdmult_modifier
Intra only, per sb rd adjustment.
Definition block.h:1001
CompoundTypeRdBuffers comp_rd_buffer
Buffer used for compound_type_rd().
Definition block.h:941
int best_pred_mv_sad[2]
The minimum of pred_mv_sad.
Definition block.h:1111
int thresh_freq_fact[BLOCK_SIZES_ALL][MAX_MODES]
Factors used for rd-thresholding.
Definition block.h:1184
IntraBCMVCosts * dv_costs
Definition block.h:1021
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:1252
int color_palette_thresh
Threshold on the number of colors for testing palette mode.
Definition block.h:1329
PALETTE_BUFFER * palette_buffer
Buffer to store the best palette map.
Definition block.h:939
uint8_t color_sensitivity_sb[3 - 1]
Whether there is a strong color activity.
Definition block.h:1318
CONTENT_STATE_SB content_state_sb
Characteristics of the current superblock.
Definition block.h:1094
int force_color_check_block_level
Used in REALTIME coding mode: flag to indicate if the color_sensitivity.
Definition block.h:1333
struct macroblock_plane plane[3]
Each of the encoding plane.
Definition block.h:888
uint8_t color_sensitivity[3 - 1]
Color sensitivity flag for the coding block.
Definition block.h:1324
int recalc_luma_mc_data
Whether to recompute the luma prediction.
Definition block.h:1240
bool is_sb_gradient_cached[PLANE_TYPES]
Flags indicating the availability of cached gradient info.
Definition block.h:1261
int_mv sb_me_mv
Motion vector from superblock MV derived from int_pro_motion() in.
Definition block.h:1357
OBMCBuffer obmc_buffer
Modified source and masks used for fast OBMC search.
Definition block.h:937
SuperBlockEnc sb_enc
Information on a whole superblock level.
Definition block.h:1087
COMP_RD_STATS comp_rd_stats[64]
A caches of results of compound type search so they can be reused later.
Definition block.h:1229
int force_zeromv_skip_for_blk
Flag to force zeromv-skip at block level, for nonrd path.
Definition block.h:1073
int use_mb_mode_cache
Whether to reuse the mode stored in mb_mode_cache.
Definition block.h:1249
struct SB_FIRST_PASS_STATS * sb_fp_stats
Pointer to the structure which stores the statistics used by first-pass when superblock is searched t...
Definition block.h:1406
CB_COEFF_BUFFER * cb_coef_buff
Buffer of transformed coefficients.
Definition block.h:932
int qindex
Quantization index for the current partition block.
Definition block.h:966
int must_find_valid_partition
Whether to disable some features to force a mode in current block.
Definition block.h:1163
int actual_num_seg2_blocks
Number of segment 2 blocks Actual number of (4x4) blocks that were applied delta-q,...
Definition block.h:1058
int force_zeromv_skip_for_sb
Flag to force zeromv-skip at superblock level, for nonrd path.
Definition block.h:1069
uint8_t color_sensitivity_sb_alt[3 - 1]
Color sensitivity flag for the superblock for altref reference.
Definition block.h:1322
int picked_ref_frames_mask[MAX_MIB_SIZE *MAX_MIB_SIZE]
Reference frames picked by the square subblocks in a superblock.
Definition block.h:1137
MvCosts * mv_costs
Definition block.h:1016
TxfmSearchInfo txfm_search_info
Results of the txfm searches that have been done.
Definition block.h:1311
int pred_mv_sad[REF_FRAMES]
Sum absolute distortion of the predicted mv for each ref frame.
Definition block.h:1105
Block4x4VarInfo * src_var_info_of_4x4_sub_blocks
Pointer to buffer which caches sub-block variances in a superblock.
Definition block.h:1383
IntraBCHashInfo intrabc_hash_info
Data structure to speed up intrabc search.
Definition block.h:1246
int palette_pixels
Number of pixels in current thread that choose palette mode in the fast encoding stage for screen con...
Definition block.h:1396
int errorperbit
A multiplier that converts mv cost to l2 error.
Definition block.h:1032
FRAME_CONTEXT * tile_pb_ctx
Entropy context for the current tile.
Definition block.h:922
struct inter_modes_info * inter_modes_info
Stores the inter mode information needed to build an rd model.
Definition block.h:1223
struct SB_FIRST_PASS_STATS * sb_stats_cache
Pointer to the structure which stores the statistics used by sb-level multi-pass encoding.
Definition block.h:1401
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition block.h:934
int rdmult_delta_qindex
Difference between frame-level qindex and qindex used to compute rdmult (lambda).
Definition block.h:983
int sb_me_partition
Flag to indicate superblock ME in variance partition is determined to be.
Definition block.h:1351
uint8_t color_sensitivity_sb_g[3 - 1]
Color sensitivity flag for the superblock for golden reference.
Definition block.h:1320
int winner_mode_count
Tracks how many winner modes there are.
Definition block.h:1196
int cnt_zeromv
Number of zero motion vectors.
Definition block.h:1062
TXFM_RD_MODEL rd_model
The model used for rd-estimation to avoid txfm.
Definition block.h:1210
TxfmSearchParams txfm_search_params
Parameters that control how motion search is done.
Definition block.h:1304
uint8_t tpl_keep_ref_frame[REF_FRAMES]
Disables certain ref frame pruning based on tpl.
Definition block.h:1123
MB_MODE_INFO_EXT mbmi_ext
Derived coding information.
Definition block.h:903
int lossless[8]
Definition blockd.h:817