Commit d5647376 authored by Linfeng Zhang's avatar Linfeng Zhang Committed by James Zern

cosmetic: paded to padded

Change-Id: I11e57afd02b355e29be3ec4e216d2c6910120467
parent f91f3ca1
......@@ -167,7 +167,7 @@ static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
return levels_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
}
static INLINE int get_paded_idx(const int idx, const int bwl) {
static INLINE int get_padded_idx(const int idx, const int bwl) {
return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
}
......@@ -557,9 +557,9 @@ static INLINE int get_nz_map_ctx(const uint8_t *const levels,
const TX_CLASS tx_class = tx_type_to_class[tx_type];
const int stats =
#if USE_CAUSAL_BASE_CTX
get_nz_mag(levels + get_paded_idx(coeff_idx, bwl), bwl, tx_class);
get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
#else
get_nz_count(levels + get_paded_idx(coeff_idx, bwl), bwl, tx_class);
get_nz_count(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
#endif
return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, height, tx_class);
}
......
......@@ -203,7 +203,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][1]>>7,
// ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][2]>>7);
if (level) {
levels[get_paded_idx(pos, bwl)] = level;
levels[get_padded_idx(pos, bwl)] = level;
*max_scan_line = AOMMAX(*max_scan_line, pos);
if (level < 3) {
cul_level += level;
......@@ -241,7 +241,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
break;
}
}
levels[get_paded_idx(pos, bwl)] = k + 1;
levels[get_padded_idx(pos, bwl)] = k + 1;
*max_scan_line = AOMMAX(*max_scan_line, pos);
if (k == NUM_BASE_LEVELS) {
update_pos[num_updates++] = pos;
......@@ -251,7 +251,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
// set non-zero coefficient map.
unsigned int(*nz_map_count)[SIG_COEF_CONTEXTS][2] =
(counts) ? &counts->nz_map[txs_ctx][plane_type] : NULL;
levels[get_paded_idx(pos, bwl)] = is_nz;
levels[get_padded_idx(pos, bwl)] = is_nz;
if (counts) ++(*nz_map_count)[coeff_ctx][is_nz];
#endif
#endif
......@@ -263,7 +263,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
av1_get_base_level_counts(levels, i, width, height, level_counts);
for (c = *eob - 1; c >= 0; --c) {
const int pos = scan[c];
uint8_t *const level = &levels[get_paded_idx(pos, bwl)];
uint8_t *const level = &levels[get_padded_idx(pos, bwl)];
int ctx;
if (*level <= i) continue;
......@@ -293,7 +293,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
for (c = 0; c < *eob; ++c) {
const int pos = scan[c];
int8_t *const sign = &signs[pos];
if (levels[get_paded_idx(pos, bwl)] == 0) continue;
if (levels[get_padded_idx(pos, bwl)] == 0) continue;
if (c == 0) {
const int dc_sign_ctx = txb_ctx->dc_sign_ctx;
#if LV_MAP_PROB
......@@ -316,7 +316,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
#endif
for (c = 0; c < num_updates; ++c) {
const int pos = update_pos[c];
uint8_t *const level = &levels[get_paded_idx(pos, bwl)];
uint8_t *const level = &levels[get_padded_idx(pos, bwl)];
int idx;
int ctx;
......
......@@ -282,7 +282,7 @@ static void get_dist_cost_stats(LevelDownStats *const stats, const int scan_idx,
static INLINE void update_qcoeff(const int coeff_idx, const tran_low_t qc,
const TxbInfo *const txb_info) {
txb_info->qcoeff[coeff_idx] = qc;
txb_info->levels[get_paded_idx(coeff_idx, txb_info->bwl)] =
txb_info->levels[get_padded_idx(coeff_idx, txb_info->bwl)] =
(uint8_t)clamp(abs(qc), 0, INT8_MAX);
}
......@@ -867,7 +867,7 @@ void gen_txb_cache(TxbCache *txb_cache, TxbInfo *txb_info) {
const int col = coeff_idx - (row << bwl);
txb_cache->nz_count_arr[coeff_idx] =
get_nz_count(levels + get_paded_idx(coeff_idx, bwl), bwl,
get_nz_count(levels + get_padded_idx(coeff_idx, bwl), bwl,
tx_type_to_class[txb_info->tx_type]);
txb_cache->nz_ctx_arr[coeff_idx] = get_nz_map_ctx_from_stats(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment