Interesting. I was experimenting with increasing the reference frames to try and increase compression. I have not seen anything (Handbrake docs, Wikipedia H264 info) that mentions a maximum number of reference frames for a given level.
The Handbrake preset I’ve been using sets the profile to High@4.0. Adjusting Reference Frames on the Advanced tab doesn’t change the encoder level. The “x264 Encoder Options” section still shows level=4.0.
Do you have a reference? I’d like to read up on it. I’ll search w/ Google, but if you’ve something handy…
Using a blu-ray rip (1920x800), set profile & level = Auto on Video tab.
Reference Frames = 5 results in a High@L4 video.
Reference Frames = 6 results in a High@L5 video.
Found a handy calculator: H264 Maximum References Frames
It doesn’t show the math behind the calculation, but it does match up with what @tobytl wrote and w/ the above quick tests.
It’s kind of hidden, it used to be listed in parenthesis in the levels table in the h264/avc wikipedia page.
But it’s a consequence of the MaxDPB and MaxDPBMbs (DPB = decoded picture buffer, the number of decoded frames kept in the buffer which can be referenced).