Deringing cleanup: remove DERING_REFINEMENT (always on now)
Change-Id: Ic3a6855799be010e69aeab924b013679282ab191
This commit is contained in:
committed by
Yaowu Xu
parent
8455cd9fc1
commit
e874ce0300
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user