For a pixel with 256 possible values, the max value of the right hand side approaches 256. My question is this: Since 2^8=256, for a given image, it seems like the maximum range we could theoretically see across it is 8 EV.
Is this correct? I realize that in equations 1 and 3, L is technically the average scene luminance, but if our scene were reduced to a single pixel, the math should be correct. Or am I applying something horribly wrong?
Well, it's kind of correct if you were to never adjust the digital linear values derived from the analog charges read off the sensor during analog-to-digital conversion (ADC) and only converted the linear analog levels into 8-bits while setting white point and black point exactly eight steps apart. But what you see when you look at images depicted with linear values intact isn't very useful. It's mostly a blob of dark nothingness.
That all goes out the window when we process the monochrome luminance values collected from each photosite in 12-bits or 14-bits and apply non-linear gamma curves to that data before reducing to 8-bits.
In such a case, one can make the distance between each discrete level as close or as far in terms of brightness as one wishes. Adjusting that distance between each discrete value is exactly what we do when we start moving 'Contrast', 'Highlights, 'Shadows', 'White Point', and 'Black Point' sliders around or, alternately, use a 'Curves" tool in a raw convertor application before exporting to an 8-bit per channel raster image format.
We can choose to make everything darker than a specific 14-bit value equal zero in our 8-bit output image. That's what we call the "Black Point". We can also choose to make everything higher than a specific 14-bit value equal 255 in our 8-bit output image. That's what we call the "White Point". We can then choose how much of the distance between our black point and white point is used by each discrete step between '0' and '255'. We're not required to make 8,191 in our 16-bit raw file equal exactly 127 on our 8-bit image. In fact, we rarely do so since we apply different channel multipliers to the demosaiced monochromatic luminance values from photosites filtered with the blue-violet, green, or yellow-orange filters of our Bayer masks to get red, green, and blue values for each pixel.
It's not that much different from what Ansel Adams did with his Zone System almost a century ago to be able to depict details from both highlights and shadows in scenes with a wider dynamic range than the photo paper he was printing on was capable of reproducing.