Merge branch 'cicp-color-states' into 'main'

Fix the hlg transfer function

See merge request GNOME/gtk!7493
This commit is contained in:
Matthias Clasen 2024-07-25 01:19:02 +00:00
commit e216fa3b6d
2 changed files with 1 additions and 4 deletions

View File

@ -99,7 +99,7 @@ hlg_eotf (float v)
if (v <= 0.5)
return (v * v) / 3;
else
return expf (((v - c) / a) + b) / 12.0;
return (expf ((v - c) / a) + b) / 12.0;
}
static inline float

View File

@ -632,13 +632,10 @@ gdk_color_state_new_for_cicp (const GdkCicp *cicp,
eotf = pq_eotf;
oetf = pq_oetf;
break;
#if 0
/* round-trip tests for hlg are failing, for some reason */
case 18:
eotf = hlg_eotf;
oetf = hlg_oetf;
break;
#endif
default:
g_set_error (error,
G_IO_ERROR, G_IO_ERROR_FAILED,