From 90cfc4d89ff457e06b9fed51ffd20dd239c87b2f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 20 Dec 2024 14:52:43 -0500 Subject: [PATCH] Cleanup: Remove unused color conversion function Unused for 14 years. --- source/blender/blenlib/BLI_math_color.h | 13 ------------- source/blender/blenlib/intern/math_color.cc | 20 -------------------- 2 files changed, 33 deletions(-) diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index d17d59da0cb..c718d528484 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -199,19 +199,6 @@ MINLINE void cpack_cpy_3ub(unsigned char r_col[3], unsigned int pack); /** \} */ -/* -------------------------------------------------------------------- */ -/** \name lift/gamma/gain / ASC-CDL conversion - * \{ */ - -void lift_gamma_gain_to_asc_cdl(const float *lift, - const float *gamma, - const float *gain, - float *offset, - float *slope, - float *power); - -/** \} */ - #ifdef __cplusplus } #endif diff --git a/source/blender/blenlib/intern/math_color.cc b/source/blender/blenlib/intern/math_color.cc index d55280f569c..f501025fc6b 100644 --- a/source/blender/blenlib/intern/math_color.cc +++ b/source/blender/blenlib/intern/math_color.cc @@ -723,27 +723,7 @@ int constrain_rgb(float *r, float *g, float *b) return 0; /* Color within RGB gamut */ } -/* ********************** lift/gamma/gain / ASC-CDL conversion ********************************* */ -void lift_gamma_gain_to_asc_cdl(const float *lift, - const float *gamma, - const float *gain, - float *offset, - float *slope, - float *power) -{ - int c; - for (c = 0; c < 3; c++) { - offset[c] = lift[c] * gain[c]; - slope[c] = gain[c] * (1.0f - lift[c]); - if (gamma[c] == 0) { - power[c] = FLT_MAX; - } - else { - power[c] = 1.0f / gamma[c]; - } - } -} /* ************************************* other ************************************************* */