I have added the Rec. 709 and Rec. 2020 standards to the crate. Rec. 709 is simply the same as Srgb with a different transfer function, called RecOetf. Rec. 2020 is a wide color gamut standard using this same transfer function.
For Rec. 2020, I am not sure how to best implement conversions from floating-point to unsigned ints since, due to the wide gamut, it typically operates with either 10 or 12 bits per color channel, making the typical use of u8's not ideal. Ideally, there could be a lookup table containing 4096 values that could be indexed into variably depending on the chosen bit depth (e.g. REC_TO_F64[4*value] for a 10-bit Rec. 2020 value, or REC_TO_F64[16*value] for an 8-bit Rec. 709 value. I do not know the best way to incorporate any sort of variable bit depth into the library, though.
Completes "rec2020" task of #408, by adding the Rec2020 standard
I have added the Rec. 709 and Rec. 2020 standards to the crate. Rec. 709 is simply the same as
Srgb
with a different transfer function, calledRecOetf
. Rec. 2020 is a wide color gamut standard using this same transfer function.For Rec. 2020, I am not sure how to best implement conversions from floating-point to unsigned ints since, due to the wide gamut, it typically operates with either 10 or 12 bits per color channel, making the typical use of u8's not ideal. Ideally, there could be a lookup table containing 4096 values that could be indexed into variably depending on the chosen bit depth (e.g.
REC_TO_F64[4*value]
for a 10-bit Rec. 2020value
, orREC_TO_F64[16*value]
for an 8-bit Rec. 709value
. I do not know the best way to incorporate any sort of variable bit depth into the library, though.Rec2020
standard