I ended up assuming that the HOWTO on Wikipedia was irrational. I wrote my own method for RGB->YCbCr using strictly linear light. From that, I then refined an inverse of YCbCr->RGB.
https://github.com/wswartzendruber/p...mod/src/rgb.rs
Note that my
bt1886_oetf function there should really be
bt1886_ieotf.