diff options
author | Troy Sobotka <troy.sobotka@gmail.com> | 2015-02-10 23:33:00 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2015-02-10 23:34:19 +0300 |
commit | 28e76bbb931d2747fdb1ef6b47cc313a34899951 (patch) | |
tree | 9777e7642a81b19970caf8d4ca9832a6a73772cf /source | |
parent | 1d64dff6716ac02fb706d4111c606ddc42984a3d (diff) |
Remove legacy color transform functions.
Differential Revision: https://developer.blender.org/D1095
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 21 |
2 files changed, 0 insertions, 24 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 560ebe3d390..55e57b14d09 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 3ed7230b1d2..e149fdb2d26 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) |