Ah, I understood as much by looking at the code. Unfortunately the rest was beyond me.
Converting RGB to HSV is a rather tricky process and it basically usually uses either picking out one of six cases or a tricky bitwise magic.
I managed to find a sample that uses the same transformation matrix (RGB to YIQ to HSV), read it through and checked all the values, but they appear to be correct. The only thing I'm not sure is - does the transform matrix need to be multiplied with the input colour?
Either way, thanks for your work on the effect.
Edit: Looking into it further it seems that the default transform values assume a default display gamma of 2.2 which may well be the case for our regular everyday visuals, but possibly less so for the DirectX based CC output. Thus the end result becomes darker? Not really sure.