Cleanup: Remove unused color conversion function

Unused for 14 years.
This commit is contained in:
Hans Goudey
2024-12-20 14:52:43 -05:00
parent ab53a84299
commit 90cfc4d89f
2 changed files with 0 additions and 33 deletions

View File

@@ -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

View File

@@ -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 ************************************************* */