diff --git a/av1/common/dering.c b/av1/common/dering.c index 725be2eb1..e9256fc95 100644 --- a/av1/common/dering.c +++ b/av1/common/dering.c @@ -101,15 +101,11 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, for (pli = 0; pli < 3; pli++) { int16_t dst[MAX_MIB_SIZE * MAX_MIB_SIZE * 8 * 8]; int threshold; -#if DERING_REFINEMENT level = compute_level_from_index( global_level, cm->mi_grid_visible[MAX_MIB_SIZE * sbr * cm->mi_stride + MAX_MIB_SIZE * sbc] ->mbmi.dering_gain); -#else - level = global_level; -#endif /* FIXME: This is a temporary hack that uses more conservative deringing for chroma. */ if (pli) level = (level * 5 + 4) >> 3; diff --git a/av1/common/dering.h b/av1/common/dering.h index 2c1efd766..7c93f8bb3 100644 --- a/av1/common/dering.h +++ b/av1/common/dering.h @@ -24,7 +24,6 @@ extern "C" { #define DERING_LEVEL_BITS 6 #define MAX_DERING_LEVEL (1 << DERING_LEVEL_BITS) -#define DERING_REFINEMENT 1 #define DERING_REFINEMENT_BITS 2 #define DERING_REFINEMENT_LEVELS 4 diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index b76000ba0..e1bbe24f9 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c @@ -1772,7 +1772,7 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd, if (bsize >= BLOCK_8X8 && (bsize == BLOCK_8X8 || partition != PARTITION_SPLIT)) dec_update_partition_context(xd, mi_row, mi_col, subsize, num_8x8_wh); -#if DERING_REFINEMENT +#if CONFIG_DERING if (bsize == BLOCK_64X64) { if (cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { cm->mi_grid_visible[mi_row * cm->mi_stride + mi_col]->mbmi.dering_gain = @@ -1782,7 +1782,7 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd, 0; } } -#endif // DERGING_REFINEMENT +#endif #endif // CONFIG_EXT_PARTITION_TYPES } diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index 4e91a9e90..91eeeaa87 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c @@ -1872,7 +1872,7 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile, (bsize == BLOCK_8X8 || partition != PARTITION_SPLIT)) update_partition_context(xd, mi_row, mi_col, subsize, bsize); -#if DERING_REFINEMENT +#if CONFIG_DERING if (bsize == BLOCK_64X64 && cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { aom_write_literal( diff --git a/av1/encoder/pickdering.c b/av1/encoder/pickdering.c index 952e36b85..0b9f2f278 100644 --- a/av1/encoder/pickdering.c +++ b/av1/encoder/pickdering.c @@ -118,7 +118,6 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, } } } -#if DERING_REFINEMENT best_level = 0; /* Search for the best global level one value at a time. */ for (global_level = 2; global_level < MAX_DERING_LEVEL; global_level++) { @@ -161,12 +160,6 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, ->mbmi.dering_gain = best_gi; } } -#else - best_level = 0; - for (level = 0; level < MAX_DERING_LEVEL; level++) { - if (tot_mse[level] < tot_mse[best_level]) best_level = level; - } -#endif aom_free(src); aom_free(ref_coeff); aom_free(bskip);