[Clean Up] Remove get_y_mode()
The get_y_mode function, is superfluous, not used consistently, and requires a
useless block_idx parameter than gets pass around a lot inside the
codebase for no apparent reason.
The block parameter is misleading, as it could cause people to think all these
functions actually use this value.
Change-Id: I7ae0a8d1282c009b9114c83771cce10f5c2ee397
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4350163..d9e0990 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -315,7 +315,7 @@
const MB_MODE_INFO *mbmi = &mi->mbmi;
MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(0, cm->global_motion, xd, mi);
+ motion_mode_allowed(cm->global_motion, xd, mi);
switch (last_motion_mode_allowed) {
case SIMPLE_TRANSLATION: break;
case OBMC_CAUSAL:
@@ -524,8 +524,8 @@
uint16_t eob = x->mbmi_ext->eobs[plane][block];
TXB_CTX txb_ctx = { x->mbmi_ext->txb_skip_ctx[plane][block],
x->mbmi_ext->dc_sign_ctx[plane][block] };
- av1_write_coeffs_txb(cm, xd, w, blk_row, blk_col, block, plane, tx_size,
- tcoeff, eob, &txb_ctx);
+ av1_write_coeffs_txb(cm, xd, w, blk_row, blk_col, plane, tx_size, tcoeff,
+ eob, &txb_ctx);
#if CONFIG_RD_DEBUG
token_stats->txb_coeff_cost_map[blk_row][blk_col] = tmp_token_stats.cost;
token_stats->cost += tmp_token_stats.cost;
@@ -1096,8 +1096,7 @@
void av1_write_tx_type(const AV1_COMMON *const cm, const MACROBLOCKD *xd,
#if CONFIG_TXK_SEL
- int blk_row, int blk_col, int block, int plane,
- TX_SIZE tx_size,
+ int blk_row, int blk_col, int plane, TX_SIZE tx_size,
#endif
aom_writer *w) {
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
@@ -1117,8 +1116,7 @@
// Only y plane's tx_type is transmitted
if (plane > 0) return;
PLANE_TYPE plane_type = get_plane_type(plane);
- TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
#endif
if (!FIXED_TX_TYPE) {
diff --git a/av1/encoder/bitstream.h b/av1/encoder/bitstream.h
index 69e0500..97cfd14 100644
--- a/av1/encoder/bitstream.h
+++ b/av1/encoder/bitstream.h
@@ -41,8 +41,7 @@
void av1_write_tx_type(const AV1_COMMON *const cm, const MACROBLOCKD *xd,
#if CONFIG_TXK_SEL
- int blk_row, int blk_col, int block, int plane,
- TX_SIZE tx_size,
+ int blk_row, int blk_col, int plane, TX_SIZE tx_size,
#endif
aom_writer *w);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index f1d516e..86e93b8 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -1044,7 +1044,7 @@
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
const MOTION_MODE motion_allowed =
- motion_mode_allowed(0, xd->global_motion, xd, mi);
+ motion_mode_allowed(xd->global_motion, xd, mi);
if (mbmi->ref_frame[1] != INTRA_FRAME) {
if (motion_allowed == WARPED_CAUSAL) {
#if CONFIG_EXT_WARPED_MOTION
@@ -4582,7 +4582,7 @@
void av1_update_tx_type_count(const AV1_COMMON *cm, MACROBLOCKD *xd,
#if CONFIG_TXK_SEL
- int blk_row, int blk_col, int block, int plane,
+ int blk_row, int blk_col, int plane,
#endif
BLOCK_SIZE bsize, TX_SIZE tx_size,
FRAME_COUNTS *counts, uint8_t allow_update_cdf) {
@@ -4601,7 +4601,7 @@
// Only y plane's tx_type is updated
if (plane > 0) return;
TX_TYPE tx_type =
- av1_get_tx_type(PLANE_TYPE_Y, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(PLANE_TYPE_Y, xd, blk_row, blk_col, tx_size);
#endif
if (get_ext_tx_types(tx_size, bsize, is_inter, cm->reduced_tx_set_used) > 1 &&
cm->base_qindex > 0 && !mbmi->skip &&
@@ -4696,11 +4696,11 @@
for (int plane = 0; plane < AOMMIN(2, num_planes); ++plane) {
if (mbmi->palette_mode_info.palette_size[plane] > 0) {
if (!dry_run)
- av1_tokenize_color_map(x, plane, 0, t, bsize, mbmi->tx_size,
+ av1_tokenize_color_map(x, plane, t, bsize, mbmi->tx_size,
PALETTE_MAP);
else if (dry_run == DRY_RUN_COSTCOEFFS)
- rate += av1_cost_color_map(x, plane, 0, bsize, mbmi->tx_size,
- PALETTE_MAP);
+ rate +=
+ av1_cost_color_map(x, plane, bsize, mbmi->tx_size, PALETTE_MAP);
}
}
}
diff --git a/av1/encoder/encodeframe.h b/av1/encoder/encodeframe.h
index 745940d..38a2fbb 100644
--- a/av1/encoder/encodeframe.h
+++ b/av1/encoder/encodeframe.h
@@ -37,7 +37,7 @@
void av1_update_tx_type_count(const struct AV1Common *cm, MACROBLOCKD *xd,
#if CONFIG_TXK_SEL
- int blk_row, int blk_col, int block, int plane,
+ int blk_row, int blk_col, int plane,
#endif
BLOCK_SIZE bsize, TX_SIZE tx_size,
FRAME_COUNTS *counts, uint8_t allow_update_cdf);
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 65bc6be..bc26cfc 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -146,7 +146,7 @@
const int16_t *const dequant_ptr = p->dequant_QTX;
const uint8_t *const band_translate = get_band_translate(tx_size);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order =
get_scan(cm, tx_size, tx_type, &xd->mi[0]->mbmi);
const int16_t *const scan = scan_order->scan;
@@ -492,8 +492,7 @@
struct macroblockd_plane *const pd = &xd->plane[plane];
#endif
PLANE_TYPE plane_type = get_plane_type(plane);
- TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
#if CONFIG_NEW_QUANT
const int is_inter = is_inter_block(mbmi);
@@ -657,7 +656,7 @@
{
TX_TYPE tx_type =
- av1_get_tx_type(pd->plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(pd->plane_type, xd, blk_row, blk_col, tx_size);
av1_inverse_transform_block(xd, dqcoeff, plane, tx_type, tx_size, dst,
pd->dst.stride, p->eobs[block],
cm->reduced_tx_set_used);
@@ -931,14 +930,13 @@
tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
PLANE_TYPE plane_type = get_plane_type(plane);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
uint16_t *eob = &p->eobs[block];
const int dst_stride = pd->dst.stride;
uint8_t *dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
- av1_predict_intra_block_facade(cm, xd, plane, block, blk_col, blk_row,
- tx_size);
+ av1_predict_intra_block_facade(cm, xd, plane, blk_col, blk_row, tx_size);
av1_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size);
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 6ea782a..19f2b48 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -315,14 +315,14 @@
}
void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
- aom_writer *w, int blk_row, int blk_col, int block,
- int plane, TX_SIZE tx_size, const tran_low_t *tcoeff,
+ aom_writer *w, int blk_row, int blk_col, int plane,
+ TX_SIZE tx_size, const tran_low_t *tcoeff,
uint16_t eob, TXB_CTX *txb_ctx) {
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi);
const int16_t *const scan = scan_order->scan;
const int seg_eob = av1_get_max_eob(tx_size);
@@ -350,8 +350,8 @@
av1_txb_init_levels(tcoeff, width, height, levels);
#if CONFIG_TXK_SEL
- av1_write_tx_type(cm, xd, blk_row, blk_col, block, plane,
- get_min_tx_size(tx_size), w);
+ av1_write_tx_type(cm, xd, blk_row, blk_col, plane, get_min_tx_size(tx_size),
+ w);
#endif
int eob_extra, dummy;
@@ -549,8 +549,8 @@
uint16_t eob = x->mbmi_ext->eobs[plane][block];
TXB_CTX txb_ctx = { x->mbmi_ext->txb_skip_ctx[plane][block],
x->mbmi_ext->dc_sign_ctx[plane][block] };
- av1_write_coeffs_txb(cm, xd, w, blk_row, blk_col, block, plane, tx_size,
- tcoeff, eob, &txb_ctx);
+ av1_write_coeffs_txb(cm, xd, w, blk_row, blk_col, plane, tx_size, tcoeff, eob,
+ &txb_ctx);
}
void av1_write_coeffs_mb(const AV1_COMMON *const cm, MACROBLOCK *x,
@@ -593,7 +593,7 @@
TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
const struct macroblock_plane *p = &x->plane[plane];
const int eob = p->eobs[block];
@@ -1996,7 +1996,7 @@
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_SIZE txs_ctx = get_txsize_entropy_ctx(tx_size);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
const struct macroblock_plane *p = &x->plane[plane];
struct macroblockd_plane *pd = &xd->plane[plane];
@@ -2073,7 +2073,7 @@
const tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
const PLANE_TYPE plane_type = pd->plane_type;
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi);
(void)plane_bsize;
@@ -2099,7 +2099,7 @@
tran_low_t *tcoeff = BLOCK_OFFSET(x->mbmi_ext->tcoeff[plane], block);
const int segment_id = mbmi->segment_id;
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi);
const int16_t *const scan = scan_order->scan;
const int seg_eob = av1_get_tx_eob(&cpi->common.seg, segment_id, tx_size);
@@ -2136,8 +2136,8 @@
av1_txb_init_levels(tcoeff, width, height, levels);
#if CONFIG_TXK_SEL
- av1_update_tx_type_count(cm, xd, blk_row, blk_col, block, plane,
- mbmi->sb_type, get_min_tx_size(tx_size), td->counts,
+ av1_update_tx_type_count(cm, xd, blk_row, blk_col, plane, mbmi->sb_type,
+ get_min_tx_size(tx_size), td->counts,
allow_update_cdf);
#endif
@@ -2362,8 +2362,8 @@
for (tx_type = txk_start; tx_type <= txk_end; ++tx_type) {
if (plane == 0)
mbmi->txk_type[(blk_row << MAX_MIB_SIZE_LOG2) + blk_col] = tx_type;
- TX_TYPE ref_tx_type = av1_get_tx_type(get_plane_type(plane), xd, blk_row,
- blk_col, block, tx_size);
+ TX_TYPE ref_tx_type =
+ av1_get_tx_type(get_plane_type(plane), xd, blk_row, blk_col, tx_size);
if (tx_type != ref_tx_type) {
// use av1_get_tx_type() to check if the tx_type is valid for the current
// mode if it's not, we skip it here.
diff --git a/av1/encoder/encodetxb.h b/av1/encoder/encodetxb.h
index 2db05d6..8fee349 100644
--- a/av1/encoder/encodetxb.h
+++ b/av1/encoder/encodetxb.h
@@ -74,8 +74,8 @@
int blk_row, int blk_col, int block, TX_SIZE tx_size,
TXB_CTX *txb_ctx);
void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
- aom_writer *w, int blk_row, int blk_col, int block,
- int plane, TX_SIZE tx_size, const tran_low_t *tcoeff,
+ aom_writer *w, int blk_row, int blk_col, int plane,
+ TX_SIZE tx_size, const tran_low_t *tcoeff,
uint16_t eob, TXB_CTX *txb_ctx);
void av1_write_coeffs_mb(const AV1_COMMON *const cm, MACROBLOCK *x,
aom_writer *w, int plane, BLOCK_SIZE bsize);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 6ba22b0..e2bed3d 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1877,7 +1877,7 @@
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_SIZE tx_size = av1_get_tx_size(plane, xd);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const int dst_stride = pd->dst.stride;
uint8_t *dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
@@ -1995,7 +1995,7 @@
const PLANE_TYPE plane_type = get_plane_type(plane);
TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
av1_inverse_transform_block(xd, dqcoeff, plane, tx_type, tx_size, recon,
MAX_TX_SIZE, eob,
cpi->common.reduced_tx_set_used);
@@ -2071,8 +2071,7 @@
if (args->exit_early) return;
if (!is_inter_block(mbmi)) {
- av1_predict_intra_block_facade(cm, xd, plane, block, blk_col, blk_row,
- tx_size);
+ av1_predict_intra_block_facade(cm, xd, plane, blk_col, blk_row, tx_size);
av1_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size);
}
@@ -2149,7 +2148,7 @@
#endif // CONFIG_CFL
const PLANE_TYPE plane_type = get_plane_type(plane);
const TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *scan_order = get_scan(cm, tx_size, tx_type, mbmi);
this_rd_stats.rate =
@@ -2438,13 +2437,12 @@
const int is_inter = is_inter_block(mbmi);
if (mbmi->ref_mv_idx > 0 && tx_type != DCT_DCT) return 1;
- if (FIXED_TX_TYPE && tx_type != get_default_tx_type(0, xd, 0, tx_size))
- return 1;
+ if (FIXED_TX_TYPE && tx_type != get_default_tx_type(0, xd, tx_size)) return 1;
if (!is_inter && x->use_default_intra_tx_type &&
- tx_type != get_default_tx_type(0, xd, 0, tx_size))
+ tx_type != get_default_tx_type(0, xd, tx_size))
return 1;
if (is_inter && x->use_default_inter_tx_type &&
- tx_type != get_default_tx_type(0, xd, 0, tx_size))
+ tx_type != get_default_tx_type(0, xd, tx_size))
return 1;
const AV1_COMMON *const cm = &cpi->common;
const TxSetType tx_set_type =
@@ -2509,7 +2507,7 @@
RD_STATS this_rd_stats;
if (is_inter) {
if (x->use_default_inter_tx_type &&
- tx_type != get_default_tx_type(0, xd, 0, mbmi->tx_size))
+ tx_type != get_default_tx_type(0, xd, mbmi->tx_size))
continue;
if (cpi->sf.tx_type_search.prune_mode > NO_PRUNE) {
if (!do_tx_type_search(tx_type, prune,
@@ -2518,7 +2516,7 @@
}
} else {
if (x->use_default_intra_tx_type &&
- tx_type != get_default_tx_type(0, xd, 0, mbmi->tx_size))
+ tx_type != get_default_tx_type(0, xd, mbmi->tx_size))
continue;
if (!ALLOW_INTRA_EXT_TX && bs >= BLOCK_8X8) {
if (tx_type != intra_mode_to_tx_type_context[mbmi->mode]) continue;
@@ -2719,12 +2717,9 @@
const int max_blocks_high = max_block_high(xd, bsize, 0);
mbmi->tx_size = tx_size;
// Prediction.
- const int step = stepr * stepc;
- int block = 0;
for (row = 0; row < max_blocks_high; row += stepr) {
for (col = 0; col < max_blocks_wide; col += stepc) {
- av1_predict_intra_block_facade(cm, xd, 0, block, col, row, tx_size);
- block += step;
+ av1_predict_intra_block_facade(cm, xd, 0, col, row, tx_size);
}
}
// RD estimation.
@@ -2862,7 +2857,7 @@
#endif // CONFIG_PALETTE_DELTA_ENCODING
cpi->common.bit_depth);
palette_mode_cost +=
- av1_cost_color_map(x, 0, 0, bsize, mbmi->tx_size, PALETTE_MAP);
+ av1_cost_color_map(x, 0, bsize, mbmi->tx_size, PALETTE_MAP);
int64_t this_model_rd = intra_model_yrd(cpi, x, bsize, palette_mode_cost);
if (*best_model_rd != INT64_MAX &&
this_model_rd > *best_model_rd + (*best_model_rd >> 1))
@@ -3637,8 +3632,7 @@
int64_t tmp;
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
PLANE_TYPE plane_type = get_plane_type(plane);
- TX_TYPE tx_type =
- av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
+ TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order =
get_scan(cm, tx_size, tx_type, &xd->mi[0]->mbmi);
BLOCK_SIZE txm_bsize = txsize_to_bsize[tx_size];
@@ -4942,7 +4936,7 @@
}
*/
if (is_inter && x->use_default_inter_tx_type &&
- tx_type != get_default_tx_type(0, xd, 0, max_tx_size))
+ tx_type != get_default_tx_type(0, xd, max_tx_size))
continue;
if (xd->lossless[mbmi->segment_id])
@@ -5300,8 +5294,7 @@
color_cache, n_cache,
#endif // CONFIG_PALETTE_DELTA_ENCODING
cpi->common.bit_depth);
- this_rate +=
- av1_cost_color_map(x, 1, 0, bsize, mbmi->tx_size, PALETTE_MAP);
+ this_rate += av1_cost_color_map(x, 1, bsize, mbmi->tx_size, PALETTE_MAP);
this_rd = RDCOST(x->rdmult, this_rate, tokenonly_rd_stats.dist);
if (this_rd < *best_rd) {
*best_rd = this_rd;
@@ -5787,7 +5780,7 @@
zeromv[cur_frm].as_int =
gm_get_motion_vector(&cpi->common.global_motion[ref_frames[cur_frm]],
cpi->common.allow_high_precision_mv, bsize,
- mi_col, mi_row, block
+ mi_col, mi_row
#if CONFIG_AMVR
,
cpi->common.cur_frame_force_integer_mv
@@ -5877,7 +5870,7 @@
for (ref = 0; ref < 2; ++ref) {
const WarpedMotionParams *const wm =
&xd->global_motion[xd->mi[0]->mbmi.ref_frame[ref]];
- is_global[ref] = is_global_mv_block(xd->mi[0], block, wm->wmtype);
+ is_global[ref] = is_global_mv_block(xd->mi[0], wm->wmtype);
}
// Do joint motion search in compound mode to get more accurate mv.
@@ -6571,7 +6564,7 @@
const int p_col = ((mi_col * MI_SIZE) >> pd->subsampling_x) + 4 * ic;
const int p_row = ((mi_row * MI_SIZE) >> pd->subsampling_y) + 4 * ir;
const WarpedMotionParams *const wm = &xd->global_motion[other_ref];
- int is_global = is_global_mv_block(xd->mi[0], block, wm->wmtype);
+ int is_global = is_global_mv_block(xd->mi[0], wm->wmtype);
// This function should only ever be called for compound modes
assert(has_second_ref(mbmi));
@@ -7668,7 +7661,7 @@
const MV_REFERENCE_FRAME ref = mbmi->ref_frame[0];
zeromv.as_int = gm_get_motion_vector(&cm->global_motion[ref],
cm->allow_high_precision_mv, bsize,
- mi_col, mi_row, 0
+ mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -7754,7 +7747,7 @@
#endif // CONFIG_EXT_WARPED_MOTION
best_bmc_mbmi->num_proj_ref[0] = mbmi->num_proj_ref[0];
rate2_nocoeff = rd_stats->rate;
- last_motion_mode_allowed = motion_mode_allowed(0, xd->global_motion, xd, mi);
+ last_motion_mode_allowed = motion_mode_allowed(xd->global_motion, xd, mi);
base_mbmi = *mbmi;
int64_t best_rd = INT64_MAX;
@@ -9364,8 +9357,7 @@
frame_mv[NEWMV][ref_frame].as_int = INVALID_MV;
frame_mv[GLOBALMV][ref_frame].as_int =
gm_get_motion_vector(&cm->global_motion[ref_frame],
- cm->allow_high_precision_mv, bsize, mi_col, mi_row,
- 0
+ cm->allow_high_precision_mv, bsize, mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -9375,8 +9367,7 @@
frame_mv[NEW_NEWMV][ref_frame].as_int = INVALID_MV;
frame_mv[GLOBAL_GLOBALMV][ref_frame].as_int =
gm_get_motion_vector(&cm->global_motion[ref_frame],
- cm->allow_high_precision_mv, bsize, mi_col, mi_row,
- 0
+ cm->allow_high_precision_mv, bsize, mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -9469,7 +9460,7 @@
mode_skip_mask[ALTREF_FRAME] = ~INTER_NEAREST_NEAR_ZERO;
zeromv.as_int = gm_get_motion_vector(&cm->global_motion[ALTREF_FRAME],
cm->allow_high_precision_mv, bsize,
- mi_col, mi_row, 0
+ mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -10709,19 +10700,19 @@
int comp_pred_mode = refs[1] > INTRA_FRAME;
int_mv zeromv[2];
const uint8_t rf_type = av1_ref_frame_type(best_mbmode.ref_frame);
- zeromv[0].as_int = gm_get_motion_vector(&cm->global_motion[refs[0]],
- cm->allow_high_precision_mv, bsize,
- mi_col, mi_row, 0
+ zeromv[0].as_int =
+ gm_get_motion_vector(&cm->global_motion[refs[0]],
+ cm->allow_high_precision_mv, bsize, mi_col, mi_row
#if CONFIG_AMVR
- ,
- cm->cur_frame_force_integer_mv
+ ,
+ cm->cur_frame_force_integer_mv
#endif
- )
- .as_int;
+ )
+ .as_int;
zeromv[1].as_int = comp_pred_mode
? gm_get_motion_vector(&cm->global_motion[refs[1]],
cm->allow_high_precision_mv,
- bsize, mi_col, mi_row, 0
+ bsize, mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -10817,7 +10808,7 @@
const MV_REFERENCE_FRAME ref = best_mbmode.ref_frame[0];
zeromv.as_int = gm_get_motion_vector(&cm->global_motion[ref],
cm->allow_high_precision_mv, bsize,
- mi_col, mi_row, 0
+ mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
@@ -10860,7 +10851,7 @@
if (mbmi->mode == GLOBALMV || mbmi->mode == GLOBAL_GLOBALMV) {
// Correct the motion mode for GLOBALMV
const MOTION_MODE last_motion_mode_allowed =
- motion_mode_allowed(0, xd->global_motion, xd, xd->mi[0]);
+ motion_mode_allowed(xd->global_motion, xd, xd->mi[0]);
if (mbmi->motion_mode > last_motion_mode_allowed)
mbmi->motion_mode = last_motion_mode_allowed;
@@ -10953,7 +10944,7 @@
mbmi->ref_frame[1] = NONE_FRAME;
mbmi->mv[0].as_int =
gm_get_motion_vector(&cm->global_motion[mbmi->ref_frame[0]],
- cm->allow_high_precision_mv, bsize, mi_col, mi_row, 0
+ cm->allow_high_precision_mv, bsize, mi_col, mi_row
#if CONFIG_AMVR
,
cm->cur_frame_force_integer_mv
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index 38e78f3..d2acee8 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -259,8 +259,7 @@
struct macroblock_plane *p = &x->plane[plane];
struct macroblockd_plane *pd = &xd->plane[plane];
const PLANE_TYPE type = pd->plane_type;
- const TX_TYPE tx_type =
- av1_get_tx_type(type, xd, blk_row, blk_col, block, tx_size);
+ const TX_TYPE tx_type = av1_get_tx_type(type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi);
const int rate = av1_cost_coeffs(
cpi, x, plane, blk_row, blk_col, block, tx_size, scan_order,
@@ -366,10 +365,9 @@
}
static void get_color_map_params(const MACROBLOCK *const x, int plane,
- int block, BLOCK_SIZE bsize, TX_SIZE tx_size,
+ BLOCK_SIZE bsize, TX_SIZE tx_size,
COLOR_MAP_TYPE type,
Av1ColorMapParam *params) {
- (void)block;
(void)tx_size;
memset(params, 0, sizeof(*params));
switch (type) {
@@ -378,22 +376,20 @@
}
}
-int av1_cost_color_map(const MACROBLOCK *const x, int plane, int block,
- BLOCK_SIZE bsize, TX_SIZE tx_size, COLOR_MAP_TYPE type) {
+int av1_cost_color_map(const MACROBLOCK *const x, int plane, BLOCK_SIZE bsize,
+ TX_SIZE tx_size, COLOR_MAP_TYPE type) {
assert(plane == 0 || plane == 1);
Av1ColorMapParam color_map_params;
- get_color_map_params(x, plane, block, bsize, tx_size, type,
- &color_map_params);
+ get_color_map_params(x, plane, bsize, tx_size, type, &color_map_params);
return cost_and_tokenize_map(&color_map_params, NULL, 1);
}
-void av1_tokenize_color_map(const MACROBLOCK *const x, int plane, int block,
+void av1_tokenize_color_map(const MACROBLOCK *const x, int plane,
TOKENEXTRA **t, BLOCK_SIZE bsize, TX_SIZE tx_size,
COLOR_MAP_TYPE type) {
assert(plane == 0 || plane == 1);
Av1ColorMapParam color_map_params;
- get_color_map_params(x, plane, block, bsize, tx_size, type,
- &color_map_params);
+ get_color_map_params(x, plane, bsize, tx_size, type, &color_map_params);
// The first color index does not use context or entropy.
(*t)->token = color_map_params.color_map[0];
(*t)->color_map_cdf = NULL;
@@ -423,8 +419,7 @@
const tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
const int segment_id = mbmi->segment_id;
const int16_t *scan, *nb;
- const TX_TYPE tx_type =
- av1_get_tx_type(type, xd, blk_row, blk_col, block, tx_size);
+ const TX_TYPE tx_type = av1_get_tx_type(type, xd, blk_row, blk_col, tx_size);
const SCAN_ORDER *const scan_order = get_scan(cm, tx_size, tx_type, mbmi);
const int ref = is_inter_block(mbmi);
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
diff --git a/av1/encoder/tokenize.h b/av1/encoder/tokenize.h
index 5f388d9..8a5c97c 100644
--- a/av1/encoder/tokenize.h
+++ b/av1/encoder/tokenize.h
@@ -76,10 +76,10 @@
int mi_col, BLOCK_SIZE bsize, int *rate,
uint8_t allow_update_cdf);
-int av1_cost_color_map(const MACROBLOCK *const x, int plane, int block,
- BLOCK_SIZE bsize, TX_SIZE tx_size, COLOR_MAP_TYPE type);
+int av1_cost_color_map(const MACROBLOCK *const x, int plane, BLOCK_SIZE bsize,
+ TX_SIZE tx_size, COLOR_MAP_TYPE type);
-void av1_tokenize_color_map(const MACROBLOCK *const x, int plane, int block,
+void av1_tokenize_color_map(const MACROBLOCK *const x, int plane,
TOKENEXTRA **t, BLOCK_SIZE bsize, TX_SIZE tx_size,
COLOR_MAP_TYPE type);