Index: app/base/lut-funcs.c
===================================================================
RCS file: /cvs/gnome/gimp/app/base/lut-funcs.c,v
retrieving revision 1.16
diff -u -p -r1.16 lut-funcs.c
--- app/base/lut-funcs.c	18 Feb 2004 13:43:42 -0000	1.16
+++ app/base/lut-funcs.c	21 Feb 2006 19:52:12 -0000
@@ -43,55 +43,11 @@ brightness_contrast_lut_func (B_C_struct
 			      gint        channel,
 			      gfloat      value)
 {
-  gfloat  nvalue;
-  gdouble power;
-
   /* return the original value for the alpha channel */
   if ((nchannels == 2 || nchannels == 4) && channel == nchannels -1)
     return value;
 
-  /* apply brightness */
-  if (data->brightness < 0.0)
-    value = value * (1.0 + data->brightness);
-  else
-    value = value + ((1.0 - value) * data->brightness);
-
-  /* apply contrast */
-  if (data->contrast < 0.0)
-    {
-      if (value > 0.5)
-	nvalue = 1.0 - value;
-      else
-	nvalue = value;
-
-      if (nvalue < 0.0)
-	nvalue = 0.0;
-
-      nvalue = 0.5 * pow (nvalue * 2.0 , (double) (1.0 + data->contrast));
-
-      if (value > 0.5)
-	value = 1.0 - nvalue;
-      else
-	value = nvalue;
-    }
-  else
-    {
-      if (value > 0.5)
-	nvalue = 1.0 - value;
-      else
-	nvalue = value;
-
-      if (nvalue < 0.0)
-	nvalue = 0.0;
-
-      power = (data->contrast == 1.0) ? 127 : 1.0 / (1.0 - data->contrast);
-      nvalue = 0.5 * pow (2.0 * nvalue, power);
-
-      if (value > 0.5)
-	value = 1.0 - nvalue;
-      else
-	value = nvalue;
-    }
+  value = (value - 0.5) * data->contrast + 0.5 + data->brightness;
 
   return value;
 }
