Commit 1015a347 authored by Linfeng Zhang's avatar Linfeng Zhang

Add levels array in av1_optimize_txb()

av1_txb_init_levels() has prefix 'av1' because it will be optimized
and not static later.

Change-Id: I988da817335f122522a76c4412207c3a6fdd6b71
parent 2edfc37b
......@@ -12,9 +12,6 @@
#ifndef AV1_COMMON_TXB_COMMON_H_
#define AV1_COMMON_TXB_COMMON_H_
#define REDUCE_CONTEXT_DEPENDENCY 0
#define MIN_SCAN_IDX_REDUCE_CONTEXT_DEPENDENCY 0
extern const int16_t k_eob_group_start[12];
extern const int16_t k_eob_offset_bits[12];
int16_t get_eob_pos_token(int eob, int16_t *extra);
......@@ -336,9 +333,8 @@ static const int sig_ref_offset_horiz[SIG_REF_OFFSET_NUM][2] = {
};
#if USE_CAUSAL_BASE_CTX
static INLINE int get_nz_count_mag(const tran_low_t *tcoeffs, int bwl,
int height, int row, int col,
TX_CLASS tx_class,
static INLINE int get_nz_count_mag(const void *tcoeffs, int bwl, int height,
int row, int col, TX_CLASS tx_class,
const int coeff_is_byte_flag, int *mag) {
int count = 0;
*mag = 0;
......@@ -371,7 +367,7 @@ static INLINE int get_nz_count_mag(const tran_low_t *tcoeffs, int bwl,
return count;
}
#endif
static INLINE int get_nz_count(const tran_low_t *tcoeffs, int bwl, int height,
static INLINE int get_nz_count(const void *tcoeffs, int bwl, int height,
int row, int col, TX_CLASS tx_class,
const int coeff_is_byte_flag) {
int count = 0;
......
......@@ -70,8 +70,8 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
const int bwl = b_width_log2_lookup[txsize_to_bsize[tx_size]] + 2;
const int height = tx_size_high[tx_size];
int cul_level = 0;
uint8_t levels[64 * 64];
int8_t signs[64 * 64];
uint8_t levels[MAX_TX_SQUARE];
int8_t signs[MAX_TX_SQUARE];
memset(tcoeffs, 0, sizeof(*tcoeffs) * seg_eob);
......
This diff is collapsed.
......@@ -25,6 +25,7 @@ extern "C" {
typedef struct TxbInfo {
tran_low_t *qcoeff;
uint8_t *levels; // absolute values and clamped to 255.
tran_low_t *dqcoeff;
const tran_low_t *tcoeff;
const int16_t *dequant;
......
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