aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-13 00:22:10 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-15 01:59:39 +0200
commitec18ec9fc1080c37a02f3709afda5c4b08d4ea89 (patch)
tree005cb87838afa910df9403db1003674a40d58a42
parentffba528bc6367dd8be29312a2afc4c494811b671 (diff)
downloadffmpeg-ec18ec9fc1080c37a02f3709afda5c4b08d4ea89.tar.gz
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 <michael@niedermayer.cc>
-rw-r--r--libavfilter/vf_bm3d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c
index f53a206b51..eb7f6d34d9 100644
--- a/libavfilter/vf_bm3d.c
+++ b/libavfilter/vf_bm3d.c
@@ -274,7 +274,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 index = sc->nb_match_blocks;