Implement ITU-R BT.2446 HDR/SDR tone mapping (and inverse tone mapping)
The spec offers three conversion methods, all of them different.
For now, probably easiest to just focus on HDR->SDR tone-mapping and figure out a way to do the expansion later.