colorspace: add support for Dolby Vision
This covers Profiles 5 and 8.X. After playing around with the
implementation quite a lot, I eventually settled on the current state,
which requires no LUTs or state and is implemented entirely in pure
GLSL. This is slightly slower than a pure 1D LUT approach, but has the
benefit of not needing to add an extra pl_shader_obj
to the API at
all, and thus being transparently backwards compatible.
The decoding metadata is assumed to be passed in via a new struct
pl_dovi_metadata
, which contains both the colorspace matrices
(especially important for profiles 8.X) and reshaping coefficients.
TODO:
-
test MMR code -
clean up debug crap -
optimize/benchmark MMR -
add GLSL version checks for floatBitsToUint (or work around?)
Closes #113 (closed)
Edited by Niklas Haas