The 0.5.0.0 gate blocked a Main 10 tier whenever decodingInfo called it
unusable. That is wrong on a machine that decodes 8-bit 8K but not 10-bit 8K,
which is exactly the machine this was written on (measured: nvidia-vaapi-driver
decodes 8192x4096 Main 8-bit and fails to create a decoder for 8192x4096
Main 10).
browserDeviceProfile.js derives the level ceiling and the profile list from ONE
chain of Main 10 probes -- the only Main (8-bit) probes are L4.0 and L4.1. So
the reachable states are only (120,main) (123,main) (123,main|main 10)
(153,main|main 10) (183,main|main 10) (186,main|main 10). "Main up to 8K,
Main 10 only up to 4K" is not expressible. Blocking 2:183 on that machine
therefore does not spare the 10-bit file -- it drags every 8-bit 8K file down to
level 153 and transcodes the whole library. On a server that cannot transcode 8K
in real time that trades one broken file for sixty.
So a Main 10 tier is now only blocked when the SAME LEVEL is also unusable in
Main (8-bit): 8-bit probes were added at L5.1, L6.1 and L6.2 as the control. The
cost is that a device which decodes 8-bit at a level but not 10-bit still claims
10-bit there and can black-screen on such a file -- which is precisely what
40-watchdog.js exists for.
Also notes the real root cause for that machine, which is not in this plugin:
nvidia-vaapi-driver 0.0.14 has a self-referential CUVIDDECODECREATEINFO
initializer (".ulWidth = vdci.ulMaxWidth = ..."), undefined behaviour that feeds
invalid dimensions to cuvidCreateDecoder. It advertises HEVC Main 10 up to
8192x8192 but cannot create the decoder. Fixed upstream in 0.0.18 by moving the
assignments out of the initializer.
Verified against the local harness, five modes, all passing:
pc 8K unusable in both bit depths -> cap 153 -> TRANSCODE
slow 8-bit 8K ok, 10-bit 8K not -> nothing blocked -> 8-bit 8K DIRECT PLAY
quest everything ok -> DIRECT PLAY
pin 2:183 pinned -> pin wins, rest still blocked
off kill switch -> canPlayType untouched