Ha ha, I read that article yesterday, really.
I don't know what you didn't understand so I can't help, but as you said it isn't really magic. I've written a pixel shader implementing the curve, so I know how it works, and it's not very difficult to at least get an idea of the process by just looking at the maths.
https://www.itu.int/dms_pub/itu-r/op...2018-PDF-E.pdf
It only doesn't include the last scaling step.