The general description is that it calculates histograms for the linear data and the embedded JPEG, then uses them to compute the cumulative distribution function (CDF, look it up…), which is essentially the curve needed to make the linear data look like the JPEG.
1 Like