Commit 3ab20b45 authored by Thomas Davies's avatar Thomas Davies Committed by Fred BARBIER

Remove delta_q experimental flag.

Change-Id: I52f204000f5fdaf1c6fff63949d72e858ceea462
parent e4a2de0e
...@@ -456,7 +456,7 @@ static const arg_def_t frame_parallel_decoding = ...@@ -456,7 +456,7 @@ static const arg_def_t frame_parallel_decoding =
ARG_DEF(NULL, "frame-parallel", 1, ARG_DEF(NULL, "frame-parallel", 1,
"Enable frame parallel decodability features " "Enable frame parallel decodability features "
"(0: false (default), 1: true)"); "(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( static const arg_def_t aq_mode = ARG_DEF(
NULL, "aq-mode", 1, NULL, "aq-mode", 1,
"Adaptive quantization mode (0: off (default), 1: variance 2: complexity, " "Adaptive quantization mode (0: off (default), 1: variance 2: complexity, "
......
...@@ -467,12 +467,10 @@ typedef struct MB_MODE_INFO { ...@@ -467,12 +467,10 @@ typedef struct MB_MODE_INFO {
#endif // CONFIG_NEW_QUANT #endif // CONFIG_NEW_QUANT
/* deringing gain *per-superblock* */ /* deringing gain *per-superblock* */
int8_t cdef_strength; int8_t cdef_strength;
#if CONFIG_DELTA_Q
int current_q_index; int current_q_index;
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
int current_delta_lf_from_base; int current_delta_lf_from_base;
#endif #endif
#endif
#if CONFIG_RD_DEBUG #if CONFIG_RD_DEBUG
RD_STATS rd_stats; RD_STATS rd_stats;
int mi_row; int mi_row;
...@@ -824,7 +822,6 @@ typedef struct macroblockd { ...@@ -824,7 +822,6 @@ typedef struct macroblockd {
#if CONFIG_GLOBAL_MOTION #if CONFIG_GLOBAL_MOTION
WarpedMotionParams *global_motion; WarpedMotionParams *global_motion;
#endif // CONFIG_GLOBAL_MOTION #endif // CONFIG_GLOBAL_MOTION
#if CONFIG_DELTA_Q
int prev_qindex; int prev_qindex;
int delta_qindex; int delta_qindex;
int current_qindex; int current_qindex;
...@@ -838,7 +835,6 @@ typedef struct macroblockd { ...@@ -838,7 +835,6 @@ typedef struct macroblockd {
int prev_delta_lf_from_base; int prev_delta_lf_from_base;
int current_delta_lf_from_base; int current_delta_lf_from_base;
#endif #endif
#endif
#if CONFIG_ADAPT_SCAN #if CONFIG_ADAPT_SCAN
const EobThresholdMD *eob_threshold_md; const EobThresholdMD *eob_threshold_md;
#endif #endif
......
...@@ -2278,12 +2278,10 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], ...@@ -2278,12 +2278,10 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
AVERAGE_TILE_CDFS(partition_cdf) AVERAGE_TILE_CDFS(partition_cdf)
#if CONFIG_DELTA_Q
AVERAGE_TILE_CDFS(delta_q_cdf) AVERAGE_TILE_CDFS(delta_q_cdf)
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
AVERAGE_TILE_CDFS(delta_lf_cdf) AVERAGE_TILE_CDFS(delta_lf_cdf)
#endif #endif
#endif
#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP #if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
AVERAGE_TILE_CDFS(intra_filter_cdf) AVERAGE_TILE_CDFS(intra_filter_cdf)
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
......
...@@ -1615,7 +1615,6 @@ static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = { ...@@ -1615,7 +1615,6 @@ static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = {
#endif // CONFIG_NEW_MULTISYMBOL #endif // CONFIG_NEW_MULTISYMBOL
#endif #endif
#if CONFIG_DELTA_Q
static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 }; 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)] = { 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 AOM_ICDF(28160), AOM_ICDF(32120), AOM_ICDF(32677), AOM_ICDF(32768), 0
...@@ -1627,7 +1626,6 @@ static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = { ...@@ -1627,7 +1626,6 @@ static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = {
AOM_ICDF(28160), AOM_ICDF(32120), AOM_ICDF(32677), AOM_ICDF(32768), 0 AOM_ICDF(28160), AOM_ICDF(32120), AOM_ICDF(32677), AOM_ICDF(32768), 0
}; };
#endif #endif
#endif
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3, 6, 4, 5, 8, const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3, 6, 4, 5, 8,
...@@ -5052,14 +5050,12 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -5052,14 +5050,12 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
av1_copy(fc->seg.tree_cdf, default_seg_tree_cdf); av1_copy(fc->seg.tree_cdf, default_seg_tree_cdf);
av1_copy(fc->tx_size_cdf, default_tx_size_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_prob, default_delta_q_probs);
av1_copy(fc->delta_q_cdf, default_delta_q_cdf); av1_copy(fc->delta_q_cdf, default_delta_q_cdf);
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
av1_copy(fc->delta_lf_prob, default_delta_lf_probs); av1_copy(fc->delta_lf_prob, default_delta_lf_probs);
av1_copy(fc->delta_lf_cdf, default_delta_lf_cdf); av1_copy(fc->delta_lf_cdf, default_delta_lf_cdf);
#endif #endif
#endif // CONFIG_DELTA_Q
#if CONFIG_CFL #if CONFIG_CFL
av1_copy(fc->cfl_sign_cdf, default_cfl_sign_cdf); av1_copy(fc->cfl_sign_cdf, default_cfl_sign_cdf);
av1_copy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf); av1_copy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf);
...@@ -5303,7 +5299,6 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) { ...@@ -5303,7 +5299,6 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) {
av1_mode_mv_merge_probs(pre_fc->partition_prob[i][PARTITION_HORZ], ct); av1_mode_mv_merge_probs(pre_fc->partition_prob[i][PARTITION_HORZ], ct);
} }
#endif #endif
#if CONFIG_DELTA_Q
for (i = 0; i < DELTA_Q_PROBS; ++i) for (i = 0; i < DELTA_Q_PROBS; ++i)
fc->delta_q_prob[i] = fc->delta_q_prob[i] =
mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]); mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]);
...@@ -5312,7 +5307,6 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) { ...@@ -5312,7 +5307,6 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) {
fc->delta_lf_prob[i] = fc->delta_lf_prob[i] =
mode_mv_merge_probs(pre_fc->delta_lf_prob[i], counts->delta_lf[i]); mode_mv_merge_probs(pre_fc->delta_lf_prob[i], counts->delta_lf[i]);
#endif // CONFIG_EXT_DELTA_Q #endif // CONFIG_EXT_DELTA_Q
#endif
#if CONFIG_EXT_INTRA #if CONFIG_EXT_INTRA
#if CONFIG_INTRA_INTERP #if CONFIG_INTRA_INTERP
for (i = 0; i < INTRA_FILTERS + 1; ++i) { for (i = 0; i < INTRA_FILTERS + 1; ++i) {
......
...@@ -363,12 +363,10 @@ typedef struct frame_contexts { ...@@ -363,12 +363,10 @@ typedef struct frame_contexts {
aom_cdf_prob kf_y_cdf[INTRA_MODES][INTRA_MODES][CDF_SIZE(INTRA_MODES)]; 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] aom_cdf_prob tx_size_cdf[MAX_TX_DEPTH][TX_SIZE_CONTEXTS]
[CDF_SIZE(MAX_TX_DEPTH + 1)]; [CDF_SIZE(MAX_TX_DEPTH + 1)];
#if CONFIG_DELTA_Q
aom_cdf_prob delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)]; aom_cdf_prob delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)];
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
aom_cdf_prob delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)]; aom_cdf_prob delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)];
#endif #endif
#endif // CONFIG_DELTA_Q
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES] aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
[CDF_SIZE(TX_TYPES)]; [CDF_SIZE(TX_TYPES)];
...@@ -381,12 +379,10 @@ typedef struct frame_contexts { ...@@ -381,12 +379,10 @@ typedef struct frame_contexts {
#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP #if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
aom_cdf_prob intra_filter_cdf[INTRA_FILTERS + 1][CDF_SIZE(INTRA_FILTERS)]; aom_cdf_prob intra_filter_cdf[INTRA_FILTERS + 1][CDF_SIZE(INTRA_FILTERS)];
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#if CONFIG_DELTA_Q
aom_prob delta_q_prob[DELTA_Q_PROBS]; aom_prob delta_q_prob[DELTA_Q_PROBS];
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
aom_prob delta_lf_prob[DELTA_LF_PROBS]; aom_prob delta_lf_prob[DELTA_LF_PROBS];
#endif #endif
#endif
#if CONFIG_PVQ #if CONFIG_PVQ
// TODO(any): If PVQ is enabled, most of coefficient related cdf, // 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. // such as coef_cdfs[], coef_tail_cdfs[], and coef_heaf_cdfs[] can be removed.
...@@ -515,12 +511,10 @@ typedef struct FRAME_COUNTS { ...@@ -515,12 +511,10 @@ typedef struct FRAME_COUNTS {
unsigned int intrabc[2]; unsigned int intrabc[2];
nmv_context_counts dv; nmv_context_counts dv;
#endif #endif
#if CONFIG_DELTA_Q
unsigned int delta_q[DELTA_Q_PROBS][2]; unsigned int delta_q[DELTA_Q_PROBS][2];
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
unsigned int delta_lf[DELTA_LF_PROBS][2]; unsigned int delta_lf[DELTA_LF_PROBS][2];
#endif #endif
#endif
#if CONFIG_EXT_TX && CONFIG_RECT_TX #if CONFIG_EXT_TX && CONFIG_RECT_TX
unsigned int tx_size_implied[TX_SIZES][TX_SIZES]; unsigned int tx_size_implied[TX_SIZES][TX_SIZES];
#endif // CONFIG_EXT_TX && CONFIG_RECT_TX #endif // CONFIG_EXT_TX && CONFIG_RECT_TX
......
...@@ -626,7 +626,6 @@ typedef enum { ...@@ -626,7 +626,6 @@ typedef enum {
#define SKIP_NEARESTMV_SUB8X8_OFFSET 11 #define SKIP_NEARESTMV_SUB8X8_OFFSET 11
#define INTER_MODE_CONTEXTS 7 #define INTER_MODE_CONTEXTS 7
#if CONFIG_DELTA_Q
#define DELTA_Q_SMALL 3 #define DELTA_Q_SMALL 3
#define DELTA_Q_PROBS (DELTA_Q_SMALL) #define DELTA_Q_PROBS (DELTA_Q_SMALL)
#define DEFAULT_DELTA_Q_RES 4 #define DEFAULT_DELTA_Q_RES 4
...@@ -635,7 +634,6 @@ typedef enum { ...@@ -635,7 +634,6 @@ typedef enum {
#define DELTA_LF_PROBS (DELTA_LF_SMALL) #define DELTA_LF_PROBS (DELTA_LF_SMALL)
#define DEFAULT_DELTA_LF_RES 2 #define DEFAULT_DELTA_LF_RES 2
#endif #endif
#endif
/* Segment Feature Masks */ /* Segment Feature Masks */
#define MAX_MV_REF_CANDIDATES 2 #define MAX_MV_REF_CANDIDATES 2
......
...@@ -496,7 +496,6 @@ typedef struct AV1Common { ...@@ -496,7 +496,6 @@ typedef struct AV1Common {
int cdef_bits; int cdef_bits;
#endif #endif
#if CONFIG_DELTA_Q
int delta_q_present_flag; int delta_q_present_flag;
// Resolution of delta quant // Resolution of delta quant
int delta_q_res; int delta_q_res;
...@@ -504,7 +503,6 @@ typedef struct AV1Common { ...@@ -504,7 +503,6 @@ typedef struct AV1Common {
int delta_lf_present_flag; int delta_lf_present_flag;
// Resolution of delta lf level // Resolution of delta lf level
int delta_lf_res; int delta_lf_res;
#endif
#endif #endif
int num_tg; int num_tg;
#if CONFIG_REFERENCE_BUFFER #if CONFIG_REFERENCE_BUFFER
......
...@@ -1768,7 +1768,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi, ...@@ -1768,7 +1768,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
mi_row, mi_col, bsize, cfl->subsampling_x, cfl->subsampling_y); mi_row, mi_col, bsize, cfl->subsampling_x, cfl->subsampling_y);
#endif // CONFIG_CFL && CONFIG_CHROMA_SUB8X8 #endif // CONFIG_CFL && CONFIG_CHROMA_SUB8X8
#if CONFIG_DELTA_Q
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
int i; int i;
for (i = 0; i < MAX_SEGMENTS; i++) { for (i = 0; i < MAX_SEGMENTS; i++) {
...@@ -1790,7 +1789,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi, ...@@ -1790,7 +1789,6 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
} }
} }
} }
#endif
#if CONFIG_CB4X4 #if CONFIG_CB4X4
if (mbmi->skip) av1_reset_skip_context(xd, mi_row, mi_col, bsize); if (mbmi->skip) av1_reset_skip_context(xd, mi_row, mi_col, bsize);
...@@ -2445,7 +2443,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd, ...@@ -2445,7 +2443,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
set_segment_id_supertx(cm, mi_row, mi_col, bsize); set_segment_id_supertx(cm, mi_row, mi_col, bsize);
#if CONFIG_DELTA_Q
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
for (i = 0; i < MAX_SEGMENTS; i++) { for (i = 0; i < MAX_SEGMENTS; i++) {
int j; int j;
...@@ -2460,7 +2457,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd, ...@@ -2460,7 +2457,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
} }
} }
} }
#endif
xd->mi = cm->mi_grid_visible + offset; xd->mi = cm->mi_grid_visible + offset;
xd->mi[0] = cm->mi + offset; xd->mi[0] = cm->mi + offset;
...@@ -5014,7 +5010,6 @@ static size_t read_uncompressed_header(AV1Decoder *pbi, ...@@ -5014,7 +5010,6 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
setup_segmentation(cm, rb); setup_segmentation(cm, rb);
#if CONFIG_DELTA_Q
{ {
struct segmentation *const seg = &cm->seg; struct segmentation *const seg = &cm->seg;
int segment_quantizer_active = 0; int segment_quantizer_active = 0;
...@@ -5047,10 +5042,10 @@ static size_t read_uncompressed_header(AV1Decoder *pbi, ...@@ -5047,10 +5042,10 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#endif // CONFIG_EXT_DELTA_Q #endif // CONFIG_EXT_DELTA_Q
} }
} }
#endif
#if CONFIG_AMVR #if CONFIG_AMVR
xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level; xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level;
#endif #endif
for (i = 0; i < MAX_SEGMENTS; ++i) { for (i = 0; i < MAX_SEGMENTS; ++i) {
const int qindex = cm->seg.enabled const int qindex = cm->seg.enabled
? av1_get_qindex(&cm->seg, i, cm->base_qindex) ? av1_get_qindex(&cm->seg, i, cm->base_qindex)
......
...@@ -40,7 +40,6 @@ static PREDICTION_MODE read_intra_mode(aom_reader *r, aom_cdf_prob *cdf) { ...@@ -40,7 +40,6 @@ static PREDICTION_MODE read_intra_mode(aom_reader *r, aom_cdf_prob *cdf) {
av1_intra_mode_inv[aom_read_symbol(r, cdf, INTRA_MODES, ACCT_STR)]; 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, static int read_delta_qindex(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r,
MB_MODE_INFO *const mbmi, int mi_col, int mi_row) { MB_MODE_INFO *const mbmi, int mi_col, int mi_row) {
FRAME_COUNTS *counts = xd->counts; FRAME_COUNTS *counts = xd->counts;
...@@ -118,7 +117,6 @@ static int read_delta_lflevel(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r, ...@@ -118,7 +117,6 @@ static int read_delta_lflevel(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r,
return reduced_delta_lflevel; return reduced_delta_lflevel;
} }
#endif #endif
#endif
static PREDICTION_MODE read_intra_mode_y(FRAME_CONTEXT *ec_ctx, MACROBLOCKD *xd, static PREDICTION_MODE read_intra_mode_y(FRAME_CONTEXT *ec_ctx, MACROBLOCKD *xd,
aom_reader *r, int size_group) { aom_reader *r, int size_group) {
...@@ -1100,7 +1098,6 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm, ...@@ -1100,7 +1098,6 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
mbmi->segment_id = read_intra_segment_id(cm, xd, mi_offset, x_mis, y_mis, r); 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); mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
#if CONFIG_DELTA_Q
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
xd->current_qindex = xd->current_qindex =
xd->prev_qindex + xd->prev_qindex +
...@@ -1118,7 +1115,6 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm, ...@@ -1118,7 +1115,6 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
} }
#endif #endif
} }
#endif
mbmi->ref_frame[0] = INTRA_FRAME; mbmi->ref_frame[0] = INTRA_FRAME;
mbmi->ref_frame[1] = NONE_FRAME; mbmi->ref_frame[1] = NONE_FRAME;
...@@ -2933,7 +2929,6 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi, ...@@ -2933,7 +2929,6 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
#endif // CONFIG_SUPERTX #endif // CONFIG_SUPERTX
mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r); mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
#if CONFIG_DELTA_Q
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
xd->current_qindex = xd->current_qindex =
xd->prev_qindex + xd->prev_qindex +
...@@ -2951,7 +2946,6 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi, ...@@ -2951,7 +2946,6 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
} }
#endif #endif
} }
#endif
#if CONFIG_SUPERTX #if CONFIG_SUPERTX
if (!supertx_enabled) { if (!supertx_enabled) {
......
...@@ -1617,7 +1617,6 @@ void av1_init_plane_quantizers(const AV1_COMP *cpi, MACROBLOCK *x, ...@@ -1617,7 +1617,6 @@ void av1_init_plane_quantizers(const AV1_COMP *cpi, MACROBLOCK *x,
MACROBLOCKD *const xd = &x->e_mbd; MACROBLOCKD *const xd = &x->e_mbd;
const QUANTS *const quants = &cpi->quants; const QUANTS *const quants = &cpi->quants;
#if CONFIG_DELTA_Q
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
int current_q_index = int current_q_index =
AOMMAX(0, AOMMIN(QINDEX_RANGE - 1, AOMMAX(0, AOMMIN(QINDEX_RANGE - 1,
...@@ -1631,9 +1630,6 @@ void av1_init_plane_quantizers(const AV1_COMP *cpi, MACROBLOCK *x, ...@@ -1631,9 +1630,6 @@ void av1_init_plane_quantizers(const AV1_COMP *cpi, MACROBLOCK *x,
: cm->base_qindex)); : cm->base_qindex));
#endif #endif
const int qindex = av1_get_qindex(&cm->seg, segment_id, current_q_index); 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); const int rdmult = av1_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q);
int i; int i;
#if CONFIG_AOM_QM #if CONFIG_AOM_QM
......
...@@ -514,7 +514,6 @@ static void write_ncobmc_mode(MACROBLOCKD *xd, const MODE_INFO *mi, ...@@ -514,7 +514,6 @@ static void write_ncobmc_mode(MACROBLOCKD *xd, const MODE_INFO *mi,
#endif #endif
#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION #endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
#if CONFIG_DELTA_Q
static void write_delta_qindex(const AV1_COMMON *cm, const MACROBLOCKD *xd, static void write_delta_qindex(const AV1_COMMON *cm, const MACROBLOCKD *xd,
int delta_qindex, aom_writer *w) { int delta_qindex, aom_writer *w) {
int sign = delta_qindex < 0; int sign = delta_qindex < 0;
...@@ -562,7 +561,6 @@ static void write_delta_lflevel(const AV1_COMMON *cm, const MACROBLOCKD *xd, ...@@ -562,7 +561,6 @@ static void write_delta_lflevel(const AV1_COMMON *cm, const MACROBLOCKD *xd,
} }
} }
#endif // CONFIG_EXT_DELTA_Q #endif // CONFIG_EXT_DELTA_Q
#endif // CONFIG_DELTA_Q
#if !CONFIG_NEW_MULTISYMBOL #if !CONFIG_NEW_MULTISYMBOL
static void update_skip_probs(AV1_COMMON *cm, aom_writer *w, static void update_skip_probs(AV1_COMMON *cm, aom_writer *w,
...@@ -1717,7 +1715,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row, ...@@ -1717,7 +1715,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#else #else
skip = write_skip(cm, xd, segment_id, mi, w); skip = write_skip(cm, xd, segment_id, mi, w);
#endif // CONFIG_SUPERTX #endif // CONFIG_SUPERTX
#if CONFIG_DELTA_Q
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
int super_block_upper_left = int super_block_upper_left =
((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0); ((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0);
...@@ -1738,7 +1735,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row, ...@@ -1738,7 +1735,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#endif // CONFIG_EXT_DELTA_Q #endif // CONFIG_EXT_DELTA_Q
} }
} }
#endif
#if CONFIG_SUPERTX #if CONFIG_SUPERTX
if (!supertx_enabled) if (!supertx_enabled)
...@@ -2112,12 +2108,7 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row, ...@@ -2112,12 +2108,7 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#endif // !CONFIG_TXK_SEL #endif // !CONFIG_TXK_SEL
} }
static void write_mb_modes_kf(AV1_COMMON *cm, static void write_mb_modes_kf(AV1_COMMON *cm, MACROBLOCKD *xd,
#if CONFIG_DELTA_Q
MACROBLOCKD *xd,
#else
const MACROBLOCKD *xd,
#endif // CONFIG_DELTA_Q
#if CONFIG_INTRABC #if CONFIG_INTRABC
const MB_MODE_INFO_EXT *mbmi_ext, const MB_MODE_INFO_EXT *mbmi_ext,
#endif // CONFIG_INTRABC #endif // CONFIG_INTRABC
...@@ -2141,7 +2132,6 @@ static void write_mb_modes_kf(AV1_COMMON *cm, ...@@ -2141,7 +2132,6 @@ static void write_mb_modes_kf(AV1_COMMON *cm,
if (seg->update_map) write_segment_id(w, seg, segp, mbmi->segment_id); 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); const int skip = write_skip(cm, xd, mbmi->segment_id, mi, w);
if (cm->delta_q_present_flag) { if (cm->delta_q_present_flag) {
int super_block_upper_left = int super_block_upper_left =
...@@ -2163,9 +2153,6 @@ static void write_mb_modes_kf(AV1_COMMON *cm, ...@@ -2163,9 +2153,6 @@ static void write_mb_modes_kf(AV1_COMMON *cm,
#endif // CONFIG_EXT_DELTA_Q #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 && int enable_tx_size = cm->tx_mode == TX_MODE_SELECT &&
#if CONFIG_CB4X4 && (CONFIG_VAR_TX || CONFIG_RECT_TX) #if CONFIG_CB4X4 && (CONFIG_VAR_TX || CONFIG_RECT_TX)
...@@ -3233,7 +3220,6 @@ static void write_modes(AV1_COMP *const cpi, const TileInfo *const tile, ...@@ -3233,7 +3220,6 @@ static void write_modes(AV1_COMP *const cpi, const TileInfo *const tile,
#if CONFIG_PVQ #if CONFIG_PVQ
assert(cpi->td.mb.pvq_q->curr_pos == 0); assert(cpi->td.mb.pvq_q->curr_pos == 0);
#endif #endif
#if CONFIG_DELTA_Q
if (cpi->common.delta_q_present_flag) { if (cpi->common.delta_q_present_flag) {
xd->prev_qindex = cpi->common.base_qindex; xd->prev_qindex = cpi->common.base_qindex;
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
...@@ -3242,7 +3228,6 @@ static void write_modes(AV1_COMP *const cpi, const TileInfo *const tile, ...@@ -3242,7 +3228,6 @@ static void write_modes(AV1_COMP *const cpi, const TileInfo *const tile,
} }
#endif // CONFIG_EXT_DELTA_Q #endif // CONFIG_EXT_DELTA_Q
} }
#endif
for (mi_row = mi_row_start; mi_row < mi_row_end; mi_row += cm->mib_size) { for (mi_row = mi_row_start; mi_row < mi_row_end; mi_row += cm->mib_size) {
av1_zero_left_context(xd); av1_zero_left_context(xd);
...@@ -4727,7 +4712,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi, ...@@ -4727,7 +4712,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
encode_loopfilter(cm, wb); encode_loopfilter(cm, wb);
encode_quantization(cm, wb); encode_quantization(cm, wb);
encode_segmentation(cm, xd, wb); encode_segmentation(cm, xd, wb);
#if CONFIG_DELTA_Q
{ {
int i; int i;
struct segmentation *const seg = &cm->seg; struct segmentation *const seg = &cm->seg;
...@@ -4756,7 +4740,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi, ...@@ -4756,7 +4740,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
} }
} }
} }
#endif
#if CONFIG_CDEF #if CONFIG_CDEF
if (!cm->all_lossless) { if (!cm->all_lossless) {
encode_cdef(cm, wb); encode_cdef(cm, wb);
...@@ -5086,7 +5069,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi, ...@@ -5086,7 +5069,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
encode_loopfilter(cm, wb); encode_loopfilter(cm, wb);
encode_quantization(cm, wb); encode_quantization(cm, wb);
encode_segmentation(cm, xd, wb); encode_segmentation(cm, xd, wb);
#if CONFIG_DELTA_Q
{ {
int i; int i;
struct segmentation *const seg = &cm->seg; struct segmentation *const seg = &cm->seg;
...@@ -5115,7 +5097,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi, ...@@ -5115,7 +5097,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
} }
} }
} }
#endif
#if CONFIG_CDEF #if CONFIG_CDEF
if (!cm->all_lossless) { if (!cm->all_lossless) {
encode_cdef(cm, wb); encode_cdef(cm, wb);
......
...@@ -662,7 +662,7 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td, ...@@ -662,7 +662,7 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td,
xd->mi[x_idx + y * mis] = mi_addr; 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) 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); av1_init_plane_quantizers(cpi, x, xd->mi[0]->mbmi.segment_id);
#else #else
...@@ -1608,7 +1608,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row, ...@@ -1608,7 +1608,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
const BLOCK_SIZE bsize = mbmi->sb_type; const BLOCK_SIZE bsize = mbmi->sb_type;
FRAME_CONTEXT *fc = xd->tile_ctx; FRAME_CONTEXT *fc = xd->tile_ctx;
#if CONFIG_DELTA_Q
// delta quant applies to both intra and inter // delta quant applies to both intra and inter
int super_block_upper_left = int super_block_upper_left =
((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0); ((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0);
...@@ -1637,10 +1636,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row, ...@@ -1637,10 +1636,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
} }
#endif #endif
} }
#else
(void)mi_row;
(void)mi_col;
#endif
if (!frame_is_intra_only(cm)) { if (!frame_is_intra_only(cm)) {
FRAME_COUNTS *const counts = td->counts; FRAME_COUNTS *const counts = td->counts;
RD_COUNTS *rdc = &td->rd_counts; RD_COUNTS *rdc = &td->rd_counts;
...@@ -4525,14 +4520,12 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td, ...@@ -4525,14 +4520,12 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
// Initialize the left context for the new SB row // Initialize the left context for the new SB row
av1_zero_left_context(xd); av1_zero_left_context(xd);
#if CONFIG_DELTA_Q
// Reset delta for every tile // Reset delta for every tile
if (cm->delta_q_present_flag) if (cm->delta_q_present_flag)
if (mi_row == tile_info->mi_row_start) xd->prev_qindex = cm->base_qindex; if (mi_row == tile_info->mi_row_start) xd->prev_qindex = cm->base_qindex;
#if CONFIG_EXT_DELTA_Q #if CONFIG_EXT_DELTA_Q
if (cm->delta_lf_present_flag) if (cm->delta_lf_present_flag)
if (mi_row == tile_info->mi_row_start) xd->prev_delta_lf_from_base = 0; if (mi_row == tile_info->mi_row_start) xd->