Remove delta_q experimental flag. Change-Id: I52f204000f5fdaf1c6fff63949d72e858ceea462
diff --git a/aomenc.c b/aomenc.c index d3edb12..b167eb3 100644 --- a/aomenc.c +++ b/aomenc.c
@@ -456,7 +456,7 @@ ARG_DEF(NULL, "frame-parallel", 1, "Enable frame parallel decodability features " "(0: false (default), 1: true)"); -#if CONFIG_DELTA_Q && !CONFIG_EXT_DELTA_Q +#if !CONFIG_EXT_DELTA_Q static const arg_def_t aq_mode = ARG_DEF( NULL, "aq-mode", 1, "Adaptive quantization mode (0: off (default), 1: variance 2: complexity, "
diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 8506e0a..9de3757 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h
@@ -467,12 +467,10 @@ #endif // CONFIG_NEW_QUANT /* deringing gain *per-superblock* */ int8_t cdef_strength; -#if CONFIG_DELTA_Q int current_q_index; #if CONFIG_EXT_DELTA_Q int current_delta_lf_from_base; #endif -#endif #if CONFIG_RD_DEBUG RD_STATS rd_stats; int mi_row; @@ -824,7 +822,6 @@ #if CONFIG_GLOBAL_MOTION WarpedMotionParams *global_motion; #endif // CONFIG_GLOBAL_MOTION -#if CONFIG_DELTA_Q int prev_qindex; int delta_qindex; int current_qindex; @@ -838,7 +835,6 @@ int prev_delta_lf_from_base; int current_delta_lf_from_base; #endif -#endif #if CONFIG_ADAPT_SCAN const EobThresholdMD *eob_threshold_md; #endif
diff --git a/av1/common/entropy.c b/av1/common/entropy.c index ac17d89..9219c3b 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c
@@ -2278,12 +2278,10 @@ AVERAGE_TILE_CDFS(partition_cdf) -#if CONFIG_DELTA_Q AVERAGE_TILE_CDFS(delta_q_cdf) #if CONFIG_EXT_DELTA_Q AVERAGE_TILE_CDFS(delta_lf_cdf) #endif -#endif #if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP AVERAGE_TILE_CDFS(intra_filter_cdf) #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 1c792ce..7a8b8d0 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c
@@ -1615,7 +1615,6 @@ #endif // CONFIG_NEW_MULTISYMBOL #endif -#if CONFIG_DELTA_Q static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 }; static const aom_cdf_prob default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = { AOM_ICDF(28160), AOM_ICDF(32120), AOM_ICDF(32677), AOM_ICDF(32768), 0 @@ -1627,7 +1626,6 @@ AOM_ICDF(28160), AOM_ICDF(32120), AOM_ICDF(32677), AOM_ICDF(32768), 0 }; #endif -#endif #if CONFIG_SMOOTH_HV const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3, 6, 4, 5, 8, @@ -5052,14 +5050,12 @@ #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP av1_copy(fc->seg.tree_cdf, default_seg_tree_cdf); av1_copy(fc->tx_size_cdf, default_tx_size_cdf); -#if CONFIG_DELTA_Q av1_copy(fc->delta_q_prob, default_delta_q_probs); av1_copy(fc->delta_q_cdf, default_delta_q_cdf); #if CONFIG_EXT_DELTA_Q av1_copy(fc->delta_lf_prob, default_delta_lf_probs); av1_copy(fc->delta_lf_cdf, default_delta_lf_cdf); #endif -#endif // CONFIG_DELTA_Q #if CONFIG_CFL av1_copy(fc->cfl_sign_cdf, default_cfl_sign_cdf); av1_copy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf); @@ -5303,7 +5299,6 @@ av1_mode_mv_merge_probs(pre_fc->partition_prob[i][PARTITION_HORZ], ct); } #endif -#if CONFIG_DELTA_Q for (i = 0; i < DELTA_Q_PROBS; ++i) fc->delta_q_prob[i] = mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]); @@ -5312,7 +5307,6 @@ fc->delta_lf_prob[i] = mode_mv_merge_probs(pre_fc->delta_lf_prob[i], counts->delta_lf[i]); #endif // CONFIG_EXT_DELTA_Q -#endif #if CONFIG_EXT_INTRA #if CONFIG_INTRA_INTERP for (i = 0; i < INTRA_FILTERS + 1; ++i) {
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h index 38b795d..5118bd3 100644 --- a/av1/common/entropymode.h +++ b/av1/common/entropymode.h
@@ -363,12 +363,10 @@ aom_cdf_prob kf_y_cdf[INTRA_MODES][INTRA_MODES][CDF_SIZE(INTRA_MODES)]; aom_cdf_prob tx_size_cdf[MAX_TX_DEPTH][TX_SIZE_CONTEXTS] [CDF_SIZE(MAX_TX_DEPTH + 1)]; -#if CONFIG_DELTA_Q aom_cdf_prob delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)]; #if CONFIG_EXT_DELTA_Q aom_cdf_prob delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)]; #endif -#endif // CONFIG_DELTA_Q #if CONFIG_EXT_TX aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES] [CDF_SIZE(TX_TYPES)]; @@ -381,12 +379,10 @@ #if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP aom_cdf_prob intra_filter_cdf[INTRA_FILTERS + 1][CDF_SIZE(INTRA_FILTERS)]; #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP -#if CONFIG_DELTA_Q aom_prob delta_q_prob[DELTA_Q_PROBS]; #if CONFIG_EXT_DELTA_Q aom_prob delta_lf_prob[DELTA_LF_PROBS]; #endif -#endif #if CONFIG_PVQ // TODO(any): If PVQ is enabled, most of coefficient related cdf, // such as coef_cdfs[], coef_tail_cdfs[], and coef_heaf_cdfs[] can be removed. @@ -515,12 +511,10 @@ unsigned int intrabc[2]; nmv_context_counts dv; #endif -#if CONFIG_DELTA_Q unsigned int delta_q[DELTA_Q_PROBS][2]; #if CONFIG_EXT_DELTA_Q unsigned int delta_lf[DELTA_LF_PROBS][2]; #endif -#endif #if CONFIG_EXT_TX && CONFIG_RECT_TX unsigned int tx_size_implied[TX_SIZES][TX_SIZES]; #endif // CONFIG_EXT_TX && CONFIG_RECT_TX
diff --git a/av1/common/enums.h b/av1/common/enums.h index 96e6c84..2f6ac83 100644 --- a/av1/common/enums.h +++ b/av1/common/enums.h
@@ -626,7 +626,6 @@ #define SKIP_NEARESTMV_SUB8X8_OFFSET 11 #define INTER_MODE_CONTEXTS 7 -#if CONFIG_DELTA_Q #define DELTA_Q_SMALL 3 #define DELTA_Q_PROBS (DELTA_Q_SMALL) #define DEFAULT_DELTA_Q_RES 4 @@ -635,7 +634,6 @@ #define DELTA_LF_PROBS (DELTA_LF_SMALL) #define DEFAULT_DELTA_LF_RES 2 #endif -#endif /* Segment Feature Masks */ #define MAX_MV_REF_CANDIDATES 2
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h index e162269..b746002 100644 --- a/av1/common/onyxc_int.h +++ b/av1/common/onyxc_int.h
@@ -496,7 +496,6 @@ int cdef_bits; #endif -#if CONFIG_DELTA_Q int delta_q_present_flag; // Resolution of delta quant int delta_q_res; @@ -505,7 +504,6 @@ // Resolution of delta lf level int delta_lf_res; #endif -#endif int num_tg; #if CONFIG_REFERENCE_BUFFER int use_reference_buffer;
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index 100a9e0..2ba6037 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -1768,7 +1768,6 @@ mi_row, mi_col, bsize, cfl->subsampling_x, cfl->subsampling_y); #endif // CONFIG_CFL && CONFIG_CHROMA_SUB8X8 -#if CONFIG_DELTA_Q if (cm->delta_q_present_flag) { int i; for (i = 0; i < MAX_SEGMENTS; i++) { @@ -1790,7 +1789,6 @@ } } } -#endif #if CONFIG_CB4X4 if (mbmi->skip) av1_reset_skip_context(xd, mi_row, mi_col, bsize); @@ -2445,7 +2443,6 @@ set_segment_id_supertx(cm, mi_row, mi_col, bsize); -#if CONFIG_DELTA_Q if (cm->delta_q_present_flag) { for (i = 0; i < MAX_SEGMENTS; i++) { int j; @@ -2460,7 +2457,6 @@ } } } -#endif xd->mi = cm->mi_grid_visible + offset; xd->mi[0] = cm->mi + offset; @@ -5014,7 +5010,6 @@ setup_segmentation(cm, rb); -#if CONFIG_DELTA_Q { struct segmentation *const seg = &cm->seg; int segment_quantizer_active = 0; @@ -5047,10 +5042,10 @@ #endif // CONFIG_EXT_DELTA_Q } } -#endif #if CONFIG_AMVR xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level; #endif + for (i = 0; i < MAX_SEGMENTS; ++i) { const int qindex = cm->seg.enabled ? av1_get_qindex(&cm->seg, i, cm->base_qindex)
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c index a86cf0d..3d72612 100644 --- a/av1/decoder/decodemv.c +++ b/av1/decoder/decodemv.c
@@ -40,7 +40,6 @@ av1_intra_mode_inv[aom_read_symbol(r, cdf, INTRA_MODES, ACCT_STR)]; } -#if CONFIG_DELTA_Q static int read_delta_qindex(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r, MB_MODE_INFO *const mbmi, int mi_col, int mi_row) { FRAME_COUNTS *counts = xd->counts; @@ -118,7 +117,6 @@ return reduced_delta_lflevel; } #endif -#endif static PREDICTION_MODE read_intra_mode_y(FRAME_CONTEXT *ec_ctx, MACROBLOCKD *xd, aom_reader *r, int size_group) { @@ -1100,7 +1098,6 @@ mbmi->segment_id = read_intra_segment_id(cm, xd, mi_offset, x_mis, y_mis, r); mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r); -#if CONFIG_DELTA_Q if (cm->delta_q_present_flag) { xd->current_qindex = xd->prev_qindex + @@ -1118,7 +1115,6 @@ } #endif } -#endif mbmi->ref_frame[0] = INTRA_FRAME; mbmi->ref_frame[1] = NONE_FRAME; @@ -2933,7 +2929,6 @@ #endif // CONFIG_SUPERTX mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r); -#if CONFIG_DELTA_Q if (cm->delta_q_present_flag) { xd->current_qindex = xd->prev_qindex + @@ -2951,7 +2946,6 @@ } #endif } -#endif #if CONFIG_SUPERTX if (!supertx_enabled) {
diff --git a/av1/encoder/av1_quantize.c b/av1/encoder/av1_quantize.c index 6125093..033b4ba 100644 --- a/av1/encoder/av1_quantize.c +++ b/av1/encoder/av1_quantize.c
@@ -1617,7 +1617,6 @@ MACROBLOCKD *const xd = &x->e_mbd; const QUANTS *const quants = &cpi->quants; -#if CONFIG_DELTA_Q #if CONFIG_EXT_DELTA_Q int current_q_index = AOMMAX(0, AOMMIN(QINDEX_RANGE - 1, @@ -1631,9 +1630,6 @@ : cm->base_qindex)); #endif const int qindex = av1_get_qindex(&cm->seg, segment_id, current_q_index); -#else - const int qindex = av1_get_qindex(&cm->seg, segment_id, cm->base_qindex); -#endif const int rdmult = av1_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q); int i; #if CONFIG_AOM_QM
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index c8fa96b..0b5e561 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -514,7 +514,6 @@ #endif #endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION -#if CONFIG_DELTA_Q static void write_delta_qindex(const AV1_COMMON *cm, const MACROBLOCKD *xd, int delta_qindex, aom_writer *w) { int sign = delta_qindex < 0; @@ -562,7 +561,6 @@ } } #endif // CONFIG_EXT_DELTA_Q -#endif // CONFIG_DELTA_Q #if !CONFIG_NEW_MULTISYMBOL static void update_skip_probs(AV1_COMMON *cm, aom_writer *w, @@ -1717,7 +1715,6 @@ #else skip = write_skip(cm, xd, segment_id, mi, w); #endif // CONFIG_SUPERTX -#if CONFIG_DELTA_Q if (cm->delta_q_present_flag) { int super_block_upper_left = ((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0); @@ -1738,7 +1735,6 @@ #endif // CONFIG_EXT_DELTA_Q } } -#endif #if CONFIG_SUPERTX if (!supertx_enabled) @@ -2112,12 +2108,7 @@ #endif // !CONFIG_TXK_SEL } -static void write_mb_modes_kf(AV1_COMMON *cm, -#if CONFIG_DELTA_Q - MACROBLOCKD *xd, -#else - const MACROBLOCKD *xd, -#endif // CONFIG_DELTA_Q +static void write_mb_modes_kf(AV1_COMMON *cm, MACROBLOCKD *xd, #if CONFIG_INTRABC const MB_MODE_INFO_EXT *mbmi_ext, #endif // CONFIG_INTRABC @@ -2141,7 +2132,6 @@ if (seg->update_map) write_segment_id(w, seg, segp, mbmi->segment_id); -#if CONFIG_DELTA_Q const int skip = write_skip(cm, xd, mbmi->segment_id, mi, w); if (cm->delta_q_present_flag) { int super_block_upper_left = @@ -2163,9 +2153,6 @@ #endif // CONFIG_EXT_DELTA_Q } } -#else - write_skip(cm, xd, mbmi->segment_id, mi, w); -#endif int enable_tx_size = cm->tx_mode == TX_MODE_SELECT && #if CONFIG_CB4X4 && (CONFIG_VAR_TX || CONFIG_RECT_TX) @@ -3233,7 +3220,6 @@ #if CONFIG_PVQ assert(cpi->td.mb.pvq_q->curr_pos == 0); #endif -#if CONFIG_DELTA_Q if (cpi->common.delta_q_present_flag) { xd->prev_qindex = cpi->common.base_qindex; #if CONFIG_EXT_DELTA_Q @@ -3242,7 +3228,6 @@ } #endif // CONFIG_EXT_DELTA_Q } -#endif for (mi_row = mi_row_start; mi_row < mi_row_end; mi_row += cm->mib_size) { av1_zero_left_context(xd); @@ -4727,7 +4712,6 @@ encode_loopfilter(cm, wb); encode_quantization(cm, wb); encode_segmentation(cm, xd, wb); -#if CONFIG_DELTA_Q { int i; struct segmentation *const seg = &cm->seg; @@ -4756,7 +4740,6 @@ } } } -#endif #if CONFIG_CDEF if (!cm->all_lossless) { encode_cdef(cm, wb); @@ -5086,7 +5069,6 @@ encode_loopfilter(cm, wb); encode_quantization(cm, wb); encode_segmentation(cm, xd, wb); -#if CONFIG_DELTA_Q { int i; struct segmentation *const seg = &cm->seg; @@ -5115,7 +5097,6 @@ } } } -#endif #if CONFIG_CDEF if (!cm->all_lossless) { encode_cdef(cm, wb);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 15c4a86..c4afad5 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -662,7 +662,7 @@ xd->mi[x_idx + y * mis] = mi_addr; } -#if CONFIG_DELTA_Q && !CONFIG_EXT_DELTA_Q +#if !CONFIG_EXT_DELTA_Q if (cpi->oxcf.aq_mode > NO_AQ && cpi->oxcf.aq_mode < DELTA_AQ) av1_init_plane_quantizers(cpi, x, xd->mi[0]->mbmi.segment_id); #else @@ -1608,7 +1608,6 @@ const BLOCK_SIZE bsize = mbmi->sb_type; FRAME_CONTEXT *fc = xd->tile_ctx; -#if CONFIG_DELTA_Q // delta quant applies to both intra and inter int super_block_upper_left = ((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0); @@ -1637,10 +1636,6 @@ } #endif } -#else - (void)mi_row; - (void)mi_col; -#endif if (!frame_is_intra_only(cm)) { FRAME_COUNTS *const counts = td->counts; RD_COUNTS *rdc = &td->rd_counts; @@ -4525,7 +4520,6 @@ // Initialize the left context for the new SB row av1_zero_left_context(xd); -#if CONFIG_DELTA_Q // Reset delta for every tile if (cm->delta_q_present_flag) if (mi_row == tile_info->mi_row_start) xd->prev_qindex = cm->base_qindex; @@ -4533,7 +4527,6 @@ if (cm->delta_lf_present_flag) if (mi_row == tile_info->mi_row_start) xd->prev_delta_lf_from_base = 0; #endif -#endif // Code each SB in the row for (mi_col = tile_info->mi_col_start; mi_col < tile_info->mi_col_end; @@ -4589,7 +4582,7 @@ #if CONFIG_AMVR xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level; #endif -#if CONFIG_DELTA_Q + if (cm->delta_q_present_flag) { // Test mode for delta quantization int sb_row = mi_row >> 3; @@ -4634,7 +4627,6 @@ } #endif // CONFIG_EXT_DELTA_Q } -#endif // CONFIG_DELTA_Q x->source_variance = UINT_MAX; if (sf->partition_search_type == FIXED_PARTITION || seg_skip) { @@ -5368,7 +5360,6 @@ cm->tx_mode = select_tx_mode(cpi); -#if CONFIG_DELTA_Q // Fix delta q resolution for the moment cm->delta_q_res = DEFAULT_DELTA_Q_RES; // Set delta_q_present_flag before it is used for the first time @@ -5381,7 +5372,6 @@ cm->delta_q_present_flag = cpi->oxcf.aq_mode == DELTA_AQ && cm->base_qindex > 0; #endif // CONFIG_EXT_DELTA_Q -#endif av1_frame_init_quantizer(cpi);
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index 9a057828..8416e25 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -119,7 +119,7 @@ VARIANCE_AQ = 1, COMPLEXITY_AQ = 2, CYCLIC_REFRESH_AQ = 3, -#if CONFIG_DELTA_Q && !CONFIG_EXT_DELTA_Q +#if !CONFIG_EXT_DELTA_Q DELTA_AQ = 4, #endif AQ_MODE_COUNT // This should always be the last member of the enum
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake index 94304da..0333798 100644 --- a/build/cmake/aom_config_defaults.cmake +++ b/build/cmake/aom_config_defaults.cmake
@@ -130,7 +130,6 @@ set(CONFIG_DAALA_TX 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_DCT_ONLY 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_DEBLOCK_13TAP 0 CACHE NUMBER "AV1 experiment flag.") -set(CONFIG_DELTA_Q 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_DEPENDENT_HORZTILES 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_DIST_8X8 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_DPCM_INTRA 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/configure b/configure index a452264..4351a55 100755 --- a/configure +++ b/configure
@@ -303,7 +303,6 @@ chroma_2x2 chroma_sub8x8 frame_size - delta_q ext_delta_q adapt_scan filter_7bit @@ -508,7 +507,6 @@ soft_enable chroma_sub8x8 soft_enable filter_7bit soft_enable reference_buffer - soft_enable delta_q soft_enable rect_tx soft_enable global_motion soft_enable ext_tx @@ -554,7 +552,6 @@ enabled pvq && disable_feature palette_throughput enabled mrc_tx && enable_feature ext_tx enabled mrc_tx && enable_feature var_tx - enabled ext_delta_q && soft_enable delta_q enabled txk_sel && soft_enable lv_map enabled ctx1d && soft_enable lv_map enabled ctx1d && soft_enable ext_tx @@ -573,10 +570,6 @@ enabled cdef_singlepass && enable_feature cdef enabled new_multisymbol && enable_feature restrict_compressed_hdr - if ! enabled delta_q && enabled ext_delta_q; then - log_echo "ext_delta_q requires delta_q, so disabling ext_delta_q" - disable_feature ext_delta_q - fi if enabled rawbits && enabled ans; then log_echo "rawbits requires not ans, so disabling rawbits" disable_feature rawbits
diff --git a/test/aq_segment_test.cc b/test/aq_segment_test.cc index 026b002..57db0d0 100644 --- a/test/aq_segment_test.cc +++ b/test/aq_segment_test.cc
@@ -90,7 +90,7 @@ TEST_P(AqSegmentTestLarge, TestNoMisMatchAQ3) { DoTest(3); } -#if CONFIG_DELTA_Q & !CONFIG_EXT_DELTA_Q +#if !CONFIG_EXT_DELTA_Q // Validate that this AQ mode (AQ=4, delta q) // encodes and decodes without a mismatch. TEST_P(AqSegmentTest, TestNoMisMatchAQ4) {
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c index 5e138ce..04c9cda 100644 --- a/tools/aom_entropy_optimizer.c +++ b/tools/aom_entropy_optimizer.c
@@ -732,8 +732,7 @@ "static const aom_cdf_prob default_intrabc_cdf[CDF_SIZE(2)]"); #endif -/* delta_q experiment */ -#if CONFIG_DELTA_Q + /* delta_q */ cts_each_dim[0] = DELTA_Q_PROBS; cts_each_dim[1] = 2; optimize_entropy_table( @@ -746,7 +745,6 @@ &fc.delta_lf[0][0], probsfile, 2, cts_each_dim, NULL, 1, "static const aom_prob default_delta_lf_probs[DELTA_LF_PROBS]"); #endif -#endif /* Transform type */ #if CONFIG_EXT_TX