Unfortunately, my maths are a little weak, so I want someone (stronger in maths or physics) to explain the correct way to apply gamut (de)compress and how it affects the HDTV formula to convert color to grayscale, e.g, Y = 0.2126 R + 0.7152 G + 0.0722 B
Is it best to ask this question on (i) StackOverflow, (ii) Photography, (iii) Maths, or (iv) Physics sites? Please advise.
Here are some quotes that appear to disagree from Wikipedia (my main source for learning about colorspace theory... probably not the best!). Specifically, I see discrepancies with how Y (linear / gamma decompressed) and Y' (non-linear / gamma compressed) are used.
For the ITU-R BT.709 primaries, as used in sRGB, the weighting Y = 0.2126 R + 0.7152 G + 0.0722 B gives the CIE 1931 luminance, Y, as the result. Linear luminance typically needs to be gamma compressed to get back to a conventional grayscale representation. ... This is not the method used to obtain the luma in the Y'UV and related color models, used in standard color TV and video systems as PAL, SECAM, and NTSC. These systems directly compute a gamma-compressed luma as a linear combination of gamma-compressed primary intensities, rather than use linearization via gamma expansion and compression.
Ref2: See the conversion matrix between Y'UV and RGB.
Y' stands for the luma component (the brightness) and U and V are the chrominance (color) components; luminance is denoted by Y and luma by Y' – the prime symbols (') denote gamma compression, with "luminance" meaning perceptual (color science) brightness, while "luma" is electronic (voltage of display) brightness.