From: Good Guy Date: Wed, 7 Feb 2024 16:06:53 +0000 (-0700) Subject: revert mods made for HDR for out-of-range values greater than (0 - 1.0f) X-Git-Tag: 2024-02~2 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=78863ce9c7fde7ebd29963554c33d89569fd7cdb;p=goodguy%2Fcinelerra.git revert mods made for HDR for out-of-range values greater than (0 - 1.0f) --- diff --git a/cinelerra-5.1/cinelerra/overlayframe.h b/cinelerra-5.1/cinelerra/overlayframe.h index 4775e8df..13c2e4bd 100644 --- a/cinelerra-5.1/cinelerra/overlayframe.h +++ b/cinelerra-5.1/cinelerra/overlayframe.h @@ -32,7 +32,6 @@ #include #include #include -#include #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; diff --git a/cinelerra-5.1/plugins/color3way/color3way.C b/cinelerra-5.1/plugins/color3way/color3way.C index 417b7451..7685257b 100644 --- a/cinelerra-5.1/plugins/color3way/color3way.C +++ b/cinelerra-5.1/plugins/color3way/color3way.C @@ -278,10 +278,10 @@ void Color3WayUnit::process_package(LoadPackage *package) PROCESS(unsigned char, 0xff, 4, 1) break; case BC_RGB_FLOAT: - PROCESS(float, 100.0, 3, 0) + PROCESS(float, 1.0, 3, 0) break; case BC_RGBA_FLOAT: - PROCESS(float, 100.0, 4, 0) + PROCESS(float, 1.0, 4, 0) break; } } diff --git a/cinelerra-5.1/plugins/histogram/histogram.C b/cinelerra-5.1/plugins/histogram/histogram.C index 4b55f429..c78c3c7c 100644 --- a/cinelerra-5.1/plugins/histogram/histogram.C +++ b/cinelerra-5.1/plugins/histogram/histogram.C @@ -234,7 +234,7 @@ float HistogramMain::calculate_level(float input, int mode, int use_value) if( !EQUIV(config.gamma[mode], 0) ) { output = pow(output, 1.0 / config.gamma[mode]); - CLAMP(output, 0, 100.0); + CLAMP(output, 0, 1.0); } // Apply value curve