Author: post
Date: 2009-12-31 02:12:07 +0100 (Thu, 31 Dec 2009)
New Revision: 2934

Modified:
   branches/rawstudio-ng-color/plugins/dcp/dcp-sse.c
   branches/rawstudio-ng-color/plugins/dcp/dcp.c
Log:
Don't clamp to 1.0 after exposure, before contrast.

Modified: branches/rawstudio-ng-color/plugins/dcp/dcp-sse.c
===================================================================
--- branches/rawstudio-ng-color/plugins/dcp/dcp-sse.c   2009-12-31 00:52:35 UTC 
(rev 2933)
+++ branches/rawstudio-ng-color/plugins/dcp/dcp-sse.c   2009-12-31 01:12:07 UTC 
(rev 2934)
@@ -700,11 +700,6 @@
                        __m128 y2_g = _mm_mul_ps(exposure_slope, _mm_sub_ps(g, 
exposure_black));
                        __m128 y2_b = _mm_mul_ps(exposure_slope, _mm_sub_ps(b, 
exposure_black));
                        
-                       /* x = MIN(1.0, x) */
-                       max_val = _mm_load_ps(_ones_ps);
-                       y2_r = _mm_min_ps(y2_r, max_val);
-                       y2_g = _mm_min_ps(y2_g, max_val);
-                       y2_b = _mm_min_ps(y2_b, max_val);
                        __m128 black_plus_radius = 
_mm_load_ps(_black_plus_radius);
                        __m128 r_mask = _mm_cmpgt_ps(r, black_plus_radius);
                        __m128 g_mask = _mm_cmpgt_ps(g, black_plus_radius);
@@ -1397,12 +1392,6 @@
                        __m128 y2_g = _mm_mul_ps(exposure_slope, _mm_sub_ps(g, 
exposure_black));
                        __m128 y2_b = _mm_mul_ps(exposure_slope, _mm_sub_ps(b, 
exposure_black));
 
-                       /* x = MIN(1.0, x) */
-                       max_val = _mm_load_ps(_ones_ps);
-                       y2_r = _mm_min_ps(y2_r, max_val);
-                       y2_g = _mm_min_ps(y2_g, max_val);
-                       y2_b = _mm_min_ps(y2_b, max_val);
-
                        __m128 black_plus_radius = 
_mm_load_ps(_black_plus_radius);
                        __m128 r_mask = _mm_cmpgt_ps(r, black_plus_radius);
                        __m128 g_mask = _mm_cmpgt_ps(g, black_plus_radius);

Modified: branches/rawstudio-ng-color/plugins/dcp/dcp.c
===================================================================
--- branches/rawstudio-ng-color/plugins/dcp/dcp.c       2009-12-31 00:52:35 UTC 
(rev 2933)
+++ branches/rawstudio-ng-color/plugins/dcp/dcp.c       2009-12-31 01:12:07 UTC 
(rev 2934)
@@ -463,7 +463,7 @@
                return 0.0;
                
        if (x >= dcp->exposure_black + dcp->exposure_radius)
-               return MIN((x - dcp->exposure_black) * dcp->exposure_slope, 
1.0);
+               return (x - dcp->exposure_black) * dcp->exposure_slope;
                
        gfloat y = x - (dcp->exposure_black - dcp->exposure_radius);
        


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to