revert mods made for HDR for out-of-range values greater than (0 - 1.0f)
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / overlayframe.h
index 4775e8df0004c9f5c2c529c37b779b3b31a7be0a..13c2e4bd0b26b0b5994eea343e02bdd8a4c074be 100644 (file)
@@ -32,7 +32,6 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <float.h>
 
 #define DIRECT_COPY 0
 #define BILINEAR 1
@@ -238,7 +237,7 @@ static inline int64_t aclip(int64_t v, int mx) {
        return v < 0 ? 0 : v > mx ? mx : v;
 }
 static inline float   aclip(float v, float mx) {
-       return v < -FLT_MAX+1 ? -FLT_MAX : v > FLT_MAX-1 ? FLT_MAX : v;
+       return v < 0 ? 0 : v > mx ? mx : v;
 }
 static inline float   aclip(float v, int mx) {
        return v < 0 ? 0 : v > mx ? mx : v;