[Bf-blender-cvs] [28e76bb] master: Remove legacy color transform functions.

Troy Sobotka noreply at git.blender.org
Tue Feb 10 21:34:49 CET 2015


Commit: 28e76bbb931d2747fdb1ef6b47cc313a34899951
Author: Troy Sobotka
Date:   Tue Feb 10 21:33:00 2015 +0100
Branches: master
https://developer.blender.org/rB28e76bbb931d2747fdb1ef6b47cc313a34899951

Remove legacy color transform functions.

Differential Revision: https://developer.blender.org/D1095

===================================================================

M	source/blender/blenlib/BLI_math_color.h
M	source/blender/blenlib/intern/math_color.c

===================================================================

diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h
index 560ebe3..55e57b1 100644
--- a/source/blender/blenlib/BLI_math_color.h
+++ b/source/blender/blenlib/BLI_math_color.h
@@ -89,9 +89,6 @@ MINLINE float rgb_to_luma_y(const float rgb[3]);
 
 /**************** Profile Transformations *****************/
 
-void gamma_correct(float *c, float gamma);
-float rec709_to_linearrgb(float c);
-float linearrgb_to_rec709(float c);
 float srgb_to_linearrgb(float c);
 float linearrgb_to_srgb(float c);
 
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 3ed7230..e149fdb 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -429,27 +429,6 @@ void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
 /* ********************************* color transforms ********************************* */
 
 
-void gamma_correct(float *c, float gamma)
-{
-	*c = powf((*c), gamma);
-}
-
-float rec709_to_linearrgb(float c)
-{
-	if (c < 0.081f)
-		return (c < 0.0f) ? 0.0f : c * (1.0f / 4.5f);
-	else
-		return powf((c + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f));
-}
-
-float linearrgb_to_rec709(float c)
-{
-	if (c < 0.018f)
-		return (c < 0.0f) ? 0.0f : c * 4.5f;
-	else
-		return 1.099f * powf(c, 0.45f) - 0.099f;
-}
-
 float srgb_to_linearrgb(float c)
 {
 	if (c < 0.04045f)




More information about the Bf-blender-cvs mailing list