Add doxygen comments for MB_MODE_INFO
Change-Id: I611581c6b686beeb89766d49dac230f1c25ef468
diff --git a/av1/common/av1_common_int.h b/av1/common/av1_common_int.h
index eb5cd75..0a68cb5 100644
--- a/av1/common/av1_common_int.h
+++ b/av1/common/av1_common_int.h
@@ -1291,7 +1291,7 @@
for (i = 0; i < num_planes; ++i) {
struct macroblockd_plane *const pd = &xd->plane[i];
// Offset the buffer pointer
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
if (pd->subsampling_y && (mi_row & 0x01) && (mi_size_high[bsize] == 1))
row_offset = mi_row - 1;
if (pd->subsampling_x && (mi_col & 0x01) && (mi_size_wide[bsize] == 1))
@@ -1760,7 +1760,7 @@
const int offset = mi_row * mi_params->mi_stride + mi_col;
MB_MODE_INFO **mi = mi_params->mi_grid_base + offset;
- const BLOCK_SIZE subsize = mi[0]->sb_type;
+ const BLOCK_SIZE subsize = mi[0]->bsize;
assert(bsize < BLOCK_SIZES_ALL);
@@ -1785,7 +1785,7 @@
if (sshigh * 4 == bhigh) return PARTITION_HORZ_4;
assert(sshigh * 2 == bhigh);
- if (mbmi_below->sb_type == subsize)
+ if (mbmi_below->bsize == subsize)
return PARTITION_HORZ;
else
return PARTITION_HORZ_B;
@@ -1796,7 +1796,7 @@
if (sswide * 4 == bwide) return PARTITION_VERT_4;
assert(sswide * 2 == bhigh);
- if (mbmi_right->sb_type == subsize)
+ if (mbmi_right->bsize == subsize)
return PARTITION_VERT;
else
return PARTITION_VERT_B;
@@ -1810,8 +1810,8 @@
// it's PARTITION_SPLIT.
if (sswide * 2 != bwide || sshigh * 2 != bhigh) return PARTITION_SPLIT;
- if (mi_size_wide[mbmi_below->sb_type] == bwide) return PARTITION_HORZ_A;
- if (mi_size_high[mbmi_right->sb_type] == bhigh) return PARTITION_VERT_A;
+ if (mi_size_wide[mbmi_below->bsize] == bwide) return PARTITION_HORZ_A;
+ if (mi_size_high[mbmi_right->bsize] == bhigh) return PARTITION_VERT_A;
return PARTITION_SPLIT;
}
diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c
index ec92c1f..caa15c2 100644
--- a/av1/common/av1_loopfilter.c
+++ b/av1/common/av1_loopfilter.c
@@ -199,11 +199,11 @@
TX_SIZE tx_size =
(plane == AOM_PLANE_Y)
? mbmi->tx_size
- : av1_get_max_uv_txsize(mbmi->sb_type, plane_ptr->subsampling_x,
+ : av1_get_max_uv_txsize(mbmi->bsize, plane_ptr->subsampling_x,
plane_ptr->subsampling_y);
assert(tx_size < TX_SIZES_ALL);
if ((plane == AOM_PLANE_Y) && is_inter_block(mbmi) && !mbmi->skip_txfm) {
- const BLOCK_SIZE sb_type = mbmi->sb_type;
+ const BLOCK_SIZE sb_type = mbmi->bsize;
const int blk_row = mi_row & (mi_size_high[sb_type] - 1);
const int blk_col = mi_col & (mi_size_wide[sb_type] - 1);
const TX_SIZE mb_tx_size =
@@ -297,9 +297,8 @@
const int pv_skip_txfm =
mi_prev->skip_txfm && is_inter_block(mi_prev);
- const BLOCK_SIZE bsize =
- get_plane_block_size(mbmi->sb_type, plane_ptr->subsampling_x,
- plane_ptr->subsampling_y);
+ const BLOCK_SIZE bsize = get_plane_block_size(
+ mbmi->bsize, plane_ptr->subsampling_x, plane_ptr->subsampling_y);
assert(bsize < BLOCK_SIZES_ALL);
const int prediction_masks = edge_dir == VERT_EDGE
? block_size_wide[bsize] - 1
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 21f41e0..cf7111d 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -214,65 +214,133 @@
#define INTER_TX_SIZE_BUF_LEN 16
#define TXK_TYPE_BUF_LEN 64
-// This structure now relates to 4x4 block regions.
+/*!\endcond */
+
+/*! \brief Stores the prediction/txfm mode of the current coding block
+ */
typedef struct MB_MODE_INFO {
- // interinter members
- INTERINTER_COMPOUND_DATA interinter_comp;
- WarpedMotionParams wm_params;
- int_mv mv[2];
- // q index for the current coding block.
+ /*****************************************************************************
+ * \name General Info of the Coding Block
+ ****************************************************************************/
+ /**@{*/
+ /*! \brief The block size of the current coding block */
+ BLOCK_SIZE bsize;
+ /*! \brief The partition type of the current coding block. */
+ PARTITION_TYPE partition;
+ /*! \brief The prediction mode used */
+ PREDICTION_MODE mode;
+ /*! \brief The UV mode when intra is used */
+ UV_PREDICTION_MODE uv_mode;
+ /*! \brief The q index for the current coding block. */
int current_qindex;
- // Only for INTER blocks
+ /**@}*/
+
+ /*****************************************************************************
+ * \name Inter Mode Info
+ ****************************************************************************/
+ /**@{*/
+ /*! \brief The motion vectors used by the current inter mode */
+ int_mv mv[2];
+ /*! \brief The reference frames for the MV */
+ MV_REFERENCE_FRAME ref_frame[2];
+ /*! \brief Filter used in subpel interpolation. */
int_interpfilters interp_filters;
- // TODO(debargha): Consolidate these flags
+ /*! \brief The motion mode used by the inter prediction. */
+ MOTION_MODE motion_mode;
+ /*! \brief Number of samples used by warp causal */
+ uint8_t num_proj_ref;
+ /*! \brief The number of overlapped neighbors above/left for obmc/warp motion
+ * mode. */
+ uint8_t overlappable_neighbors[2];
+ /*! \brief The parameters used in warp motion mode. */
+ WarpedMotionParams wm_params;
+ /*! \brief The type of intra mode used by inter-intra */
+ INTERINTRA_MODE interintra_mode;
+ /*! \brief The type of wedge used in interintra mode. */
+ int8_t interintra_wedge_index;
+ /*! \brief Struct that stores the data used in interinter compound mode. */
+ INTERINTER_COMPOUND_DATA interinter_comp;
+ /**@}*/
+
+ /*****************************************************************************
+ * \name Intra Mode Info
+ ****************************************************************************/
+ /**@{*/
+ /*! \brief Directional mode delta: the angle is base angle + (angle_delta *
+ * step). */
+ int8_t angle_delta[PLANE_TYPES];
+ /*! \brief The type of filter intra mode used (if applicable). */
+ FILTER_INTRA_MODE_INFO filter_intra_mode_info;
+ /*! \brief Chroma from Luma: Joint sign of alpha Cb and alpha Cr */
+ int8_t cfl_alpha_signs;
+ /*! \brief Chroma from Luma: Index of the alpha Cb and alpha Cr combination */
+ uint8_t cfl_alpha_idx;
+ /*! \brief Stores the size and colors of palette mode */
+ PALETTE_MODE_INFO palette_mode_info;
+ /**@}*/
+
+ /*****************************************************************************
+ * \name Transform Info
+ ****************************************************************************/
+ /**@{*/
+ /*! \brief Whether to skip transforming and sending. */
+ int8_t skip_txfm;
+ /*! \brief Transform size when fixed size txfm is used (e.g. intra modes). */
+ TX_SIZE tx_size;
+ /*! \brief Transform size when recursive txfm tree is on. */
+ TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN];
+ /**@}*/
+
+ /*****************************************************************************
+ * \name Loop Filter Info
+ ****************************************************************************/
+ /**@{*/
+ /*! \copydoc MACROBLOCKD::delta_lf_from_base */
+ int8_t delta_lf_from_base;
+ /*! \copydoc MACROBLOCKD::delta_lf */
+ int8_t delta_lf[FRAME_LF_COUNT];
+ /**@}*/
+
+ /*****************************************************************************
+ * \name Bitfield for Memory Reduction
+ ****************************************************************************/
+ /**@{*/
+ /*! \brief The segment id */
+ uint8_t segment_id : 3;
+ /*! \brief Only valid when temporal update if off. */
+ uint8_t seg_id_predicted : 1;
+ /*! \brief Which ref_mv to use */
+ uint8_t ref_mv_idx : 2;
+ /*! \brief Inter skip mode */
+ uint8_t skip_mode : 1;
+ /*! \brief Whether intrabc is used. */
+ uint8_t use_intrabc : 1;
+ /*! \brief Indicates if masked compound is used(1) or not (0). */
+ uint8_t comp_group_idx : 1;
+ /*! \brief Indicates whether dist_wtd_comp(0) is used or not (0). */
+ uint8_t compound_idx : 1;
+ /*! \brief Whether to use interintra wedge */
+ uint8_t use_wedge_interintra : 1;
+ /*! \brief CDEF strength per BLOCK_64X64 */
+ int8_t cdef_strength : 4;
+ /**@}*/
+
#if CONFIG_RD_DEBUG
+ /*! \brief RD info used for debugging */
RD_STATS rd_stats;
+ /*! \brief The current row in unit of 4x4 blocks for debugging */
int mi_row;
+ /*! \brief The current col in unit of 4x4 blocks for debugging */
int mi_col;
#endif
#if CONFIG_INSPECTION
+ /*! \brief Whether we are skipping the current rows or columns. */
int16_t tx_skip[TXK_TYPE_BUF_LEN];
#endif
- PALETTE_MODE_INFO palette_mode_info;
- // Common for both INTER and INTRA blocks
- BLOCK_SIZE sb_type;
- PREDICTION_MODE mode;
- // Only for INTRA blocks
- UV_PREDICTION_MODE uv_mode;
- // interintra members
- INTERINTRA_MODE interintra_mode;
- MOTION_MODE motion_mode;
- PARTITION_TYPE partition;
- MV_REFERENCE_FRAME ref_frame[2];
- FILTER_INTRA_MODE_INFO filter_intra_mode_info;
- int8_t skip_txfm;
- TX_SIZE inter_tx_size[INTER_TX_SIZE_BUF_LEN];
- TX_SIZE tx_size;
- int8_t delta_lf_from_base;
- int8_t delta_lf[FRAME_LF_COUNT];
- int8_t interintra_wedge_index;
- // The actual prediction angle is the base angle + (angle_delta * step).
- int8_t angle_delta[PLANE_TYPES];
- /* deringing gain *per-superblock* */
- // Joint sign of alpha Cb and alpha Cr
- int8_t cfl_alpha_signs;
- // Index of the alpha Cb and alpha Cr combination
- uint8_t cfl_alpha_idx;
- uint8_t num_proj_ref;
- uint8_t overlappable_neighbors[2];
- // If comp_group_idx=0, indicate if dist_wtd_comp(0) or avg_comp(1) is used.
- uint8_t compound_idx;
- uint8_t use_wedge_interintra : 1;
- uint8_t segment_id : 3;
- uint8_t seg_id_predicted : 1; // valid only when temporal_update is enabled
- uint8_t skip_mode : 1;
- uint8_t use_intrabc : 1;
- uint8_t ref_mv_idx : 2;
- // Indicate if masked compound is used(1) or not(0).
- uint8_t comp_group_idx : 1;
- int8_t cdef_strength : 4;
} MB_MODE_INFO;
+/*!\cond */
+
static INLINE int is_intrabc_block(const MB_MODE_INFO *mbmi) {
return mbmi->use_intrabc;
}
@@ -352,7 +420,7 @@
static INLINE int is_global_mv_block(const MB_MODE_INFO *const mbmi,
TransformationType type) {
const PREDICTION_MODE mode = mbmi->mode;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int block_size_allowed =
AOMMIN(block_size_wide[bsize], block_size_high[bsize]) >= 8;
return (mode == GLOBALMV || mode == GLOBAL_GLOBALMV) && type > TRANSLATION &&
@@ -1271,7 +1339,7 @@
if (xd->lossless[mbmi->segment_id]) return TX_4X4;
if (plane == 0) return mbmi->tx_size;
const MACROBLOCKD_PLANE *pd = &xd->plane[plane];
- return av1_get_max_uv_txsize(mbmi->sb_type, pd->subsampling_x,
+ return av1_get_max_uv_txsize(mbmi->bsize, pd->subsampling_x,
pd->subsampling_y);
}
@@ -1311,7 +1379,7 @@
}
static INLINE int is_interintra_allowed(const MB_MODE_INFO *mbmi) {
- return is_interintra_allowed_bsize(mbmi->sb_type) &&
+ return is_interintra_allowed_bsize(mbmi->bsize) &&
is_interintra_allowed_mode(mbmi->mode) &&
is_interintra_allowed_ref(mbmi->ref_frame);
}
@@ -1366,7 +1434,7 @@
const TransformationType gm_type = gm_params[mbmi->ref_frame[0]].wmtype;
if (is_global_mv_block(mbmi, gm_type)) return SIMPLE_TRANSLATION;
}
- if (is_motion_variation_allowed_bsize(mbmi->sb_type) &&
+ if (is_motion_variation_allowed_bsize(mbmi->bsize) &&
is_inter_mode(mbmi->mode) && mbmi->ref_frame[1] != INTRA_FRAME &&
is_motion_variation_allowed_compound(mbmi)) {
assert(!has_second_ref(mbmi));
@@ -1464,7 +1532,7 @@
// First check if all modes are GLOBALMV
if (mbmi->mode != GLOBALMV && mbmi->mode != GLOBAL_GLOBALMV) return 0;
- if (AOMMIN(mi_size_wide[mbmi->sb_type], mi_size_high[mbmi->sb_type]) < 2)
+ if (AOMMIN(mi_size_wide[mbmi->bsize], mi_size_high[mbmi->bsize]) < 2)
return 0;
// Now check if all global motion is non translational
diff --git a/av1/common/cfl.h b/av1/common/cfl.h
index a1d6dc2..0062e9f 100644
--- a/av1/common/cfl.h
+++ b/av1/common/cfl.h
@@ -18,7 +18,7 @@
// Can we use CfL for the current block?
static INLINE CFL_ALLOWED_TYPE is_cfl_allowed(const MACROBLOCKD *xd) {
const MB_MODE_INFO *mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(bsize < BLOCK_SIZES_ALL);
if (xd->lossless[mbmi->segment_id]) {
// In lossless, CfL is available when the partition size is equal to the
diff --git a/av1/common/debugmodes.c b/av1/common/debugmodes.c
index c4bfb7e..75257e8 100644
--- a/av1/common/debugmodes.c
+++ b/av1/common/debugmodes.c
@@ -52,7 +52,7 @@
const int rows = mi_params->mi_rows;
const int cols = mi_params->mi_cols;
- print_mi_data(cm, mvs, "Partitions:", offsetof(MB_MODE_INFO, sb_type));
+ print_mi_data(cm, mvs, "Partitions:", offsetof(MB_MODE_INFO, bsize));
print_mi_data(cm, mvs, "Modes:", offsetof(MB_MODE_INFO, mode));
print_mi_data(cm, mvs, "Ref frame:", offsetof(MB_MODE_INFO, ref_frame[0]));
print_mi_data(cm, mvs, "Transform:", offsetof(MB_MODE_INFO, tx_size));
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index db259db..04e050a 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -160,7 +160,7 @@
for (int i = 0; i < end_mi;) {
const MB_MODE_INFO *const candidate = candidate_mi0[col_offset + i];
- const int candidate_bsize = candidate->sb_type;
+ const int candidate_bsize = candidate->bsize;
const int n4_w = mi_size_wide[candidate_bsize];
int len = AOMMIN(xd->width, n4_w);
if (use_step_16)
@@ -207,7 +207,7 @@
for (i = 0; i < end_mi;) {
const MB_MODE_INFO *const candidate =
xd->mi[(row_offset + i) * xd->mi_stride + col_offset];
- const int candidate_bsize = candidate->sb_type;
+ const int candidate_bsize = candidate->bsize;
const int n4_h = mi_size_high[candidate_bsize];
int len = AOMMIN(xd->height, n4_h);
if (use_step_16)
@@ -688,14 +688,14 @@
const MB_MODE_INFO *const candidate = xd->mi[-xd->mi_stride + idx];
process_compound_ref_mv_candidate(
candidate, cm, rf, ref_id, ref_id_count, ref_diff, ref_diff_count);
- idx += mi_size_wide[candidate->sb_type];
+ idx += mi_size_wide[candidate->bsize];
}
for (int idx = 0; abs(max_col_offset) >= 1 && idx < mi_size;) {
const MB_MODE_INFO *const candidate = xd->mi[idx * xd->mi_stride - 1];
process_compound_ref_mv_candidate(
candidate, cm, rf, ref_id, ref_id_count, ref_diff, ref_diff_count);
- idx += mi_size_high[candidate->sb_type];
+ idx += mi_size_high[candidate->bsize];
}
// Build up the compound mv predictor
@@ -752,7 +752,7 @@
const MB_MODE_INFO *const candidate = xd->mi[-xd->mi_stride + idx];
process_single_ref_mv_candidate(candidate, cm, ref_frame, refmv_count,
ref_mv_stack, ref_mv_weight);
- idx += mi_size_wide[candidate->sb_type];
+ idx += mi_size_wide[candidate->bsize];
}
for (int idx = 0; abs(max_col_offset) >= 1 && idx < mi_size &&
@@ -760,7 +760,7 @@
const MB_MODE_INFO *const candidate = xd->mi[idx * xd->mi_stride - 1];
process_single_ref_mv_candidate(candidate, cm, ref_frame, refmv_count,
ref_mv_stack, ref_mv_weight);
- idx += mi_size_high[candidate->sb_type];
+ idx += mi_size_high[candidate->bsize];
}
for (int idx = 0; idx < *refmv_count; ++idx) {
@@ -797,7 +797,7 @@
global_mvs[ref_frame].as_int = INVALID_MV;
}
} else {
- const BLOCK_SIZE bsize = mi->sb_type;
+ const BLOCK_SIZE bsize = mi->bsize;
const int allow_high_precision_mv = cm->features.allow_high_precision_mv;
const int force_integer_mv = cm->features.cur_frame_force_integer_mv;
if (ref_frame < REF_FRAMES) {
@@ -1052,8 +1052,8 @@
static INLINE void record_samples(const MB_MODE_INFO *mbmi, int *pts,
int *pts_inref, int row_offset, int sign_r,
int col_offset, int sign_c) {
- const int bw = block_size_wide[mbmi->sb_type];
- const int bh = block_size_high[mbmi->sb_type];
+ const int bw = block_size_wide[mbmi->bsize];
+ const int bh = block_size_high[mbmi->bsize];
const int x = col_offset * MI_SIZE + sign_c * bw / 2 - 1;
const int y = row_offset * MI_SIZE + sign_r * bh / 2 - 1;
@@ -1107,7 +1107,7 @@
if (up_available) {
const int mi_row_offset = -1;
const MB_MODE_INFO *mbmi = xd->mi[mi_row_offset * mi_stride];
- uint8_t superblock_width = mi_size_wide[mbmi->sb_type];
+ uint8_t superblock_width = mi_size_wide[mbmi->bsize];
if (xd->width <= superblock_width) {
// Handle "current block width <= above block width" case.
@@ -1127,7 +1127,7 @@
for (int i = 0; i < AOMMIN(xd->width, cm->mi_params.mi_cols - mi_col);
i += superblock_width) {
mbmi = xd->mi[i + mi_row_offset * mi_stride];
- superblock_width = mi_size_wide[mbmi->sb_type];
+ superblock_width = mi_size_wide[mbmi->bsize];
if (mbmi->ref_frame[0] == ref_frame &&
mbmi->ref_frame[1] == NONE_FRAME) {
@@ -1146,7 +1146,7 @@
if (left_available) {
const int mi_col_offset = -1;
const MB_MODE_INFO *mbmi = xd->mi[mi_col_offset];
- uint8_t superblock_height = mi_size_high[mbmi->sb_type];
+ uint8_t superblock_height = mi_size_high[mbmi->bsize];
if (xd->height <= superblock_height) {
// Handle "current block height <= above block height" case.
@@ -1166,7 +1166,7 @@
for (int i = 0; i < AOMMIN(xd->height, cm->mi_params.mi_rows - mi_row);
i += superblock_height) {
mbmi = xd->mi[mi_col_offset + i * mi_stride];
- superblock_height = mi_size_high[mbmi->sb_type];
+ superblock_height = mi_size_high[mbmi->bsize];
if (mbmi->ref_frame[0] == ref_frame &&
mbmi->ref_frame[1] == NONE_FRAME) {
diff --git a/av1/common/obmc.h b/av1/common/obmc.h
index cc97b6b..b840345 100644
--- a/av1/common/obmc.h
+++ b/av1/common/obmc.h
@@ -35,7 +35,7 @@
above_mi_col += mi_step) {
MB_MODE_INFO **above_mi = prev_row_mi + above_mi_col;
mi_step =
- AOMMIN(mi_size_wide[above_mi[0]->sb_type], mi_size_wide[BLOCK_64X64]);
+ AOMMIN(mi_size_wide[above_mi[0]->bsize], mi_size_wide[BLOCK_64X64]);
// If we're considering a block with width 4, it should be treated as
// half of a pair of blocks with chroma information in the second. Move
// above_mi_col back to the start of the pair if needed, set above_mbmi
@@ -72,7 +72,7 @@
left_mi_row += mi_step) {
MB_MODE_INFO **left_mi = prev_col_mi + left_mi_row * xd->mi_stride;
mi_step =
- AOMMIN(mi_size_high[left_mi[0]->sb_type], mi_size_high[BLOCK_64X64]);
+ AOMMIN(mi_size_high[left_mi[0]->bsize], mi_size_high[BLOCK_64X64]);
if (mi_step == 1) {
left_mi_row &= ~1;
left_mi = prev_col_mi + (left_mi_row + 1) * xd->mi_stride;
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h
index c4275a6..12bcce8 100644
--- a/av1/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -340,7 +340,7 @@
const MB_MODE_INFO *mbmi = xd->mi[0];
const MB_MODE_INFO *const above_mbmi = xd->above_mbmi;
const MB_MODE_INFO *const left_mbmi = xd->left_mbmi;
- const TX_SIZE max_tx_size = max_txsize_rect_lookup[mbmi->sb_type];
+ const TX_SIZE max_tx_size = max_txsize_rect_lookup[mbmi->bsize];
const int max_tx_wide = tx_size_wide[max_tx_size];
const int max_tx_high = tx_size_high[max_tx_size];
const int has_above = xd->up_available;
@@ -351,11 +351,11 @@
if (has_above)
if (is_inter_block(above_mbmi))
- above = block_size_wide[above_mbmi->sb_type] >= max_tx_wide;
+ above = block_size_wide[above_mbmi->bsize] >= max_tx_wide;
if (has_left)
if (is_inter_block(left_mbmi))
- left = block_size_high[left_mbmi->sb_type] >= max_tx_high;
+ left = block_size_high[left_mbmi->bsize] >= max_tx_high;
if (has_above && has_left)
return (above + left);
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index 097c304..3b484d8 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -800,7 +800,7 @@
const AV1_COMMON *cm, MACROBLOCKD *xd, int plane, const MB_MODE_INFO *mi,
int mi_x, int mi_y, uint8_t **mc_buf,
CalcSubpelParamsFunc calc_subpel_params_func) {
- const BLOCK_SIZE bsize = mi->sb_type;
+ const BLOCK_SIZE bsize = mi->bsize;
struct macroblockd_plane *const pd = &xd->plane[plane];
const bool ss_x = pd->subsampling_x;
const bool ss_y = pd->subsampling_y;
@@ -880,7 +880,7 @@
is_global[ref] = is_global_mv_block(mi, wm->wmtype);
}
- const BLOCK_SIZE bsize = mi->sb_type;
+ const BLOCK_SIZE bsize = mi->bsize;
const int ss_x = pd->subsampling_x;
const int ss_y = pd->subsampling_y;
const int row_start =
@@ -916,7 +916,7 @@
av1_init_warp_params(&inter_pred_params, &warp_types, ref, xd, mi);
if (is_masked_compound_type(mi->interinter_comp.type)) {
- inter_pred_params.sb_type = mi->sb_type;
+ inter_pred_params.sb_type = mi->bsize;
inter_pred_params.mask_comp = mi->interinter_comp;
if (ref == 1) {
inter_pred_params.conv_params.do_average = 0;
@@ -937,7 +937,7 @@
int build_for_obmc, int bw, int bh, int mi_x,
int mi_y, uint8_t **mc_buf,
CalcSubpelParamsFunc calc_subpel_params_func) {
- if (is_sub8x8_inter(xd, plane, mi->sb_type, is_intrabc_block(mi),
+ if (is_sub8x8_inter(xd, plane, mi->bsize, is_intrabc_block(mi),
build_for_obmc)) {
assert(bw < 8 || bh < 8);
build_inter_predictors_sub8x8(cm, xd, plane, mi, mi_x, mi_y, mc_buf,
@@ -972,7 +972,7 @@
for (int i = 0; i < AOMMIN(num_planes, MAX_MB_PLANE); ++i) {
struct macroblockd_plane *const pd = &xd->plane[i];
const int is_uv = i > 0;
- setup_pred_plane(&pd->pre[idx], xd->mi[0]->sb_type, src->buffers[i],
+ setup_pred_plane(&pd->pre[idx], xd->mi[0]->bsize, src->buffers[i],
src->crop_widths[is_uv], src->crop_heights[is_uv],
src->strides[is_uv], mi_row, mi_col, sf,
pd->subsampling_x, pd->subsampling_y);
@@ -1036,7 +1036,7 @@
mbmi->overlappable_neighbors[0] = 0;
mbmi->overlappable_neighbors[1] = 0;
- if (!is_motion_variation_allowed_bsize(mbmi->sb_type)) return;
+ if (!is_motion_variation_allowed_bsize(mbmi->bsize)) return;
foreach_overlappable_nb_above(cm, xd, INT_MAX, increment_int_ptr,
&mbmi->overlappable_neighbors[0]);
@@ -1088,7 +1088,7 @@
(void)rel_mi_row;
(void)dir;
struct obmc_inter_pred_ctxt *ctxt = (struct obmc_inter_pred_ctxt *)fun_ctxt;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
const int overlap =
AOMMIN(block_size_high[bsize], block_size_high[BLOCK_64X64]) >> 1;
@@ -1127,7 +1127,7 @@
(void)rel_mi_col;
(void)dir;
struct obmc_inter_pred_ctxt *ctxt = (struct obmc_inter_pred_ctxt *)fun_ctxt;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
const int overlap =
AOMMIN(block_size_wide[bsize], block_size_wide[BLOCK_64X64]) >> 1;
@@ -1169,7 +1169,7 @@
int above_stride[MAX_MB_PLANE],
uint8_t *left[MAX_MB_PLANE],
int left_stride[MAX_MB_PLANE]) {
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
// handle above row
struct obmc_inter_pred_ctxt ctxt_above = { above, above_stride };
@@ -1216,7 +1216,7 @@
MACROBLOCKD *xd, int rel_mi_col, uint8_t above_mi_width,
MB_MODE_INFO *above_mbmi, struct build_prediction_ctxt *ctxt,
const int num_planes) {
- const BLOCK_SIZE a_bsize = AOMMAX(BLOCK_8X8, above_mbmi->sb_type);
+ const BLOCK_SIZE a_bsize = AOMMAX(BLOCK_8X8, above_mbmi->bsize);
const int above_mi_col = xd->mi_col + rel_mi_col;
av1_modify_neighbor_predictor_for_obmc(above_mbmi);
@@ -1255,7 +1255,7 @@
MB_MODE_INFO *left_mbmi,
struct build_prediction_ctxt *ctxt,
const int num_planes) {
- const BLOCK_SIZE l_bsize = AOMMAX(BLOCK_8X8, left_mbmi->sb_type);
+ const BLOCK_SIZE l_bsize = AOMMAX(BLOCK_8X8, left_mbmi->bsize);
const int left_mi_row = xd->mi_row + rel_mi_row;
av1_modify_neighbor_predictor_for_obmc(left_mbmi);
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index c3b4665..dd3f90a 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -1610,7 +1610,7 @@
const PARTITION_TYPE partition = mbmi->partition;
- BLOCK_SIZE bsize = mbmi->sb_type;
+ BLOCK_SIZE bsize = mbmi->bsize;
// force 4x4 chroma component block size.
if (ss_x || ss_y) {
bsize = scale_chroma_bsize(bsize, ss_x, ss_y);
@@ -1664,8 +1664,8 @@
if (plane != AOM_PLANE_Y && mbmi->uv_mode == UV_CFL_PRED) {
#if CONFIG_DEBUG
assert(is_cfl_allowed(xd));
- const BLOCK_SIZE plane_bsize = get_plane_block_size(
- mbmi->sb_type, pd->subsampling_x, pd->subsampling_y);
+ const BLOCK_SIZE plane_bsize =
+ get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
(void)plane_bsize;
assert(plane_bsize < BLOCK_SIZES_ALL);
if (!xd->lossless[mbmi->segment_id]) {
diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h
index 9d20356..333802f 100644
--- a/av1/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -69,7 +69,7 @@
const MB_MODE_INFO *mbmi) {
return mbmi->mode == DC_PRED &&
mbmi->palette_mode_info.palette_size[0] == 0 &&
- av1_filter_intra_allowed_bsize(cm, mbmi->sb_type);
+ av1_filter_intra_allowed_bsize(cm, mbmi->bsize);
}
extern const int8_t av1_filter_intra_taps[FILTER_INTRA_MODES][8][8];
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 6638c1d..754ce3c 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -225,7 +225,7 @@
}
}
if (plane == AOM_PLANE_Y && store_cfl_required(cm, xd)) {
- cfl_store_tx(xd, row, col, tx_size, mbmi->sb_type);
+ cfl_store_tx(xd, row, col, tx_size, mbmi->bsize);
}
}
@@ -276,7 +276,7 @@
MACROBLOCKD *const xd = &dcb->xd;
const struct macroblockd_plane *const pd = &xd->plane[plane];
const TX_SIZE plane_tx_size =
- plane ? av1_get_max_uv_txsize(mbmi->sb_type, pd->subsampling_x,
+ plane ? av1_get_max_uv_txsize(mbmi->bsize, pd->subsampling_x,
pd->subsampling_y)
: mbmi->inter_tx_size[av1_get_txb_size_index(plane_bsize, blk_row,
blk_col)];
@@ -328,7 +328,7 @@
const TileInfo *const tile = &xd->tile;
set_mi_offsets(mi_params, xd, mi_row, mi_col);
- xd->mi[0]->sb_type = bsize;
+ xd->mi[0]->bsize = bsize;
#if CONFIG_RD_DEBUG
xd->mi[0]->mi_row = mi_row;
xd->mi[0]->mi_col = mi_col;
@@ -698,7 +698,7 @@
mi_x = above_mi_col << MI_SIZE_LOG2;
mi_y = xd->mi_row << MI_SIZE_LOG2;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
for (int j = 0; j < num_planes; ++j) {
const struct macroblockd_plane *pd = &xd->plane[j];
@@ -728,7 +728,7 @@
struct build_prediction_ctxt ctxt = {
cm, tmp_buf, tmp_width, tmp_height, tmp_stride, xd->mb_to_right_edge, dcb
};
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
foreach_overlappable_nb_above(cm, xd,
max_neighbor_obmc[mi_size_wide_log2[bsize]],
dec_build_prediction_by_above_pred, &ctxt);
@@ -753,7 +753,7 @@
&backup_mbmi, ctxt, num_planes);
mi_x = xd->mi_col << MI_SIZE_LOG2;
mi_y = left_mi_row << MI_SIZE_LOG2;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
for (int j = 0; j < num_planes; ++j) {
const struct macroblockd_plane *pd = &xd->plane[j];
@@ -784,7 +784,7 @@
struct build_prediction_ctxt ctxt = {
cm, tmp_buf, tmp_width, tmp_height, tmp_stride, xd->mb_to_bottom_edge, dcb
};
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
foreach_overlappable_nb_left(cm, xd,
max_neighbor_obmc[mi_size_high_log2[bsize]],
dec_build_prediction_by_left_pred, &ctxt);
@@ -814,8 +814,8 @@
dst_stride2);
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
- av1_setup_dst_planes(xd->plane, xd->mi[0]->sb_type, &cm->cur_frame->buf,
- mi_row, mi_col, 0, num_planes);
+ av1_setup_dst_planes(xd->plane, xd->mi[0]->bsize, &cm->cur_frame->buf, mi_row,
+ mi_col, 0, num_planes);
av1_build_obmc_inter_prediction(cm, xd, dst_buf1, dst_stride1, dst_buf2,
dst_stride2);
}
@@ -824,7 +824,7 @@
MACROBLOCKD *const xd) {
MB_MODE_INFO *mbmi = xd->mi[0];
if (store_cfl_required(cm, xd)) {
- cfl_store_block(xd, mbmi->sb_type, mbmi->tx_size);
+ cfl_store_block(xd, mbmi->bsize, mbmi->tx_size);
}
}
@@ -879,7 +879,7 @@
(void)r;
Av1ColorMapParam params;
const MB_MODE_INFO *const mbmi = xd->mi[0];
- av1_get_block_dimensions(mbmi->sb_type, plane, xd, ¶ms.plane_width,
+ av1_get_block_dimensions(mbmi->bsize, plane, xd, ¶ms.plane_width,
¶ms.plane_height, NULL, NULL);
xd->color_index_map_offset[plane] += params.plane_width * params.plane_height;
}
@@ -1021,7 +1021,7 @@
aom_reader *r) {
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
int is_split = 0;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int max_blocks_high = max_block_high(xd, bsize, 0);
const int max_blocks_wide = max_block_wide(xd, bsize, 0);
if (blk_row >= max_blocks_high || blk_col >= max_blocks_wide) return;
@@ -1045,7 +1045,7 @@
const int ctx = txfm_partition_context(xd->above_txfm_context + blk_col,
xd->left_txfm_context + blk_row,
- mbmi->sb_type, tx_size);
+ mbmi->bsize, tx_size);
is_split = aom_read_symbol(r, ec_ctx->txfm_partition_cdf[ctx], 2, ACCT_STR);
if (is_split) {
@@ -1106,7 +1106,7 @@
aom_reader *r) {
// TODO(debargha): Clean up the logic here. This function should only
// be called for intra.
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
const int32_t tx_size_cat = bsize_to_tx_size_cat(bsize);
const int max_depths = bsize_to_max_depth(bsize);
const int ctx = get_tx_size_context(xd);
@@ -1121,7 +1121,7 @@
static TX_SIZE read_tx_size(const MACROBLOCKD *const xd, TX_MODE tx_mode,
int is_inter, int allow_select_inter,
aom_reader *r) {
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
if (xd->lossless[xd->mi[0]->segment_id]) return TX_4X4;
if (block_signals_txsize(bsize)) {
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 4880fcf..345eeee 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -84,7 +84,7 @@
static int read_delta_qindex(AV1_COMMON *cm, const MACROBLOCKD *xd,
aom_reader *r, MB_MODE_INFO *const mbmi) {
int sign, abs, reduced_delta_qindex = 0;
- BLOCK_SIZE bsize = mbmi->sb_type;
+ BLOCK_SIZE bsize = mbmi->bsize;
const int b_col = xd->mi_col & (cm->seq_params.mib_size - 1);
const int b_row = xd->mi_row & (cm->seq_params.mib_size - 1);
const int read_delta_q_flag = (b_col == 0 && b_row == 0);
@@ -116,7 +116,7 @@
const MB_MODE_INFO *const mbmi, int mi_col,
int mi_row) {
int reduced_delta_lflevel = 0;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int b_col = mi_col & (cm->seq_params.mib_size - 1);
const int b_row = mi_row & (cm->seq_params.mib_size - 1);
const int read_delta_lf_flag = (b_col == 0 && b_row == 0);
@@ -236,12 +236,11 @@
if (last_motion_mode_allowed == OBMC_CAUSAL) {
motion_mode =
- aom_read_symbol(r, xd->tile_ctx->obmc_cdf[mbmi->sb_type], 2, ACCT_STR);
+ aom_read_symbol(r, xd->tile_ctx->obmc_cdf[mbmi->bsize], 2, ACCT_STR);
return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
} else {
- motion_mode =
- aom_read_symbol(r, xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
- MOTION_MODES, ACCT_STR);
+ motion_mode = aom_read_symbol(r, xd->tile_ctx->motion_mode_cdf[mbmi->bsize],
+ MOTION_MODES, ACCT_STR);
return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
}
}
@@ -368,8 +367,8 @@
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
const int mi_offset = mi_row * mi_params->mi_cols + mi_col;
- const int bw = mi_size_wide[mbmi->sb_type];
- const int bh = mi_size_high[mbmi->sb_type];
+ const int bw = mi_size_wide[mbmi->bsize];
+ const int bh = mi_size_high[mbmi->bsize];
// TODO(slavarnway): move x_mis, y_mis into xd ?????
const int x_mis = AOMMIN(mi_params->mi_cols - mi_col, bw);
@@ -423,7 +422,7 @@
return 0;
}
- if (!is_comp_ref_allowed(xd->mi[0]->sb_type)) return 0;
+ if (!is_comp_ref_allowed(xd->mi[0]->bsize)) return 0;
if (segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME) ||
segfeature_active(&cm->seg, segment_id, SEG_LVL_GLOBALMV)) {
@@ -565,7 +564,7 @@
aom_reader *r) {
const int num_planes = av1_num_planes(cm);
MB_MODE_INFO *const mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(av1_allow_palette(cm->features.allow_screen_content_tools, bsize));
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
const int bsize_ctx = av1_get_palette_bsize_ctx(bsize);
@@ -610,7 +609,7 @@
if (av1_filter_intra_allowed(cm, mbmi)) {
filter_intra_mode_info->use_filter_intra = aom_read_symbol(
- r, xd->tile_ctx->filter_intra_cdfs[mbmi->sb_type], 2, ACCT_STR);
+ r, xd->tile_ctx->filter_intra_cdfs[mbmi->bsize], 2, ACCT_STR);
if (filter_intra_mode_info->use_filter_intra) {
filter_intra_mode_info->filter_intra_mode = aom_read_symbol(
r, xd->tile_ctx->filter_intra_mode_cdf, FILTER_INTRA_MODES, ACCT_STR);
@@ -694,7 +693,7 @@
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
mbmi->use_intrabc = aom_read_symbol(r, ec_ctx->intrabc_cdf, 2, ACCT_STR);
if (mbmi->use_intrabc) {
- BLOCK_SIZE bsize = mbmi->sb_type;
+ BLOCK_SIZE bsize = mbmi->bsize;
mbmi->mode = DC_PRED;
mbmi->uv_mode = UV_DC_PRED;
mbmi->interp_filters = av1_broadcast_interp_filter(BILINEAR);
@@ -773,7 +772,7 @@
MB_MODE_INFO *const mbmi = xd->mi[0];
const MB_MODE_INFO *above_mi = xd->above_mbmi;
const MB_MODE_INFO *left_mi = xd->left_mbmi;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
struct segmentation *const seg = &cm->seg;
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
@@ -901,7 +900,7 @@
static REFERENCE_MODE read_block_reference_mode(AV1_COMMON *cm,
const MACROBLOCKD *xd,
aom_reader *r) {
- if (!is_comp_ref_allowed(xd->mi[0]->sb_type)) return SINGLE_REFERENCE;
+ if (!is_comp_ref_allowed(xd->mi[0]->bsize)) return SINGLE_REFERENCE;
if (cm->current_frame.reference_mode == REFERENCE_MODE_SELECT) {
const int ctx = av1_get_reference_mode_context(xd);
const REFERENCE_MODE mode = (REFERENCE_MODE)aom_read_symbol(
@@ -1063,7 +1062,7 @@
MACROBLOCKD *const xd,
MB_MODE_INFO *const mbmi,
aom_reader *r) {
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int use_angle_delta = av1_use_angle_delta(bsize);
mbmi->ref_frame[0] = INTRA_FRAME;
@@ -1116,7 +1115,7 @@
aom_reader *r) {
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
MB_MODE_INFO *mbmi = xd->mi[0];
- BLOCK_SIZE bsize = mbmi->sb_type;
+ BLOCK_SIZE bsize = mbmi->bsize;
FeatureFlags *const features = &cm->features;
if (features->cur_frame_force_integer_mv) {
allow_hp = MV_SUBPEL_NONE;
@@ -1271,7 +1270,7 @@
aom_reader *r) {
AV1_COMMON *const cm = &pbi->common;
FeatureFlags *const features = &cm->features;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int allow_hp = features->allow_high_precision_mv;
int_mv nearestmv[2], nearmv[2];
int_mv ref_mvs[MODE_CTX_REF_FRAMES][MAX_MV_REF_CANDIDATES] = { { { 0 } } };
@@ -1407,7 +1406,7 @@
}
mbmi->motion_mode = SIMPLE_TRANSLATION;
- if (is_motion_variation_allowed_bsize(mbmi->sb_type) && !mbmi->skip_mode &&
+ if (is_motion_variation_allowed_bsize(mbmi->bsize) && !mbmi->skip_mode &&
!has_second_ref(mbmi)) {
mbmi->num_proj_ref = av1_findSamples(cm, xd, pts, pts_inref);
}
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index c3a56b8..0ec1487 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -141,7 +141,7 @@
#if CONFIG_INSPECTION
if (plane == 0) {
const int txk_type_idx =
- av1_get_txk_type_index(mbmi->sb_type, blk_row, blk_col);
+ av1_get_txk_type_index(mbmi->bsize, blk_row, blk_col);
mbmi->tx_skip[txk_type_idx] = all_zero;
}
#endif
@@ -333,7 +333,7 @@
MB_MODE_INFO *const mbmi = xd->mi[0];
struct macroblockd_plane *const pd = &xd->plane[plane];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(bsize < BLOCK_SIZES_ALL);
const BLOCK_SIZE plane_bsize =
get_plane_block_size(bsize, pd->subsampling_x, pd->subsampling_y);
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 9d54bd1..3c6a006 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -72,7 +72,7 @@
: xd->tile_ctx->palette_y_color_index_cdf;
const MB_MODE_INFO *const mbmi = xd->mi[0];
params.n_colors = mbmi->palette_mode_info.palette_size[plane];
- av1_get_block_dimensions(mbmi->sb_type, plane, xd, ¶ms.plane_width,
+ av1_get_block_dimensions(mbmi->bsize, plane, xd, ¶ms.plane_width,
¶ms.plane_height, ¶ms.rows, ¶ms.cols);
decode_color_map_tokens(¶ms, r);
}
diff --git a/av1/decoder/inspection.c b/av1/decoder/inspection.c
index ad5dba1..b706c45 100644
--- a/av1/decoder/inspection.c
+++ b/av1/decoder/inspection.c
@@ -99,7 +99,7 @@
mi->compound_type = mbmi->interinter_comp.type;
// Block Size
- mi->sb_type = mbmi->sb_type;
+ mi->bsize = mbmi->bsize;
// Skip Flag
mi->skip = mbmi->skip_txfm;
mi->filter[0] = av1_extract_interp_filter(mbmi->interp_filters, 0);
@@ -109,7 +109,7 @@
// Transform
// TODO(anyone): extract tx type info from mbmi->txk_type[].
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int c = i % mi_size_wide[bsize];
const int r = j % mi_size_high[bsize];
if (is_inter_block(mbmi) || is_intrabc_block(mbmi))
diff --git a/av1/decoder/inspection.h b/av1/decoder/inspection.h
index b963f6a..70b1c80 100644
--- a/av1/decoder/inspection.h
+++ b/av1/decoder/inspection.h
@@ -38,7 +38,7 @@
int16_t ref_frame[2];
int16_t mode;
int16_t uv_mode;
- int16_t sb_type;
+ int16_t bsize;
int16_t skip;
int16_t segment_id;
int16_t dual_filter_type;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index e4db615..6c29bd9 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -145,8 +145,8 @@
int blk_row, int blk_col,
aom_writer *w) {
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
- const int max_blocks_high = max_block_high(xd, mbmi->sb_type, 0);
- const int max_blocks_wide = max_block_wide(xd, mbmi->sb_type, 0);
+ const int max_blocks_high = max_block_high(xd, mbmi->bsize, 0);
+ const int max_blocks_wide = max_block_wide(xd, mbmi->bsize, 0);
if (blk_row >= max_blocks_high || blk_col >= max_blocks_wide) return;
@@ -158,9 +158,9 @@
const int ctx = txfm_partition_context(xd->above_txfm_context + blk_col,
xd->left_txfm_context + blk_row,
- mbmi->sb_type, tx_size);
+ mbmi->bsize, tx_size);
const int txb_size_index =
- av1_get_txb_size_index(mbmi->sb_type, blk_row, blk_col);
+ av1_get_txb_size_index(mbmi->bsize, blk_row, blk_col);
const int write_txfm_partition =
tx_size == mbmi->inter_tx_size[txb_size_index];
if (write_txfm_partition) {
@@ -195,7 +195,7 @@
static AOM_INLINE void write_selected_tx_size(const MACROBLOCKD *xd,
aom_writer *w) {
const MB_MODE_INFO *const mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
if (block_signals_txsize(bsize)) {
const TX_SIZE tx_size = mbmi->tx_size;
@@ -234,7 +234,7 @@
return 0;
}
const int skip_mode = mi->skip_mode;
- if (!is_comp_ref_allowed(mi->sb_type)) {
+ if (!is_comp_ref_allowed(mi->bsize)) {
assert(!skip_mode);
return 0;
}
@@ -278,11 +278,11 @@
case SIMPLE_TRANSLATION: break;
case OBMC_CAUSAL:
aom_write_symbol(w, mbmi->motion_mode == OBMC_CAUSAL,
- xd->tile_ctx->obmc_cdf[mbmi->sb_type], 2);
+ xd->tile_ctx->obmc_cdf[mbmi->bsize], 2);
break;
default:
aom_write_symbol(w, mbmi->motion_mode,
- xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
+ xd->tile_ctx->motion_mode_cdf[mbmi->bsize],
MOTION_MODES);
}
}
@@ -364,7 +364,7 @@
const struct macroblockd_plane *const pd = &xd->plane[plane];
const TX_SIZE plane_tx_size =
- plane ? av1_get_max_uv_txsize(mbmi->sb_type, pd->subsampling_x,
+ plane ? av1_get_max_uv_txsize(mbmi->bsize, pd->subsampling_x,
pd->subsampling_y)
: mbmi->inter_tx_size[av1_get_txb_size_index(plane_bsize, blk_row,
blk_col)];
@@ -460,9 +460,9 @@
// changing from lossless to lossy.
assert(is_inter_block(mbmi) || !cpi->enc_seg.has_lossless_segment);
- set_spatial_segment_id(&cm->mi_params, cm->cur_frame->seg_map,
- mbmi->sb_type, mi_row, mi_col, pred);
- set_spatial_segment_id(&cm->mi_params, cpi->enc_seg.map, mbmi->sb_type,
+ set_spatial_segment_id(&cm->mi_params, cm->cur_frame->seg_map, mbmi->bsize,
+ mi_row, mi_col, pred);
+ set_spatial_segment_id(&cm->mi_params, cpi->enc_seg.map, mbmi->bsize,
mi_row, mi_col, pred);
/* mbmi is read only but we need to update segment_id */
((MB_MODE_INFO *)mbmi)->segment_id = pred;
@@ -473,7 +473,7 @@
av1_neg_interleave(mbmi->segment_id, pred, seg->last_active_segid + 1);
aom_cdf_prob *pred_cdf = segp->spatial_pred_seg_cdf[cdf_num];
aom_write_symbol(w, coded_id, pred_cdf, MAX_SEGMENTS);
- set_spatial_segment_id(&cm->mi_params, cm->cur_frame->seg_map, mbmi->sb_type,
+ set_spatial_segment_id(&cm->mi_params, cm->cur_frame->seg_map, mbmi->bsize,
mi_row, mi_col, mbmi->segment_id);
}
@@ -501,7 +501,7 @@
// does the feature use compound prediction or not
// (if not specified at the frame/segment level)
if (cm->current_frame.reference_mode == REFERENCE_MODE_SELECT) {
- if (is_comp_ref_allowed(mbmi->sb_type))
+ if (is_comp_ref_allowed(mbmi->bsize))
aom_write_symbol(w, is_compound, av1_get_reference_mode_cdf(xd), 2);
} else {
assert((!is_compound) ==
@@ -590,7 +590,7 @@
aom_writer *w) {
if (av1_filter_intra_allowed(cm, mbmi)) {
aom_write_symbol(w, mbmi->filter_intra_mode_info.use_filter_intra,
- xd->tile_ctx->filter_intra_cdfs[mbmi->sb_type], 2);
+ xd->tile_ctx->filter_intra_cdfs[mbmi->bsize], 2);
if (mbmi->filter_intra_mode_info.use_filter_intra) {
const FILTER_INTRA_MODE mode =
mbmi->filter_intra_mode_info.filter_intra_mode;
@@ -756,7 +756,7 @@
const MB_MODE_INFO *const mbmi,
aom_writer *w) {
const int num_planes = av1_num_planes(cm);
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(av1_allow_palette(cm->features.allow_screen_content_tools, bsize));
const PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
const int bsize_ctx = av1_get_palette_bsize_ctx(bsize);
@@ -931,7 +931,7 @@
}
if (pred_flag) {
set_spatial_segment_id(&cm->mi_params, cm->cur_frame->seg_map,
- mbmi->sb_type, mi_row, mi_col, mbmi->segment_id);
+ mbmi->bsize, mi_row, mi_col, mbmi->segment_id);
}
} else {
write_segment_id(cpi, mbmi, w, seg, segp, 0);
@@ -950,7 +950,7 @@
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;
const MB_MODE_INFO *const mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int super_block_upper_left =
((xd->mi_row & (cm->seq_params.mib_size - 1)) == 0) &&
((xd->mi_col & (cm->seq_params.mib_size - 1)) == 0);
@@ -995,7 +995,7 @@
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
const MB_MODE_INFO *const mbmi = xd->mi[0];
const PREDICTION_MODE mode = mbmi->mode;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
// Y mode.
if (is_keyframe) {
@@ -1087,7 +1087,7 @@
const MB_MODE_INFO_EXT_FRAME *const mbmi_ext_frame = x->mbmi_ext_frame;
const PREDICTION_MODE mode = mbmi->mode;
const int segment_id = mbmi->segment_id;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int allow_hp = cm->features.allow_high_precision_mv;
const int is_inter = is_inter_block(mbmi);
const int is_compound = has_second_ref(mbmi);
@@ -1281,7 +1281,7 @@
static AOM_INLINE void dump_mode_info(MB_MODE_INFO *mi) {
printf("\nmi->mi_row == %d\n", mi->mi_row);
printf("&& mi->mi_col == %d\n", mi->mi_col);
- printf("&& mi->sb_type == %d\n", mi->sb_type);
+ printf("&& mi->bsize == %d\n", mi->bsize);
printf("&& mi->tx_size == %d\n", mi->tx_size);
printf("&& mi->mode == %d\n", mi->mode);
}
@@ -1327,7 +1327,7 @@
#define FRAME_TO_CHECK 11
if (cm->current_frame.frame_number == FRAME_TO_CHECK &&
cm->show_frame == 1) {
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
int_mv mv[2] = { 0 };
const int is_comp_ref = has_second_ref(mbmi);
@@ -1398,7 +1398,7 @@
const int plane) {
MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(bsize < BLOCK_SIZES_ALL);
const int ss_x = pd->subsampling_x;
const int ss_y = pd->subsampling_y;
@@ -1434,7 +1434,7 @@
MACROBLOCK *const x = &cpi->td.mb;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(!mbmi->skip_txfm);
@@ -1471,7 +1471,7 @@
}
#if CONFIG_RD_DEBUG
for (int plane = 0; plane < num_planes; ++plane) {
- if (mbmi->sb_type >= BLOCK_8X8 &&
+ if (mbmi->bsize >= BLOCK_8X8 &&
rd_token_stats_mismatch(&mbmi->rd_stats, &token_stats, plane)) {
dump_mode_info(mbmi);
assert(0);
@@ -1498,7 +1498,7 @@
xd->tx_type_map_stride = mi_params->mi_stride;
const MB_MODE_INFO *mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
assert(bsize <= cm->seq_params.sb_size ||
(bsize >= BLOCK_SIZES && bsize < BLOCK_SIZES_ALL));
@@ -1520,10 +1520,10 @@
if (palette_size_plane > 0) {
assert(mbmi->use_intrabc == 0);
assert(av1_allow_palette(cm->features.allow_screen_content_tools,
- mbmi->sb_type));
+ mbmi->bsize));
assert(!plane || xd->is_chroma_ref);
int rows, cols;
- av1_get_block_dimensions(mbmi->sb_type, plane, xd, NULL, NULL, &rows,
+ av1_get_block_dimensions(mbmi->bsize, plane, xd, NULL, NULL, &rows,
&cols);
assert(*tok < tok_end);
pack_map_tokens(w, tok, palette_size_plane, rows * cols);
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 76fbaac..9f7b2a9 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -1167,7 +1167,7 @@
static INLINE int is_rect_tx_allowed(const MACROBLOCKD *xd,
const MB_MODE_INFO *mbmi) {
- return is_rect_tx_allowed_bsize(mbmi->sb_type) &&
+ return is_rect_tx_allowed_bsize(mbmi->bsize) &&
!xd->lossless[mbmi->segment_id];
}
diff --git a/av1/encoder/compound_type.c b/av1/encoder/compound_type.c
index a317fc8..1f693c7 100644
--- a/av1/encoder/compound_type.c
+++ b/av1/encoder/compound_type.c
@@ -1027,10 +1027,10 @@
const COMPOUND_TYPE compound_type = mbmi->interinter_comp.type;
// This function will be called only for COMPOUND_WEDGE and COMPOUND_DIFFWTD
if (compound_type == COMPOUND_WEDGE) {
- return av1_is_wedge_used(mbmi->sb_type)
+ return av1_is_wedge_used(mbmi->bsize)
? av1_cost_literal(1) +
mode_costs
- ->wedge_idx_cost[mbmi->sb_type]
+ ->wedge_idx_cost[mbmi->bsize]
[mbmi->interinter_comp.wedge_index]
: 0;
} else {
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 23a9cc1..bbae592 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -129,9 +129,9 @@
if (xd->lossless[mbmi->segment_id]) {
mbmi->tx_size = TX_4X4;
} else if (tx_mode != TX_MODE_SELECT) {
- mbmi->tx_size = tx_size_from_tx_mode(mbmi->sb_type, tx_mode);
+ mbmi->tx_size = tx_size_from_tx_mode(mbmi->bsize, tx_mode);
} else {
- BLOCK_SIZE bsize = mbmi->sb_type;
+ BLOCK_SIZE bsize = mbmi->bsize;
TX_SIZE min_tx_size = depth_to_tx_size(MAX_TX_DEPTH, bsize);
mbmi->tx_size = (TX_SIZE)TXSIZEMAX(mbmi->tx_size, min_tx_size);
}
@@ -139,8 +139,8 @@
memset(mbmi->inter_tx_size, mbmi->tx_size, sizeof(mbmi->inter_tx_size));
}
const int stride = xd->tx_type_map_stride;
- const int bw = mi_size_wide[mbmi->sb_type];
- for (int row = 0; row < mi_size_high[mbmi->sb_type]; ++row) {
+ const int bw = mi_size_wide[mbmi->bsize];
+ for (int row = 0; row < mi_size_high[mbmi->bsize]; ++row) {
memset(xd->tx_type_map + row * stride, DCT_DCT,
bw * sizeof(xd->tx_type_map[0]));
}
@@ -179,14 +179,14 @@
MB_MODE_INFO *const mi_addr = xd->mi[0];
const struct segmentation *const seg = &cm->seg;
assert(bsize < BLOCK_SIZES_ALL);
- const int bw = mi_size_wide[mi->sb_type];
- const int bh = mi_size_high[mi->sb_type];
+ const int bw = mi_size_wide[mi->bsize];
+ const int bh = mi_size_high[mi->bsize];
const int mis = mi_params->mi_stride;
const int mi_width = mi_size_wide[bsize];
const int mi_height = mi_size_high[bsize];
TxfmSearchInfo *txfm_info = &x->txfm_search_info;
- assert(mi->sb_type == bsize);
+ assert(mi->bsize == bsize);
*mi_addr = *mi;
copy_mbmi_ext_frame_to_mbmi_ext(x->mbmi_ext, &ctx->mbmi_ext_best,
@@ -351,7 +351,7 @@
static void update_palette_cdf(MACROBLOCKD *xd, const MB_MODE_INFO *const mbmi,
FRAME_COUNTS *counts) {
FRAME_CONTEXT *fc = xd->tile_ctx;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
const int palette_bsize_ctx = av1_get_palette_bsize_ctx(bsize);
@@ -401,7 +401,7 @@
FRAME_CONTEXT *fc = xd->tile_ctx;
const PREDICTION_MODE y_mode = mbmi->mode;
(void)counts;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
if (intraonly) {
#if CONFIG_ENTROPY_STATS
@@ -423,13 +423,13 @@
const int use_filter_intra_mode =
mbmi->filter_intra_mode_info.use_filter_intra;
#if CONFIG_ENTROPY_STATS
- ++counts->filter_intra[mbmi->sb_type][use_filter_intra_mode];
+ ++counts->filter_intra[mbmi->bsize][use_filter_intra_mode];
if (use_filter_intra_mode) {
++counts
->filter_intra_mode[mbmi->filter_intra_mode_info.filter_intra_mode];
}
#endif // CONFIG_ENTROPY_STATS
- update_cdf(fc->filter_intra_cdfs[mbmi->sb_type], use_filter_intra_mode, 2);
+ update_cdf(fc->filter_intra_cdfs[mbmi->bsize], use_filter_intra_mode, 2);
if (use_filter_intra_mode) {
update_cdf(fc->filter_intra_mode_cdf,
mbmi->filter_intra_mode_info.filter_intra_mode,
@@ -574,7 +574,7 @@
const int grid_index = get_mi_grid_idx(&cm->mi_params, r, c);
const int mi_index = get_alloc_mi_idx(&cm->mi_params, r, c);
mib[grid_index] = mi + mi_index;
- mib[grid_index]->sb_type = find_partition_size(
+ mib[grid_index]->bsize = find_partition_size(
bsize, mi_rows_remaining - r, mi_cols_remaining - c, &bh, &bw);
}
}
@@ -611,7 +611,7 @@
const int grid_index = get_mi_grid_idx(mi_params, block_row, block_col);
const int mi_index = get_alloc_mi_idx(mi_params, block_row, block_col);
mib[grid_index] = mi_upper_left + mi_index;
- mib[grid_index]->sb_type = bsize;
+ mib[grid_index]->bsize = bsize;
}
}
} else {
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index ae7a83f..3afbc7a 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -479,7 +479,7 @@
if (blk_row >= max_blocks_high || blk_col >= max_blocks_wide) return;
const TX_SIZE plane_tx_size =
- plane ? av1_get_max_uv_txsize(mbmi->sb_type, pd->subsampling_x,
+ plane ? av1_get_max_uv_txsize(mbmi->bsize, pd->subsampling_x,
pd->subsampling_y)
: mbmi->inter_tx_size[av1_get_txb_size_index(plane_bsize, blk_row,
blk_col)];
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 9209159..42c8a64 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -71,8 +71,7 @@
const int idx_str = cm->mi_params.mi_stride * mi_row + mi_col;
MB_MODE_INFO **mi = cm->mi_params.mi_grid_base + idx_str;
MB_MODE_INFO *mbmi = mi[0];
- if (mbmi->skip_txfm == 1 &&
- (mbmi->sb_type == cm->seq_params.sb_size)) {
+ if (mbmi->skip_txfm == 1 && (mbmi->bsize == cm->seq_params.sb_size)) {
for (int lf_id = 0; lf_id < frame_lf_count; ++lf_id)
mbmi->delta_lf[lf_id] = xd->delta_lf[lf_id];
mbmi->delta_lf_from_base = xd->delta_lf_from_base;
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 9eb0309..24cb6c4 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -219,7 +219,7 @@
MACROBLOCKD *const xd = &x->e_mbd;
FULLPEL_MV start_mv = get_fullmv_from_mv(ref_mv);
int tmp_err;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
const int new_mv_mode_penalty = NEW_MV_MODE_PENALTY;
const int sr = get_search_range(&cpi->initial_dimensions);
const int step_param = 3 + sr;
@@ -346,7 +346,7 @@
xd->plane[1].dst.buf = this_frame->u_buffer + uv_offset;
xd->plane[2].dst.buf = this_frame->v_buffer + uv_offset;
xd->left_available = (mb_col != 0);
- xd->mi[0]->sb_type = bsize;
+ xd->mi[0]->bsize = bsize;
xd->mi[0]->ref_frame[0] = INTRA_FRAME;
set_mi_row_col(xd, tile, mb_row * mb_scale, mi_size_high[bsize],
mb_col * mb_scale, mi_size_wide[bsize], mi_params->mi_rows,
@@ -1104,7 +1104,7 @@
aom_clear_system_state();
set_mi_offsets(mi_params, xd, 0, 0);
- xd->mi[0]->sb_type = fp_block_size;
+ xd->mi[0]->bsize = fp_block_size;
// Do not use periodic key frames.
cpi->rc.frames_to_key = INT_MAX;
diff --git a/av1/encoder/intra_mode_search.c b/av1/encoder/intra_mode_search.c
index 5845b7e..a267943 100644
--- a/av1/encoder/intra_mode_search.c
+++ b/av1/encoder/intra_mode_search.c
@@ -298,7 +298,7 @@
const MACROBLOCKD_PLANE *pd = &xd->plane[AOM_PLANE_U];
const ModeCosts *mode_costs = &x->mode_costs;
const BLOCK_SIZE plane_bsize =
- get_plane_block_size(mbmi->sb_type, pd->subsampling_x, pd->subsampling_y);
+ get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
assert(is_cfl_allowed(xd) && cpi->oxcf.intra_mode_cfg.enable_cfl_intra);
assert(plane_bsize < BLOCK_SIZES_ALL);
@@ -445,7 +445,7 @@
// this function everytime we search through uv modes. There is some
// potential speed up here if we cache the result to avoid redundant
// computation.
- av1_encode_intra_block_plane(cpi, x, mbmi->sb_type, AOM_PLANE_Y,
+ av1_encode_intra_block_plane(cpi, x, mbmi->bsize, AOM_PLANE_Y,
DRY_RUN_NORMAL,
cpi->optimize_seg_arr[mbmi->segment_id]);
xd->cfl.store_y = 0;
@@ -479,7 +479,7 @@
}
mbmi->angle_delta[PLANE_TYPE_UV] = 0;
- if (is_directional_mode && av1_use_angle_delta(mbmi->sb_type) &&
+ if (is_directional_mode && av1_use_angle_delta(mbmi->bsize) &&
intra_mode_cfg->enable_angle_delta) {
// Search through angle delta
const int rate_overhead =
@@ -521,7 +521,7 @@
const int try_palette =
cpi->oxcf.tool_cfg.enable_palette &&
av1_allow_palette(cpi->common.features.allow_screen_content_tools,
- mbmi->sb_type);
+ mbmi->bsize);
if (try_palette) {
uint8_t *best_palette_color_map = x->palette_buffer->best_palette_color_map;
av1_rd_pick_palette_intra_sbuv(
@@ -655,7 +655,7 @@
av1_pick_uniform_tx_size_type_yrd(cpi, x, &rd_stats, bsize, INT64_MAX);
if (rd_stats.rate == INT_MAX) return 0;
int this_rate_tokenonly = rd_stats.rate;
- if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->sb_type)) {
+ if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->bsize)) {
// av1_pick_uniform_tx_size_type_yrd above includes the cost of the tx_size
// in the tokenonly rate, but for intra blocks, tx_size is always coded
// (prediction granularity), so we account for it in the full rate,
@@ -908,8 +908,7 @@
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
const int try_palette =
cpi->oxcf.tool_cfg.enable_palette &&
- av1_allow_palette(cm->features.allow_screen_content_tools,
- mbmi->sb_type);
+ av1_allow_palette(cm->features.allow_screen_content_tools, mbmi->bsize);
if (intra_search_state->rate_uv_intra == INT_MAX) {
// If no good uv-predictor had been found, search for it.
const int rate_y = rd_stats_y->skip_txfm
@@ -1024,7 +1023,7 @@
const int try_palette =
cpi->oxcf.tool_cfg.enable_palette &&
av1_allow_palette(cpi->common.features.allow_screen_content_tools,
- mbmi->sb_type);
+ mbmi->bsize);
uint8_t *best_palette_color_map =
try_palette ? x->palette_buffer->best_palette_color_map : NULL;
const MB_MODE_INFO *above_mi = xd->above_mbmi;
@@ -1094,8 +1093,7 @@
if (this_rate_tokenonly == INT_MAX) continue;
- if (!xd->lossless[mbmi->segment_id] &&
- block_signals_txsize(mbmi->sb_type)) {
+ if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->bsize)) {
// av1_pick_uniform_tx_size_type_yrd above includes the cost of the
// tx_size in the tokenonly rate, but for intra blocks, tx_size is always
// coded (prediction granularity), so we account for it in the full rate,
diff --git a/av1/encoder/intra_mode_search_utils.h b/av1/encoder/intra_mode_search_utils.h
index e7f7189..f901130 100644
--- a/av1/encoder/intra_mode_search_utils.h
+++ b/av1/encoder/intra_mode_search_utils.h
@@ -252,7 +252,7 @@
assert(((mbmi->mode != DC_PRED) + use_palette + use_intrabc +
use_filter_intra) <= 1);
const int try_palette = av1_allow_palette(
- cpi->common.features.allow_screen_content_tools, mbmi->sb_type);
+ cpi->common.features.allow_screen_content_tools, mbmi->bsize);
if (try_palette && mbmi->mode == DC_PRED) {
const MACROBLOCKD *xd = &x->e_mbd;
const int bsize_ctx = av1_get_palette_bsize_ctx(bsize);
@@ -280,8 +280,7 @@
}
}
if (av1_filter_intra_allowed(&cpi->common, mbmi)) {
- total_rate +=
- mode_costs->filter_intra_cost[mbmi->sb_type][use_filter_intra];
+ total_rate += mode_costs->filter_intra_cost[mbmi->bsize][use_filter_intra];
if (use_filter_intra) {
total_rate +=
mode_costs->filter_intra_mode_cost[mbmi->filter_intra_mode_info
@@ -317,7 +316,7 @@
assert(((mode != UV_DC_PRED) + use_palette + mbmi->use_intrabc) <= 1);
const int try_palette = av1_allow_palette(
- cpi->common.features.allow_screen_content_tools, mbmi->sb_type);
+ cpi->common.features.allow_screen_content_tools, mbmi->bsize);
if (try_palette && mode == UV_DC_PRED) {
const PALETTE_MODE_INFO *pmi = &mbmi->palette_mode_info;
total_rate +=
@@ -389,13 +388,13 @@
mbmi->angle_delta[PLANE_TYPE_Y]];
}
if (mbmi->mode == DC_PRED &&
- av1_filter_intra_allowed_bsize(cm, mbmi->sb_type)) {
+ av1_filter_intra_allowed_bsize(cm, mbmi->bsize)) {
if (mbmi->filter_intra_mode_info.use_filter_intra) {
const int mode = mbmi->filter_intra_mode_info.filter_intra_mode;
- mode_cost += mode_costs->filter_intra_cost[mbmi->sb_type][1] +
+ mode_cost += mode_costs->filter_intra_cost[mbmi->bsize][1] +
mode_costs->filter_intra_mode_cost[mode];
} else {
- mode_cost += mode_costs->filter_intra_cost[mbmi->sb_type][0];
+ mode_cost += mode_costs->filter_intra_cost[mbmi->bsize][0];
}
}
this_rd =
diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index dcb12e5..cd914f7 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -672,7 +672,7 @@
// NOTE: which values: 0 - 0 only, 1 - 1 only, 2 - both
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO *mbmi = xd->mi[0];
- BLOCK_SIZE sb_type = mbmi->sb_type;
+ BLOCK_SIZE sb_type = mbmi->bsize;
const uint8_t *mask;
const int mask_stride = block_size_wide[bsize];
@@ -730,7 +730,7 @@
set_offsets_for_motion_search(cpi, x, mi_row, mi_col, bsize);
MB_MODE_INFO *mbmi = xd->mi[0];
- mbmi->sb_type = bsize;
+ mbmi->bsize = bsize;
mbmi->ref_frame[0] = ref;
mbmi->ref_frame[1] = NONE_FRAME;
mbmi->motion_mode = SIMPLE_TRANSLATION;
diff --git a/av1/encoder/mv_prec.c b/av1/encoder/mv_prec.c
index 8fcbde9..cc81d72 100644
--- a/av1/encoder/mv_prec.c
+++ b/av1/encoder/mv_prec.c
@@ -224,7 +224,7 @@
}
// Add texture information
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int num_rows = block_size_high[bsize];
const int num_cols = block_size_wide[bsize];
const int y_stride = cpi->source->y_stride;
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index b8c6715..199cb0d 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -2003,7 +2003,7 @@
av1_invalid_rd_stats(&best_rdc);
av1_invalid_rd_stats(&this_rdc);
av1_invalid_rd_stats(rd_cost);
- mi->sb_type = bsize;
+ mi->bsize = bsize;
mi->ref_frame[0] = NONE_FRAME;
mi->ref_frame[1] = NONE_FRAME;
diff --git a/av1/encoder/palette.c b/av1/encoder/palette.c
index dd54a8a..e00e8c1 100644
--- a/av1/encoder/palette.c
+++ b/av1/encoder/palette.c
@@ -261,7 +261,7 @@
if (tokenonly_rd_stats.rate == INT_MAX) return;
int this_rate = tokenonly_rd_stats.rate + palette_mode_cost;
int64_t this_rd = RDCOST(x->rdmult, this_rate, tokenonly_rd_stats.dist);
- if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->sb_type)) {
+ if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->bsize)) {
tokenonly_rd_stats.rate -= tx_size_cost(x, bsize, mbmi->tx_size);
}
// Collect mode stats for multiwinner mode processing
@@ -629,9 +629,9 @@
MB_MODE_INFO *const mbmi = xd->mi[0];
assert(!is_inter_block(mbmi));
assert(av1_allow_palette(cpi->common.features.allow_screen_content_tools,
- mbmi->sb_type));
+ mbmi->bsize));
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const SequenceHeader *const seq_params = &cpi->common.seq_params;
int this_rate;
int64_t this_rd;
@@ -773,7 +773,7 @@
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = xd->mi[0];
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
int src_stride = x->plane[1].src.stride;
const uint8_t *const src_u = x->plane[1].src.buf;
const uint8_t *const src_v = x->plane[2].src.buf;
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index 21e6f6d..95de618 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -37,12 +37,12 @@
int blk_row, int blk_col,
uint8_t allow_update_cdf) {
MB_MODE_INFO *mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int max_blocks_high = max_block_high(xd, bsize, 0);
const int max_blocks_wide = max_block_wide(xd, bsize, 0);
int ctx = txfm_partition_context(xd->above_txfm_context + blk_col,
- xd->left_txfm_context + blk_row,
- mbmi->sb_type, tx_size);
+ xd->left_txfm_context + blk_row, mbmi->bsize,
+ tx_size);
const int txb_size_index = av1_get_txb_size_index(bsize, blk_row, blk_col);
const TX_SIZE plane_tx_size = mbmi->inter_tx_size[txb_size_index];
@@ -125,7 +125,7 @@
static void set_txfm_context(MACROBLOCKD *xd, TX_SIZE tx_size, int blk_row,
int blk_col) {
MB_MODE_INFO *mbmi = xd->mi[0];
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
const int max_blocks_high = max_block_high(xd, bsize, 0);
const int max_blocks_wide = max_block_wide(xd, bsize, 0);
const int txb_size_index = av1_get_txb_size_index(bsize, blk_row, blk_col);
@@ -312,7 +312,7 @@
if (!dry_run) {
if (av1_allow_intrabc(cm) && is_intrabc_block(mbmi)) td->intrabc_used = 1;
if (txfm_params->tx_mode_search_type == TX_MODE_SELECT &&
- !xd->lossless[mbmi->segment_id] && mbmi->sb_type > BLOCK_4X4 &&
+ !xd->lossless[mbmi->segment_id] && mbmi->bsize > BLOCK_4X4 &&
!(is_inter && (mbmi->skip_txfm || seg_skip))) {
if (is_inter) {
tx_partition_count_update(cm, x, bsize, td->counts,
@@ -362,7 +362,7 @@
}
if (txfm_params->tx_mode_search_type == TX_MODE_SELECT &&
- block_signals_txsize(mbmi->sb_type) && is_inter &&
+ block_signals_txsize(mbmi->bsize) && is_inter &&
!(mbmi->skip_txfm || seg_skip) && !xd->lossless[mbmi->segment_id]) {
if (dry_run) tx_partition_set_contexts(cm, xd, bsize);
} else {
@@ -383,7 +383,7 @@
}
if (is_inter_block(mbmi) && !xd->is_chroma_ref && is_cfl_allowed(xd)) {
- cfl_store_block(xd, mbmi->sb_type, mbmi->tx_size);
+ cfl_store_block(xd, mbmi->bsize, mbmi->tx_size);
}
if (!dry_run) {
if (cpi->oxcf.pass == 0 && cpi->svc.temporal_layer_id == 0 &&
@@ -589,7 +589,7 @@
av1_set_offsets(cpi, &tile_data->tile_info, x, mi_row, mi_col, bsize);
if (ctx->rd_mode_is_ready) {
- assert(ctx->mic.sb_type == bsize);
+ assert(ctx->mic.bsize == bsize);
assert(ctx->mic.partition == partition);
rd_cost->rate = ctx->rd_stats.rate;
rd_cost->dist = ctx->rd_stats.dist;
@@ -615,7 +615,7 @@
aom_clear_system_state();
mbmi = xd->mi[0];
- mbmi->sb_type = bsize;
+ mbmi->bsize = bsize;
mbmi->partition = partition;
#if CONFIG_RD_DEBUG
@@ -714,7 +714,7 @@
const MB_MODE_INFO *const mbmi = xd->mi[0];
const MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
const CurrentFrame *const current_frame = &cm->current_frame;
- const BLOCK_SIZE bsize = mbmi->sb_type;
+ const BLOCK_SIZE bsize = mbmi->bsize;
FRAME_CONTEXT *fc = xd->tile_ctx;
const int seg_ref_active =
segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_REF_FRAME);
@@ -1482,7 +1482,7 @@
RD_STATS last_part_rdc, none_rdc, chosen_rdc, invalid_rdc;
BLOCK_SIZE sub_subsize = BLOCK_4X4;
int splits_below = 0;
- BLOCK_SIZE bs_type = mib[0]->sb_type;
+ BLOCK_SIZE bs_type = mib[0]->bsize;
if (pc_tree->none == NULL) {
pc_tree->none = av1_alloc_pmc(cm, bsize, &td->shared_coeff_buf);
@@ -1528,7 +1528,7 @@
for (int i = 0; i < SUB_PARTITIONS_SPLIT; i++) {
int jj = i >> 1, ii = i & 0x01;
MB_MODE_INFO *this_mi = mib[jj * hbs * mi_params->mi_stride + ii * hbs];
- if (this_mi && this_mi->sb_type >= sub_subsize) {
+ if (this_mi && this_mi->bsize >= sub_subsize) {
splits_below = 0;
}
}
@@ -1549,7 +1549,7 @@
}
av1_restore_context(x, &x_ctx, mi_row, mi_col, bsize, num_planes);
- mib[0]->sb_type = bs_type;
+ mib[0]->bsize = bs_type;
pc_tree->partitioning = partition;
}
}
@@ -1722,7 +1722,7 @@
// If last_part is better set the partitioning to that.
if (last_part_rdc.rdcost < chosen_rdc.rdcost) {
- mib[0]->sb_type = bsize;
+ mib[0]->bsize = bsize;
if (bsize >= BLOCK_8X8) pc_tree->partitioning = partition;
chosen_rdc = last_part_rdc;
}
@@ -2018,12 +2018,12 @@
av1_restore_context(x, &x_ctx, mi_row, mi_col, bsize, 3);
if (none_rdc.rdcost < split_rdc.rdcost) {
- mib[0]->sb_type = bsize;
+ mib[0]->bsize = bsize;
pc_tree->partitioning = PARTITION_NONE;
encode_b_nonrd(cpi, tile_data, td, tp, mi_row, mi_col, 0, bsize,
partition, pc_tree->none, NULL);
} else {
- mib[0]->sb_type = subsize;
+ mib[0]->bsize = subsize;
pc_tree->partitioning = PARTITION_SPLIT;
for (int i = 0; i < SUB_PARTITIONS_SPLIT; i++) {
const int x_idx = (i & 1) * hbs;
@@ -2135,12 +2135,12 @@
split_rdc.rdcost = RDCOST(x->rdmult, split_rdc.rate, split_rdc.dist);
}
if (none_rdc.rdcost < split_rdc.rdcost) {
- mib[0]->sb_type = bsize;
+ mib[0]->bsize = bsize;
pc_tree->partitioning = PARTITION_NONE;
encode_b_nonrd(cpi, tile_data, td, tp, mi_row, mi_col, 0, bsize,
partition, pc_tree->none, NULL);
} else {
- mib[0]->sb_type = subsize;
+ mib[0]->bsize = subsize;
pc_tree->partitioning = PARTITION_SPLIT;
for (int i = 0; i < SUB_PARTITIONS_SPLIT; i++) {
int x_idx = (i & 1) * hbs;
diff --git a/av1/encoder/partition_strategy.c b/av1/encoder/partition_strategy.c
index 3cae746..cb95ab4 100644
--- a/av1/encoder/partition_strategy.c
+++ b/av1/encoder/partition_strategy.c
@@ -490,8 +490,8 @@
// Neighbor stuff
const int has_above = !!xd->above_mbmi;
const int has_left = !!xd->left_mbmi;
- const BLOCK_SIZE above_bsize = has_above ? xd->above_mbmi->sb_type : bsize;
- const BLOCK_SIZE left_bsize = has_left ? xd->left_mbmi->sb_type : bsize;
+ const BLOCK_SIZE above_bsize = has_above ? xd->above_mbmi->bsize : bsize;
+ const BLOCK_SIZE left_bsize = has_left ? xd->left_mbmi->bsize : bsize;
features[f_idx++] = (float)has_above;
features[f_idx++] = (float)mi_size_wide_log2[above_bsize];
features[f_idx++] = (float)mi_size_high_log2[above_bsize];
diff --git a/av1/encoder/pickcdef.c b/av1/encoder/pickcdef.c
index 25232e1..a031999 100644
--- a/av1/encoder/pickcdef.c
+++ b/av1/encoder/pickcdef.c
@@ -452,9 +452,9 @@
mi_params->mi_grid_base[MI_SIZE_64X64 * fbr * mi_params->mi_stride +
MI_SIZE_64X64 * fbc];
if (((fbc & 1) &&
- (mbmi->sb_type == BLOCK_128X128 || mbmi->sb_type == BLOCK_128X64)) ||
+ (mbmi->bsize == BLOCK_128X128 || mbmi->bsize == BLOCK_128X64)) ||
((fbr & 1) &&
- (mbmi->sb_type == BLOCK_128X128 || mbmi->sb_type == BLOCK_64X128)))
+ (mbmi->bsize == BLOCK_128X128 || mbmi->bsize == BLOCK_64X128)))
continue;
int nhb = AOMMIN(MI_SIZE_64X64, mi_params->mi_cols - MI_SIZE_64X64 * fbc);
@@ -462,9 +462,9 @@
int hb_step = 1;
int vb_step = 1;
BLOCK_SIZE bs;
- if (mbmi->sb_type == BLOCK_128X128 || mbmi->sb_type == BLOCK_128X64 ||
- mbmi->sb_type == BLOCK_64X128) {
- bs = mbmi->sb_type;
+ if (mbmi->bsize == BLOCK_128X128 || mbmi->bsize == BLOCK_128X64 ||
+ mbmi->bsize == BLOCK_64X128) {
+ bs = mbmi->bsize;
if (bs == BLOCK_128X128 || bs == BLOCK_128X64) {
nhb =
AOMMIN(MI_SIZE_128X128, mi_params->mi_cols - MI_SIZE_64X64 * fbc);
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 14fc97a..8c2449e 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -1061,7 +1061,7 @@
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
for (int i = 0; i < num_planes; ++i) {
- setup_pred_plane(dst + i, xd->mi[0]->sb_type, dst[i].buf,
+ setup_pred_plane(dst + i, xd->mi[0]->bsize, dst[i].buf,
i ? src->uv_crop_width : src->y_crop_width,
i ? src->uv_crop_height : src->y_crop_height,
dst[i].stride, mi_row, mi_col, i ? scale_uv : scale,
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 4f7f703..416128d 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -608,8 +608,8 @@
if (plane && !xd->is_chroma_ref) break;
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const BLOCK_SIZE bs = get_plane_block_size(mbmi->sb_type, pd->subsampling_x,
- pd->subsampling_y);
+ const BLOCK_SIZE bs =
+ get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
unsigned int sse;
cpi->fn_ptr[bs].vf(p->src.buf, p->src.stride, pd->dst.buf, pd->dst.stride,
@@ -1563,7 +1563,7 @@
if (cpi->sf.inter_sf.inter_mode_rd_model_estimation == 1) {
const int skip_ctx = av1_get_skip_txfm_context(xd);
inter_mode_data_push(
- tile_data, mbmi->sb_type, rd_stats->sse, rd_stats->dist,
+ tile_data, mbmi->bsize, rd_stats->sse, rd_stats->dist,
rd_stats_y->rate + rd_stats_uv->rate +
mode_costs->skip_txfm_cost[skip_ctx][mbmi->skip_txfm]);
}
@@ -2090,7 +2090,7 @@
for (int above_mi_col = mi_col; above_mi_col < end_col;
above_mi_col += mi_step) {
MB_MODE_INFO **above_mi = prev_row_mi + above_mi_col;
- mi_step = mi_size_wide[above_mi[0]->sb_type];
+ mi_step = mi_size_wide[above_mi[0]->bsize];
int match_found = 0;
if (is_inter_block(*above_mi))
match_found = ref_match_found_in_nb_blocks(*cur_mbmi, *above_mi);
@@ -2112,7 +2112,7 @@
for (int left_mi_row = mi_row; left_mi_row < end_row;
left_mi_row += mi_step) {
MB_MODE_INFO **left_mi = prev_col_mi + left_mi_row * xd->mi_stride;
- mi_step = mi_size_high[left_mi[0]->sb_type];
+ mi_step = mi_size_high[left_mi[0]->bsize];
int match_found = 0;
if (is_inter_block(*left_mi))
match_found = ref_match_found_in_nb_blocks(*cur_mbmi, *left_mi);
@@ -4768,7 +4768,7 @@
continue;
} else if (cpi->sf.inter_sf.inter_mode_rd_model_estimation == 1) {
inter_mode_data_push(
- tile_data, mbmi->sb_type, rd_stats.sse, rd_stats.dist,
+ tile_data, mbmi->bsize, rd_stats.sse, rd_stats.dist,
rd_stats_y.rate + rd_stats_uv.rate +
mode_costs->skip_txfm_cost[skip_ctx][mbmi->skip_txfm]);
}
@@ -5085,7 +5085,7 @@
? ref_costs_comp[ref_frame][second_ref_frame]
: ref_costs_single[ref_frame];
const int compmode_cost =
- is_comp_ref_allowed(mbmi->sb_type) ? comp_inter_cost[comp_pred] : 0;
+ is_comp_ref_allowed(mbmi->bsize) ? comp_inter_cost[comp_pred] : 0;
const int real_compmode_cost =
cm->current_frame.reference_mode == REFERENCE_MODE_SELECT
? compmode_cost
@@ -5275,7 +5275,7 @@
// Only try palette mode when the best mode so far is an intra mode.
const int try_palette =
cpi->oxcf.tool_cfg.enable_palette &&
- av1_allow_palette(features->allow_screen_content_tools, mbmi->sb_type) &&
+ av1_allow_palette(features->allow_screen_content_tools, mbmi->bsize) &&
!is_inter_mode(search_state.best_mbmode.mode);
RD_STATS this_rd_cost;
int this_skippable = 0;
@@ -5667,7 +5667,7 @@
const AV1_COMMON *cm, const MACROBLOCK *x, const MACROBLOCKD *xd,
const uint8_t *above, int above_stride, const uint8_t *left,
int left_stride) {
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
const int bw = xd->width << MI_SIZE_LOG2;
const int bh = xd->height << MI_SIZE_LOG2;
const OBMCBuffer *obmc_buffer = &x->obmc_buffer;
diff --git a/av1/encoder/reconinter_enc.c b/av1/encoder/reconinter_enc.c
index edd308f..20da822 100644
--- a/av1/encoder/reconinter_enc.c
+++ b/av1/encoder/reconinter_enc.c
@@ -143,7 +143,7 @@
int mi_col_offset, MB_MODE_INFO *ref_mbmi,
struct build_prediction_ctxt *ctxt,
const int num_planes) {
- const BLOCK_SIZE ref_bsize = AOMMAX(BLOCK_8X8, ref_mbmi->sb_type);
+ const BLOCK_SIZE ref_bsize = AOMMAX(BLOCK_8X8, ref_mbmi->bsize);
const int ref_mi_row = xd->mi_row + mi_row_offset;
const int ref_mi_col = xd->mi_col + mi_col_offset;
@@ -181,7 +181,7 @@
const int mi_x = (xd->mi_col + rel_mi_col) << MI_SIZE_LOG2;
const int mi_y = (xd->mi_row + rel_mi_row) << MI_SIZE_LOG2;
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
InterPredParams inter_pred_params;
@@ -227,7 +227,7 @@
struct build_prediction_ctxt ctxt = {
cm, tmp_buf, tmp_width, tmp_height, tmp_stride, xd->mb_to_right_edge, NULL
};
- BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ BLOCK_SIZE bsize = xd->mi[0]->bsize;
foreach_overlappable_nb_above(cm, xd,
max_neighbor_obmc[mi_size_wide_log2[bsize]],
build_obmc_prediction, &ctxt);
@@ -242,7 +242,7 @@
struct build_prediction_ctxt ctxt = {
cm, tmp_buf, tmp_width, tmp_height, tmp_stride, xd->mb_to_bottom_edge, NULL
};
- BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ BLOCK_SIZE bsize = xd->mi[0]->bsize;
foreach_overlappable_nb_left(cm, xd,
max_neighbor_obmc[mi_size_high_log2[bsize]],
build_obmc_prediction, &ctxt);
@@ -266,8 +266,8 @@
dst_stride1);
av1_build_prediction_by_left_preds(cm, xd, dst_buf2, dst_width2, dst_height2,
dst_stride2);
- av1_setup_dst_planes(xd->plane, xd->mi[0]->sb_type, &cm->cur_frame->buf,
- mi_row, mi_col, 0, num_planes);
+ av1_setup_dst_planes(xd->plane, xd->mi[0]->bsize, &cm->cur_frame->buf, mi_row,
+ mi_col, 0, num_planes);
av1_build_obmc_inter_prediction(cm, xd, dst_buf1, dst_stride1, dst_buf2,
dst_stride2);
}
@@ -373,17 +373,17 @@
if (is_hbd) {
build_masked_compound_highbd(
dst, dst_buf->stride, CONVERT_TO_BYTEPTR(ext_dst0), ext_dst_stride0,
- CONVERT_TO_BYTEPTR(ext_dst1), ext_dst_stride1, comp_data,
- mbmi->sb_type, h, w, xd->bd);
+ CONVERT_TO_BYTEPTR(ext_dst1), ext_dst_stride1, comp_data, mbmi->bsize,
+ h, w, xd->bd);
} else {
build_masked_compound(dst, dst_buf->stride, ext_dst0, ext_dst_stride0,
- ext_dst1, ext_dst_stride1, comp_data, mbmi->sb_type,
+ ext_dst1, ext_dst_stride1, comp_data, mbmi->bsize,
h, w);
}
#else
build_masked_compound(dst, dst_buf->stride, ext_dst0, ext_dst_stride0,
- ext_dst1, ext_dst_stride1, comp_data, mbmi->sb_type,
- h, w);
+ ext_dst1, ext_dst_stride1, comp_data, mbmi->bsize, h,
+ w);
#endif
} else {
#if CONFIG_AV1_HIGHBITDEPTH
diff --git a/av1/encoder/segmentation.c b/av1/encoder/segmentation.c
index 0c029c0..de17d57 100644
--- a/av1/encoder/segmentation.c
+++ b/av1/encoder/segmentation.c
@@ -62,7 +62,7 @@
// Temporal prediction not allowed on key frames
if (cm->current_frame.frame_type != KEY_FRAME) {
- const BLOCK_SIZE bsize = xd->mi[0]->sb_type;
+ const BLOCK_SIZE bsize = xd->mi[0]->bsize;
// Test to see if the segment id matches the predicted value.
const int pred_segment_id =
cm->last_frame_seg_map
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index 496d2bd..aa8f7fd 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -143,14 +143,14 @@
if (blk_row >= max_blocks_high || blk_col >= max_blocks_wide) return;
const TX_SIZE plane_tx_size =
- plane ? av1_get_max_uv_txsize(mbmi->sb_type, pd->subsampling_x,
+ plane ? av1_get_max_uv_txsize(mbmi->bsize, pd->subsampling_x,
pd->subsampling_y)
: mbmi->inter_tx_size[av1_get_txb_size_index(plane_bsize, blk_row,
blk_col)];
if (tx_size == plane_tx_size || plane) {
- plane_bsize = get_plane_block_size(mbmi->sb_type, pd->subsampling_x,
- pd->subsampling_y);
+ plane_bsize =
+ get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
av1_update_and_record_txb_context(plane, block, blk_row, blk_col,
plane_bsize, tx_size, arg);
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index c43e0bd..92fbd12 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -278,7 +278,7 @@
cm->mi_params.mi_rows, cm->mi_params.mi_cols);
set_plane_n4(xd, mi_size_wide[bsize], mi_size_high[bsize],
av1_num_planes(cm));
- xd->mi[0]->sb_type = bsize;
+ xd->mi[0]->bsize = bsize;
xd->mi[0]->motion_mode = SIMPLE_TRANSLATION;
// Intra prediction search
diff --git a/av1/encoder/tx_search.c b/av1/encoder/tx_search.c
index 7a6e321..d192ead 100644
--- a/av1/encoder/tx_search.c
+++ b/av1/encoder/tx_search.c
@@ -865,8 +865,8 @@
for (int plane = 0; plane < num_planes; ++plane) {
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const BLOCK_SIZE bs = get_plane_block_size(mbmi->sb_type, pd->subsampling_x,
- pd->subsampling_y);
+ const BLOCK_SIZE bs =
+ get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
unsigned int sse;
if (x->skip_chroma_rd && plane) continue;
@@ -2637,7 +2637,7 @@
blk_col < max_block_wide(xd, plane_bsize, 0));
MB_MODE_INFO *const mbmi = xd->mi[0];
const int ctx = txfm_partition_context(tx_above + blk_col, tx_left + blk_row,
- mbmi->sb_type, tx_size);
+ mbmi->bsize, tx_size);
struct macroblock_plane *const p = &x->plane[0];
const int try_no_split = (cpi->oxcf.txfm_cfg.enable_tx64 ||
@@ -2984,11 +2984,11 @@
const ModeCosts *mode_costs = &x->mode_costs;
const int is_inter = is_inter_block(mbmi);
const int tx_select = txfm_params->tx_mode_search_type == TX_MODE_SELECT &&
- block_signals_txsize(mbmi->sb_type);
+ block_signals_txsize(mbmi->bsize);
int tx_size_rate = 0;
if (tx_select) {
const int ctx = txfm_partition_context(
- xd->above_txfm_context, xd->left_txfm_context, mbmi->sb_type, tx_size);
+ xd->above_txfm_context, xd->left_txfm_context, mbmi->bsize, tx_size);
tx_size_rate = is_inter ? mode_costs->txfm_partition_cost[ctx][0]
: tx_size_cost(x, bs, tx_size);
}
@@ -3055,7 +3055,7 @@
const TX_SIZE plane_tx_size = mbmi->inter_tx_size[av1_get_txb_size_index(
plane_bsize, blk_row, blk_col)];
const int ctx = txfm_partition_context(tx_above + blk_col, tx_left + blk_row,
- mbmi->sb_type, tx_size);
+ mbmi->bsize, tx_size);
av1_init_rd_stats(rd_stats);
if (tx_size == plane_tx_size) {
@@ -3413,7 +3413,7 @@
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = xd->mi[0];
const TxfmSearchParams *tx_params = &x->txfm_search_params;
- assert(bs == mbmi->sb_type);
+ assert(bs == mbmi->bsize);
const int is_inter = is_inter_block(mbmi);
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
diff --git a/av1/encoder/tx_search.h b/av1/encoder/tx_search.h
index 6086775..617f354 100644
--- a/av1/encoder/tx_search.h
+++ b/av1/encoder/tx_search.h
@@ -35,7 +35,7 @@
static AOM_INLINE int tx_size_cost(const MACROBLOCK *const x, BLOCK_SIZE bsize,
TX_SIZE tx_size) {
- assert(bsize == x->e_mbd.mi[0]->sb_type);
+ assert(bsize == x->e_mbd.mi[0]->bsize);
if (x->txfm_search_params.tx_mode_search_type != TX_MODE_SELECT ||
!block_signals_txsize(bsize))
return 0;
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c
index 2df78dd..b446430 100644
--- a/av1/encoder/var_based_part.c
+++ b/av1/encoder/var_based_part.c
@@ -130,7 +130,7 @@
cpi->common.mi_params.mi_rows > mi_row) {
set_mode_info_offsets(&cpi->common.mi_params, &cpi->mbmi_ext_info, x, xd,
mi_row, mi_col);
- xd->mi[0]->sb_type = bsize;
+ xd->mi[0]->bsize = bsize;
}
}
@@ -428,15 +428,15 @@
CommonModeInfoParams *mi_params, PartitionSearchInfo *part_info,
MACROBLOCKD *xd, VP64x64 *vt, const int64_t thresholds[], int mi_col,
int mi_row) {
- if (xd->mi[0]->sb_type == BLOCK_64X64) {
+ if (xd->mi[0]->bsize == BLOCK_64X64) {
if ((vt->part_variances).none.variance < (thresholds[0] >> 1))
part_info->variance_low[0] = 1;
- } else if (xd->mi[0]->sb_type == BLOCK_64X32) {
+ } else if (xd->mi[0]->bsize == BLOCK_64X32) {
for (int i = 0; i < 2; i++) {
if (vt->part_variances.horz[i].variance < (thresholds[0] >> 2))
part_info->variance_low[i + 1] = 1;
}
- } else if (xd->mi[0]->sb_type == BLOCK_32X64) {
+ } else if (xd->mi[0]->bsize == BLOCK_32X64) {
for (int i = 0; i < 2; i++) {
if (vt->part_variances.vert[i].variance < (thresholds[0] >> 2))
part_info->variance_low[i + 3] = 1;
@@ -454,16 +454,16 @@
if (*this_mi == NULL) continue;
- if ((*this_mi)->sb_type == BLOCK_32X32) {
+ if ((*this_mi)->bsize == BLOCK_32X32) {
int64_t threshold_32x32 = (5 * thresholds[1]) >> 3;
if (vt->split[i].part_variances.none.variance < threshold_32x32)
part_info->variance_low[i + 5] = 1;
} else {
// For 32x16 and 16x32 blocks, the flag is set on each 16x16 block
// inside.
- if ((*this_mi)->sb_type == BLOCK_16X16 ||
- (*this_mi)->sb_type == BLOCK_32X16 ||
- (*this_mi)->sb_type == BLOCK_16X32) {
+ if ((*this_mi)->bsize == BLOCK_16X16 ||
+ (*this_mi)->bsize == BLOCK_32X16 ||
+ (*this_mi)->bsize == BLOCK_16X32) {
for (int j = 0; j < 4; j++) {
if (vt->split[i].split[j].part_variances.none.variance <
(thresholds[2] >> 8))
@@ -479,15 +479,15 @@
CommonModeInfoParams *mi_params, PartitionSearchInfo *part_info,
MACROBLOCKD *xd, VP128x128 *vt, const int64_t thresholds[], int mi_col,
int mi_row) {
- if (xd->mi[0]->sb_type == BLOCK_128X128) {
+ if (xd->mi[0]->bsize == BLOCK_128X128) {
if (vt->part_variances.none.variance < (thresholds[0] >> 1))
part_info->variance_low[0] = 1;
- } else if (xd->mi[0]->sb_type == BLOCK_128X64) {
+ } else if (xd->mi[0]->bsize == BLOCK_128X64) {
for (int i = 0; i < 2; i++) {
if (vt->part_variances.horz[i].variance < (thresholds[0] >> 2))
part_info->variance_low[i + 1] = 1;
}
- } else if (xd->mi[0]->sb_type == BLOCK_64X128) {
+ } else if (xd->mi[0]->bsize == BLOCK_64X128) {
for (int i = 0; i < 2; i++) {
if (vt->part_variances.vert[i].variance < (thresholds[0] >> 2))
part_info->variance_low[i + 3] = 1;
@@ -506,15 +506,15 @@
mi_params->mi_rows <= mi_row + idx64[i][0])
continue;
const int64_t threshold_64x64 = (5 * thresholds[1]) >> 3;
- if ((*mi_64)->sb_type == BLOCK_64X64) {
+ if ((*mi_64)->bsize == BLOCK_64X64) {
if (vt->split[i].part_variances.none.variance < threshold_64x64)
part_info->variance_low[5 + i] = 1;
- } else if ((*mi_64)->sb_type == BLOCK_64X32) {
+ } else if ((*mi_64)->bsize == BLOCK_64X32) {
for (int j = 0; j < 2; j++)
if (vt->split[i].part_variances.horz[j].variance <
(threshold_64x64 >> 1))
part_info->variance_low[9 + (i << 1) + j] = 1;
- } else if ((*mi_64)->sb_type == BLOCK_32X64) {
+ } else if ((*mi_64)->bsize == BLOCK_32X64) {
for (int j = 0; j < 2; j++)
if (vt->split[i].part_variances.vert[j].variance <
(threshold_64x64 >> 1))
@@ -529,16 +529,16 @@
mi_params->mi_rows <= mi_row + idx64[i][0] + idx32[k][0])
continue;
const int64_t threshold_32x32 = (5 * thresholds[2]) >> 3;
- if ((*mi_32)->sb_type == BLOCK_32X32) {
+ if ((*mi_32)->bsize == BLOCK_32X32) {
if (vt->split[i].split[k].part_variances.none.variance <
threshold_32x32)
part_info->variance_low[25 + (i << 2) + k] = 1;
} else {
// For 32x16 and 16x32 blocks, the flag is set on each 16x16 block
// inside.
- if ((*mi_32)->sb_type == BLOCK_16X16 ||
- (*mi_32)->sb_type == BLOCK_32X16 ||
- (*mi_32)->sb_type == BLOCK_16X32) {
+ if ((*mi_32)->bsize == BLOCK_16X16 ||
+ (*mi_32)->bsize == BLOCK_32X16 ||
+ (*mi_32)->bsize == BLOCK_16X32) {
for (int j = 0; j < 4; j++) {
if (vt->split[i]
.split[k]
@@ -765,7 +765,7 @@
get_ref_scale_factors(cm, LAST_FRAME), num_planes);
mi->ref_frame[0] = LAST_FRAME;
mi->ref_frame[1] = NONE_FRAME;
- mi->sb_type = cm->seq_params.sb_size;
+ mi->bsize = cm->seq_params.sb_size;
mi->mv[0].as_int = 0;
mi->interp_filters = av1_broadcast_interp_filter(BILINEAR);
if (cpi->sf.rt_sf.estimate_motion_for_var_based_partition) {
diff --git a/examples/inspect.c b/examples/inspect.c
index 304bbc8..0a2e962 100644
--- a/examples/inspect.c
+++ b/examples/inspect.c
@@ -267,7 +267,7 @@
char offset;
};
struct parm_offset parm_offsets[] = {
- { "blockSize", offsetof(insp_mi_data, sb_type) },
+ { "blockSize", offsetof(insp_mi_data, bsize) },
{ "transformSize", offsetof(insp_mi_data, tx_size) },
{ "transformType", offsetof(insp_mi_data, tx_type) },
{ "dualFilterType", offsetof(insp_mi_data, dual_filter_type) },
@@ -627,7 +627,7 @@
buf += put_str(buf, "{\n");
if (layers & BLOCK_SIZE_LAYER) {
buf += put_block_info(buf, block_size_map, "blockSize",
- offsetof(insp_mi_data, sb_type), 0);
+ offsetof(insp_mi_data, bsize), 0);
}
if (layers & TRANSFORM_SIZE_LAYER) {
buf += put_block_info(buf, tx_size_map, "transformSize",