Rename get_tx_scale to av1_get_tx_scale

BUG=aomedia:443

Change-Id: Iebdb609564c2c3040f3902052afeeec7ae83412d
This commit is contained in:
Jingning Han 2017-04-27 11:32:15 -07:00
Родитель e2db387a5b
Коммит ff70545fed
8 изменённых файлов: 34 добавлений и 34 удалений

Просмотреть файл

@ -20,7 +20,7 @@
#include "av1/common/enums.h"
#include "av1/common/idct.h"
int get_tx_scale(const TX_SIZE tx_size) {
int av1_get_tx_scale(const TX_SIZE tx_size) {
if (txsize_sqr_up_map[tx_size] == TX_32X32) return 1;
#if CONFIG_TX64X64
else if (txsize_sqr_up_map[tx_size] == TX_64X64)

Просмотреть файл

@ -54,7 +54,7 @@ typedef struct {
#endif // CONFIG_HIGHBITDEPTH
#define MAX_TX_SCALE 1
int get_tx_scale(const TX_SIZE tx_size);
int av1_get_tx_scale(const TX_SIZE tx_size);
void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
int eob);

Просмотреть файл

@ -350,7 +350,7 @@ static int av1_pvq_decode_helper(MACROBLOCKD *xd, tran_low_t *ref_coeff,
int off;
const int is_keyframe = 0;
const int has_dc_skip = 1;
int coeff_shift = 3 - get_tx_scale(bs);
int coeff_shift = 3 - av1_get_tx_scale(bs);
int hbd_downshift = 0;
int rounding_mask;
// DC quantizer for PVQ

Просмотреть файл

@ -55,7 +55,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
int c = 0;
int update_eob = -1;
const int16_t *const dequant = xd->plane[plane].seg_dequant[mbmi->segment_id];
const int shift = get_tx_scale(tx_size);
const int shift = av1_get_tx_scale(tx_size);
const int bwl = b_width_log2_lookup[txsize_to_bsize[tx_size]] + 2;
int cul_level = 0;
unsigned int(*nz_map_count)[SIG_COEF_CONTEXTS][2];

Просмотреть файл

@ -137,7 +137,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
#endif
}
dq_shift = get_tx_scale(tx_size);
dq_shift = av1_get_tx_scale(tx_size);
#if CONFIG_NEW_TOKENSET
band = *band_translate++;

Просмотреть файл

@ -206,7 +206,7 @@ void quantize_dc_32x32_nuq(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int rc = 0;
if (quantize_coeff_bigtx_nuq(coeff_ptr[rc], quant, quant_shift, dequant,
cuml_bins_ptr, dequant_val, qcoeff_ptr,
dqcoeff_ptr, get_tx_scale(TX_32X32)))
dqcoeff_ptr, av1_get_tx_scale(TX_32X32)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -226,7 +226,7 @@ void quantize_dc_32x32_fp_nuq(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int rc = 0;
if (quantize_coeff_bigtx_fp_nuq(coeff_ptr[rc], quant, dequant,
cuml_bins_ptr, dequant_val, qcoeff_ptr,
dqcoeff_ptr, get_tx_scale(TX_32X32)))
dqcoeff_ptr, av1_get_tx_scale(TX_32X32)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -247,7 +247,7 @@ void quantize_dc_64x64_nuq(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int rc = 0;
if (quantize_coeff_bigtx_nuq(coeff_ptr[rc], quant, quant_shift, dequant,
cuml_bins_ptr, dequant_val, qcoeff_ptr,
dqcoeff_ptr, get_tx_scale(TX_64X64)))
dqcoeff_ptr, av1_get_tx_scale(TX_64X64)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -267,7 +267,7 @@ void quantize_dc_64x64_fp_nuq(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int rc = 0;
if (quantize_coeff_bigtx_fp_nuq(coeff_ptr[rc], quant, dequant,
cuml_bins_ptr, dequant_val, qcoeff_ptr,
dqcoeff_ptr, get_tx_scale(TX_64X64)))
dqcoeff_ptr, av1_get_tx_scale(TX_64X64)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -340,11 +340,11 @@ void quantize_32x32_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int i;
for (i = 0; i < n_coeffs; i++) {
const int rc = scan[i];
if (quantize_coeff_bigtx_nuq(coeff_ptr[rc], quant_ptr[rc != 0],
quant_shift_ptr[rc != 0],
if (quantize_coeff_bigtx_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], quant_shift_ptr[rc != 0],
dequant_ptr[rc != 0], cuml_bins_ptr[band[i]],
dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_32X32)))
dequant_val[band[i]], &qcoeff_ptr[rc], &dqcoeff_ptr[rc],
av1_get_tx_scale(TX_32X32)))
eob = i;
}
}
@ -369,7 +369,7 @@ void quantize_32x32_fp_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
if (quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], dequant_ptr[rc != 0],
cuml_bins_ptr[band[i]], dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_32X32)))
&dqcoeff_ptr[rc], av1_get_tx_scale(TX_32X32)))
eob = i;
}
}
@ -393,11 +393,11 @@ void quantize_64x64_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int i;
for (i = 0; i < n_coeffs; i++) {
const int rc = scan[i];
if (quantize_coeff_bigtx_nuq(coeff_ptr[rc], quant_ptr[rc != 0],
quant_shift_ptr[rc != 0],
if (quantize_coeff_bigtx_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], quant_shift_ptr[rc != 0],
dequant_ptr[rc != 0], cuml_bins_ptr[band[i]],
dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_64X64)))
dequant_val[band[i]], &qcoeff_ptr[rc], &dqcoeff_ptr[rc],
av1_get_tx_scale(TX_64X64)))
eob = i;
}
}
@ -422,7 +422,7 @@ void quantize_64x64_fp_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
if (quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], dequant_ptr[rc != 0],
cuml_bins_ptr[band[i]], dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_64X64)))
&dqcoeff_ptr[rc], av1_get_tx_scale(TX_64X64)))
eob = i;
}
}
@ -1206,7 +1206,7 @@ void highbd_quantize_32x32_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
coeff_ptr[rc], quant_ptr[rc != 0], quant_shift_ptr[rc != 0],
dequant_ptr[rc != 0], cuml_bins_ptr[band[i]],
dequant_val[band[i]], &qcoeff_ptr[rc], &dqcoeff_ptr[rc],
get_tx_scale(TX_32X32)))
av1_get_tx_scale(TX_32X32)))
eob = i;
}
}
@ -1232,7 +1232,7 @@ void highbd_quantize_32x32_fp_nuq_c(const tran_low_t *coeff_ptr,
if (highbd_quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], dequant_ptr[rc != 0],
cuml_bins_ptr[band[i]], dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_32X32)))
&dqcoeff_ptr[rc], av1_get_tx_scale(TX_32X32)))
eob = i;
}
}
@ -1260,7 +1260,7 @@ void highbd_quantize_64x64_nuq_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
coeff_ptr[rc], quant_ptr[rc != 0], quant_shift_ptr[rc != 0],
dequant_ptr[rc != 0], cuml_bins_ptr[band[i]],
dequant_val[band[i]], &qcoeff_ptr[rc], &dqcoeff_ptr[rc],
get_tx_scale(TX_64X64)))
av1_get_tx_scale(TX_64X64)))
eob = i;
}
}
@ -1286,7 +1286,7 @@ void highbd_quantize_64x64_fp_nuq_c(const tran_low_t *coeff_ptr,
if (highbd_quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant_ptr[rc != 0], dequant_ptr[rc != 0],
cuml_bins_ptr[band[i]], dequant_val[band[i]], &qcoeff_ptr[rc],
&dqcoeff_ptr[rc], get_tx_scale(TX_64X64)))
&dqcoeff_ptr[rc], av1_get_tx_scale(TX_64X64)))
eob = i;
}
}
@ -1331,7 +1331,7 @@ void highbd_quantize_dc_32x32_nuq(
const int rc = 0;
if (highbd_quantize_coeff_bigtx_nuq(
coeff_ptr[rc], quant, quant_shift, dequant, cuml_bins_ptr,
dequant_val, qcoeff_ptr, dqcoeff_ptr, get_tx_scale(TX_32X32)))
dequant_val, qcoeff_ptr, dqcoeff_ptr, av1_get_tx_scale(TX_32X32)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -1349,7 +1349,7 @@ void highbd_quantize_dc_32x32_fp_nuq(
const int rc = 0;
if (highbd_quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant, dequant, cuml_bins_ptr, dequant_val,
qcoeff_ptr, dqcoeff_ptr, get_tx_scale(TX_32X32)))
qcoeff_ptr, dqcoeff_ptr, av1_get_tx_scale(TX_32X32)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -1368,7 +1368,7 @@ void highbd_quantize_dc_64x64_nuq(
const int rc = 0;
if (highbd_quantize_coeff_bigtx_nuq(
coeff_ptr[rc], quant, quant_shift, dequant, cuml_bins_ptr,
dequant_val, qcoeff_ptr, dqcoeff_ptr, get_tx_scale(TX_64X64)))
dequant_val, qcoeff_ptr, dqcoeff_ptr, av1_get_tx_scale(TX_64X64)))
eob = 0;
}
*eob_ptr = eob + 1;
@ -1386,7 +1386,7 @@ void highbd_quantize_dc_64x64_fp_nuq(
const int rc = 0;
if (highbd_quantize_coeff_bigtx_fp_nuq(
coeff_ptr[rc], quant, dequant, cuml_bins_ptr, dequant_val,
qcoeff_ptr, dqcoeff_ptr, get_tx_scale(TX_64X64)))
qcoeff_ptr, dqcoeff_ptr, av1_get_tx_scale(TX_64X64)))
eob = 0;
}
*eob_ptr = eob + 1;

Просмотреть файл

@ -168,7 +168,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
const int16_t *const scan = scan_order->scan;
const int16_t *const nb = scan_order->neighbors;
int dqv;
const int shift = get_tx_scale(tx_size);
const int shift = av1_get_tx_scale(tx_size);
#if CONFIG_AOM_QM
int seg_id = xd->mi[0]->mbmi.segment_id;
const qm_val_t *iqmatrix = pd->seg_iqmatrix[seg_id][!ref][tx_size];
@ -528,7 +528,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
const int16_t *const scan = scan_order->scan;
const int16_t *const nb = scan_order->neighbors;
int dqv;
const int shift = get_tx_scale(tx_size);
const int shift = av1_get_tx_scale(tx_size);
#if CONFIG_AOM_QM
int seg_id = xd->mi[0]->mbmi.segment_id;
const qm_val_t *iqmatrix = pd->seg_iqmatrix[seg_id][!ref][tx_size];
@ -959,7 +959,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
src_diff =
&p->src_diff[(blk_row * diff_stride + blk_col) << tx_size_wide_log2[0]];
qparam.log_scale = get_tx_scale(tx_size);
qparam.log_scale = av1_get_tx_scale(tx_size);
#if CONFIG_NEW_QUANT
qparam.tx_size = tx_size;
qparam.dq = get_dq_profile_from_ctx(x->qindex, ctx, is_inter, plane_type);
@ -1527,7 +1527,7 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(MACROBLOCK *x, tran_low_t *const coeff,
const int tx_blk_size = tx_size_wide[tx_size];
daala_enc_ctx *daala_enc = &x->daala_enc;
PVQ_SKIP_TYPE ac_dc_coded;
int coeff_shift = 3 - get_tx_scale(tx_size);
int coeff_shift = 3 - av1_get_tx_scale(tx_size);
int hbd_downshift = 0;
int rounding_mask;
int pvq_dc_quant;

Просмотреть файл

@ -1348,7 +1348,7 @@ void av1_dist_block(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
// not involve an inverse transform, but it is less accurate.
const int buffer_length = tx_size_2d[tx_size];
int64_t this_sse;
int shift = (MAX_TX_SCALE - get_tx_scale(tx_size)) * 2;
int shift = (MAX_TX_SCALE - av1_get_tx_scale(tx_size)) * 2;
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
#if CONFIG_PVQ