[FFmpeg-cvslog] avfilter/vf_bm3d: improve threshold scaling with different block_size and depth
Paul B Mahol
git at videolan.org
Tue Nov 19 01:17:15 EET 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 18 23:20:18 2019 +0100| [6c2f8663090cde1a0085e2ffdf444ce50a27a1a4] | committer: Paul B Mahol
avfilter/vf_bm3d: improve threshold scaling with different block_size and depth
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c2f8663090cde1a0085e2ffdf444ce50a27a1a4
---
libavfilter/vf_bm3d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list