File: statistic-private.patch

package info (click to toggle)
imagemagick 8%3A6.9.11.60%2Bdfsg-1.6%2Bdeb12u4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 79,176 kB
  • sloc: ansic: 349,540; cpp: 21,804; xml: 11,029; perl: 6,417; sh: 5,877; makefile: 3,042; tcl: 459
file content (30 lines) | stat: -rw-r--r-- 968 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Sun, 7 Sep 2025 21:27:45 +0200
Subject: Private alias for easing backport

origin: backport, https://github.com/ImageMagick/ImageMagick/commit/7e5d87fe6e92b6cc3e96d5175974626317512dd9
---
 magick/pixel-accessor.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/magick/pixel-accessor.h b/magick/pixel-accessor.h
index c89ae90..683778b 100644
--- a/magick/pixel-accessor.h
+++ b/magick/pixel-accessor.h
@@ -133,7 +133,15 @@ static inline double PerceptibleReciprocal(const double x)
   if ((sign*x) >= MagickEpsilon)
     return(1.0/x);
   return(sign/MagickEpsilon);
-}   
+}
+
+static inline double MagickSafeReciprocal(const double x)
+{
+  if ((x > -MagickEpsilon) && (x < MagickEpsilon))
+    return(1.0/MagickEpsilon);
+  return(1.0/x);
+}
+
 
 static inline MagickRealType GetPixelLuma(const Image *magick_restrict image,
   const PixelPacket *magick_restrict pixel)