colorspace: infer BT.1886 contrast based on target
We currently always treat BT.1886 as a fixed 1000:1 source, which ultimately defeats the purpose of BT.1886 to begin with, since it's supposed to be dependent on the target viewing environment and contrast.
To fix this we need to propagate contrast information from the display back to the image. It's worth noting that the only case in which this immediately affects the image (in the absence of known display contrast metadata) is in the case of mapping SDR to HDR.
I was forced to make a new function due to limitations in the existing
API of pl_color_space_infer_ref
. This function can also do information
propagation in the target -> image direction, and conveniently also
saves a few redundant pl_color_space_infer
calls.
Fixes: #223 (closed)