ffmpeg | branch: release/4.3 | Michael Niedermayer <mich...@niedermayer.cc> | 
Thu Jun 13 00:22:10 2024 +0200| [8e35cb8c2288a6103f000f9d9d821e8fea4253c1] | 
committer: Michael Niedermayer

avfilter/vf_bm3d: Dont round MSE2SSE to an integer

Fixes: CID1439581 Result is not floating-point

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit ec18ec9fc1080c37a02f3709afda5c4b08d4ea89)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e35cb8c2288a6103f000f9d9d821e8fea4253c1
---

 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 e5d2b8bc63..3f8b054d44 100644
--- a/libavfilter/vf_bm3d.c
+++ b/libavfilter/vf_bm3d.c
@@ -279,7 +279,7 @@ static void do_block_matching_multi(BM3DContext *s, const 
uint8_t *src, int src_
                                     int r_y, int r_x, int plane, int jobnr)
 {
     SliceContext *sc = &s->slices[jobnr];
-    double MSE2SSE = s->group_size * s->block_size * s->block_size * src_range 
* src_range / (s->max * s->max);
+    double MSE2SSE = s->group_size * s->block_size * s->block_size * src_range 
* src_range / (double)(s->max * s->max);
     double distMul = 1. / MSE2SSE;
     double th_sse = th_mse * MSE2SSE;
     int i, index = sc->nb_match_blocks;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to