Message ID | 20201109011229.95262-1-mindmark@gmail.com |
---|---|
State | Accepted |
Commit | e366797ad3caf62a3d049456e50d0e226953fe24 |
Headers | show |
Series | [FFmpeg-devel,1/1] avfilter/vf_lut3d: fix sanitizef INF handling | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Sun, Nov 8, 2020 at 5:12 PM <mindmark@gmail.com> wrote: > From: Mark Reid <mindmark@gmail.com> > > --- > 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; > -- > 2.27.0 > > ping
LGTM On Mon, Nov 9, 2020 at 2:12 AM <mindmark@gmail.com> wrote: > From: Mark Reid <mindmark@gmail.com> > > --- > 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; > -- > 2.27.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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;
From: Mark Reid <mindmark@gmail.com> --- libavfilter/vf_lut3d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)