Commit 181fc08f authored by Thomas Davies's avatar Thomas Davies

AOM_QM: enable by default

No change to metrics, as quantization matrices are not used
unless --enable-qm=1 is set on the command line.

Fix no highbitdepth compilation, and fix compile errors and
warnings for PVQ and NEW_QUANT experiments.

Change-Id: I49aceb5acf6ca6790c81e760e5b208788f87086d
parent 2cb52baf
......@@ -36,6 +36,14 @@ void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
uint16_t *eob_ptr, const int16_t *scan,
const int16_t *iscan);
void highbd_quantize_b_helper_c(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block,
const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr,
const qm_val_t *iqm_ptr, const int log_scale);
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
......@@ -44,14 +52,6 @@ void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan);
void highbd_quantize_b_helper_c(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block,
const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr,
const qm_val_t *iqm_ptr, const int log_scale);
#endif
void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
......
......@@ -104,16 +104,17 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
TX_SIZE tx_size, TX_TYPE tx_type, const int16_t *dq,
#if CONFIG_NEW_QUANT
dequant_val_type_nuq *dq_val,
#endif // CONFIG_NEW_QUANT
#else
#if CONFIG_AOM_QM
const qm_val_t *iqm[2][TX_SIZES_ALL],
#endif // CONFIG_AOM_QM
#endif // CONFIG_NEW_QUANT
int ctx, const int16_t *scan, const int16_t *nb,
int16_t *max_scan_line, aom_reader *r) {
FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
const int max_eob = tx_size_2d[tx_size];
const int ref = is_inter_block(&xd->mi[0]->mbmi);
#if CONFIG_AOM_QM
#if CONFIG_AOM_QM && !CONFIG_NEW_QUANT
const qm_val_t *iqmatrix = iqm[!ref][tx_size];
#else
(void)tx_type;
......@@ -300,10 +301,11 @@ int av1_decode_block_tokens(AV1_COMMON *cm, MACROBLOCKD *const xd, int plane,
decode_coefs(xd, pd->plane_type, pd->dqcoeff, tx_size, tx_type, dequant,
#if CONFIG_NEW_QUANT
pd->seg_dequant_nuq[seg_id][dq],
#endif // CONFIG_NEW_QUANT
#else
#if CONFIG_AOM_QM
pd->seg_iqmatrix[seg_id],
#endif // CONFIG_AOM_QM
#endif // CONFIG_NEW_QUANT
ctx, sc->scan, sc->neighbors, max_scan_line, r);
av1_set_contexts(xd, pd, plane, tx_size, eob > 0, x, y);
#if CONFIG_ADAPT_SCAN
......
......@@ -483,7 +483,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
TX_TYPE tx_type =
av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
#if CONFIG_AOM_QM || CONFIG_NEW_QUANT
#if (CONFIG_AOM_QM || CONFIG_NEW_QUANT) && !CONFIG_PVQ
const int is_inter = is_inter_block(mbmi);
#endif
......@@ -493,7 +493,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
uint16_t *const eob = &p->eobs[block];
const int diff_stride = block_size_wide[plane_bsize];
#if CONFIG_AOM_QM
#if CONFIG_AOM_QM && !CONFIG_PVQ
int seg_id = mbmi->segment_id;
// Use a flat matrix (i.e. no weighting) for 1D and Identity transforms
const qm_val_t *qmatrix =
......
......@@ -110,7 +110,7 @@ set(CONFIG_ADAPT_SCAN 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_ALTREF2 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_ALT_INTRA 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_ANS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_AOM_QM 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_AOM_QM 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_BGSPRITE 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_CB4X4 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_CDEF 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -521,6 +521,7 @@ post_process_cmdline() {
soft_enable parallel_deblocking
soft_enable rect_intra_pred
soft_enable convolve_round
soft_enable aom_qm
# Backwards/jenkins compatibility with --enable-aom-highbitdepth
enabled aom_highbitdepth && enable_feature highbitdepth
......
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