diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-11-18 23:20:18 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-11-19 00:12:47 +0100 |
commit | 6c2f8663090cde1a0085e2ffdf444ce50a27a1a4 (patch) | |
tree | 7c8e7e70a244a47eb19fd16a5ca301f0d0540fef /libavfilter/vf_bm3d.c | |
parent | eae292919b67f6d58f46b6671812bab06b93d803 (diff) | |
download | ffmpeg-6c2f8663090cde1a0085e2ffdf444ce50a27a1a4.tar.gz |
avfilter/vf_bm3d: improve threshold scaling with different block_size and depth
Diffstat (limited to 'libavfilter/vf_bm3d.c')
-rw-r--r-- | libavfilter/vf_bm3d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 2343f2e114..e5d2b8bc63 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -443,7 +443,7 @@ static void basic_block_filtering(BM3DContext *s, const uint8_t *src, int src_li } } - threshold[0] = s->hard_threshold * s->sigma; + threshold[0] = s->hard_threshold * s->sigma * M_SQRT2 * block_size * block_size * (1 << (s->depth - 8)) / 255.f; threshold[1] = threshold[0] * sqrtf(2.f); threshold[2] = threshold[0] * 2.f; threshold[3] = threshold[0] * sqrtf(8.f); |