[FFmpeg-cvslog] avfilter/vf_lut3d: fix sanitizef INF handling

Mark Reid git at videolan.org
Fri Nov 20 17:02:13 EET 2020


ffmpeg | branch: master | Mark Reid <mindmark at gmail.com> | Sun Nov  8 17:12:29 2020 -0800| [e366797ad3caf62a3d049456e50d0e226953fe24] | committer: Anton Khirnov

avfilter/vf_lut3d: fix sanitizef INF handling

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavfilter/vf_lut3d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
index 988f6c8b55..172d6df0c8 100644
--- a/libavfilter/vf_lut3d.c
+++ b/libavfilter/vf_lut3d.c
@@ -107,7 +107,7 @@ typedef struct ThreadData {
 
 #define EXPONENT_MASK 0x7F800000
 #define MANTISSA_MASK 0x007FFFFF
-#define SIGN_MASK     0x7FFFFFFF
+#define SIGN_MASK     0x80000000
 
 static inline float sanitizef(float f)
 {
@@ -120,7 +120,7 @@ static inline float sanitizef(float f)
             return 0.0f;
         } else if (t.i & SIGN_MASK) {
             // -INF
-            return FLT_MIN;
+            return -FLT_MAX;
         } else {
             // +INF
             return FLT_MAX;



More information about the ffmpeg-cvslog mailing list