Retune CDEF dering threshold adjustment
Change the adjustment range from [50% ... 300%] to [25% ... 100%]. Adjustments above 100% were very rare, and capping the adjustment at 100% adds SIMD optimisation opportunities. And lowering the other end to 25% seems to help compresson slightly. Low latency, used-cpu=0: PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000 -0.0453 | -0.1118 | -0.1127 | -0.0689 | -0.0429 | -0.0814 | -0.0762 High latency, used-cpu=0: PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000 -0.0303 | 0.0583 | 0.1740 | -0.0440 | 0.0033 | -0.0042 | 0.0040 Change-Id: Id999158330a53e8c3383cd0e53a91c7f59fe062a
This commit is contained in:
Родитель
0c966a5098
Коммит
fade4637f3
|
@ -176,14 +176,6 @@ void od_filter_dering_direction_4x4_c(uint16_t *y, int ystride,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This table approximates x^0.16 with the index being log2(x). It is clamped
|
|
||||||
to [-.5, 3]. The table is computed as:
|
|
||||||
round(256*min(3, max(.5, 1.08*(sqrt(2)*2.^([0:17]+8)/256/256).^.16))) */
|
|
||||||
static const int16_t OD_THRESH_TABLE_Q8[18] = {
|
|
||||||
128, 134, 150, 168, 188, 210, 234, 262, 292,
|
|
||||||
327, 365, 408, 455, 509, 569, 635, 710, 768,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Compute deringing filter threshold for an 8x8 block based on the
|
/* Compute deringing filter threshold for an 8x8 block based on the
|
||||||
directional variance difference. A high variance difference means that we
|
directional variance difference. A high variance difference means that we
|
||||||
have a highly directional pattern (e.g. a high contrast edge), so we can
|
have a highly directional pattern (e.g. a high contrast edge), so we can
|
||||||
|
@ -191,10 +183,9 @@ static const int16_t OD_THRESH_TABLE_Q8[18] = {
|
||||||
contrast edge, or a non-directional texture, so we want to be careful not
|
contrast edge, or a non-directional texture, so we want to be careful not
|
||||||
to blur. */
|
to blur. */
|
||||||
static INLINE int od_adjust_thresh(int threshold, int32_t var) {
|
static INLINE int od_adjust_thresh(int threshold, int32_t var) {
|
||||||
int v1;
|
const int i = var >> 6 ? AOMMIN(get_msb(var >> 6), 12) : 0;
|
||||||
/* We use the variance of 8x8 blocks to adjust the threshold. */
|
/* We use the variance of 8x8 blocks to adjust the threshold. */
|
||||||
v1 = OD_MINI(32767, var >> 6);
|
return var ? (threshold * (4 + i) + 8) >> 4 : 0;
|
||||||
return (threshold * OD_THRESH_TABLE_Q8[OD_ILOG(v1)] + 128) >> 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void copy_8x8_16bit_to_16bit_c(uint16_t *dst, int dstride, const uint16_t *src,
|
void copy_8x8_16bit_to_16bit_c(uint16_t *dst, int dstride, const uint16_t *src,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче