Skip to content

Commit fd1ec8a

Browse files
authored
convi: ensure double sum precision when multiplying floats (#4418)
1 parent 02e954e commit fd1ec8a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- svgload: add support for custom CSS via stylesheet option [lovell]
1313
- heifload: `unlimited` flag removes all limits (requires libheif 1.19.0+) [lovell]
1414
- heifsave: improve alpha channel detection [lovell]
15+
- convi: ensure double sum precision for floats [lovell]
1516

1617
8.16.1
1718

libvips/convolution/convi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ vips_convi_gen_vector(VipsRegion *out_region,
728728
\
729729
sum = 0; \
730730
for (i = 0; i < nnz; i++) \
731-
sum += t[i] * p[offsets[i]]; \
731+
sum += (double) t[i] * p[offsets[i]]; \
732732
\
733733
sum = (sum / scale) + offset; \
734734
\

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy