This more closely matches the equations in equations 7-61 and 7-62 in See H.265/HEVC (2014) section 7.4.8.