@afre Following the maths on Bruce’s site I arrive at this (fairly straightforward) method to compute the example matrix you picked out. Note that for some odd reason, the variable name in RT is not what I expected. As I understand Bruce’s site, this matrix is used to convert an RGB value in Rec.2020 to a XYZ value and not the other way around. Maybe I’m wrong…
Anyway, here’s the maths. Forgive me for using slightly different notation… force of habit.
Pick your origin color space, here Rec.2020, and note its primaries and white point in xy chromaticity coordinates:
These values are taken from Wikipedia. The white point is D65 and therefore needs adaptation to D50. Adaptation is a simple matrix multiplication of (X,Y,Z) values with the respective transformation matrix \mathbf{M_A} (see Bruce’s table). For going from D65 to D50 we have,
We can now calculate Bradford-adapted (X,Y,Z) values from the chromaticity coordinates:
Do the same for the green, blue and white coordinates.
Finally, the conversion matrix \mathbf{M} to go from RGB to XYZ is given here:
When plugging in the above numbers, I end up with the following matrix, with all values rounded to 7 decimal places:
Which is identical to the values in RT’s source code.