One for digital encoding is to meausure the ratio of the peak to the smallest possible encoded value. 8-bit sRGB can achieve quite an impressive number here.
I'd use the smallest encodable step, not the smallest absolute value. I don't like dividing by zero, but maybe that's just me.
That's actually what I meant, thanks for the clarification.
Another is to define the "floor" as where your quantization error is less than the threshold of human vision, which is roughly somewhere between 2% and 3% of the luminance of the adjacent value.
Interesting. I haven't seen anyone defining DR in terms of human perception. You got a link for that "2% and 3%" figure? I'd like to see the list of caveats
In this line of argument there is also shot noise, that at higher EVs will overwhelm all other types of noises in a modern camera, while at low EVs heat noise and read noise will overwhelm both your 3% human accuracy figure (which likely isn't accurate at those levels, anyway) and the linear encoding precision.
Of course none of that is relevant for calculating DR. As you probably know, the floor normally used is the technical noise floor.
I used to have a link, I'll try and dig it up later this week, but I last saw it referenced in a white paper describing the HLG standard. I saw a separate research paper that came to a roughly similar conclusion as far as "typical" banding threshold. And yes, there are caveats - such as the threshold changing with absolute luminance, and the obvious color vs. luminance stuff.
https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2390-3-2017-PDF-E.pdf is the first link I found which touches on the subject, but doesn't discuss sRGB/Rec709 limitations with 8-bit as clearly as another reference I once found.
AHA - Found it! -
https://downloads.bbc.co.uk/rd/pubs/whp/whp-pdf-files/WHP309.pdf - they use 2% in their document, which gives just over 5 stops for Rec709 with 8-bit legal range luma.
1/log2(1.03) = 23 code values per EV, 1/log2(1.02) = 35 code values per EV. By this metric, sRGB does pretty poorly, and it is possible to do MUCH better even with 8-bit encoding.
No one said that linear encoding is efficient in terms of only encoding what humans can perceive (or is meaningful in terms of underlying noise). Besides I assume by sRGB you mean JPEG/sRGB (which has even less than the 8bit EDR). E.g. TIFF/sRGB comes in 16bit flavours, which may be better than human vision across the range.
I thought I'd implied 8-bit with the rest of the sentence.

For video, legal range luma makes things potentially even worse.