dxva2: Calculate the number size of the DPB based on macroblocks
dxva2: refactor AMD UVD/UVD+ checks into one block
dxva2: check that the number of reference frames does not overflow the DPB on AMD UVD/UVD+ cards