I've also never understood why the formula for average gamma isn't
gamma = (1/(N-1)) Sum from i = 1 to N -1 of ((log(L(i/N) - log(L((i+1)/N))/log(1/N))
That way the peak white value doesn't dominate and each of the individual values is closer to a point gamma.
But that to me is minor to me compared to the issue of how to handle a raised (or indeed lowered) black level correctly/sensibly.
In the EBU paper herehttp://tech.ebu.ch/docs/techreview/trev_257-tutorial.pdf
for example they (to my mind correctly) point out that the likely physical gamma function for a CRT contains 2 offset terms and that ignoring these will give rise to large gamma estimation errors. So therefore if the aim is correctly identify the exponent in that offset based equation you must use a methodology that includes the offsets.
However the aim for most of us is different and more complex, but with 2 distinct parts.
1) Material is mastered under conditions that are supposed to be controlled but in practice vary terms of display type, background lighting. This makes mathematically describing the preception of light for say a greyscale ramp as seen in a mastering room harder than it ought to be. But with some heroic assumptions we can imagine an average theoretical mastering studio. Your work on pushing forward better standards and clarity in this area is important and much appreciated.
2) For given display there is typically only so much control you have over black level, so if we take the display's black level as fixed and imagine we can control how all intermediate points are displayed, what should be the target of those points? Using gamma wth no offset terms give you no real target for the near black points as you start off away from the "perfect" curve and it's not obvious that getting it to agree later on will give correct looking video, subtracting the measure black from all other values to force black to be black results in the near blacks being too close together and again resulting in a far from ideal image.
My thoughts on this are that we need to replace gamma in the caibration process by something that assists in getting the greyscale evenly distributed between the fixed endpoints of black and white where even takes into acount the perceptual factors such as background. The nearest I have to an alternative is to vary the input level when calculating gamma to adjust for the raised black. Is this at all similar to the thoughts that you are having or do you have an alternative approach?