Struct YCbCr

Policy contract:

struct YCbCr(T, Policy)
  
if ((is(T == float) || is(T == double)) && (Policy.bitDepth >= 8) && (Policy.bitDepth <= 16));

Bt601Full and Bt709Full interpret normalized Y as [0, 1], with neutral Cb/Cr at 0.5. Bt601Video and Bt709Video interpret normalized 8-bit code values using Y=16/255..235/255 and Cb/Cr=16/255..240/255, with neutral chroma at 128/255. The BT.601 coefficients are (1.402, 0.344136, 0.714136, 1.772); BT.709 uses (1.5748, 0.187324, 0.468124, 1.8556).

The matrix result is encoded sRGB. Use toLinearSRgb for linear-light values. No policy is inferred and no integer rounding occurs here.

Normalized YCbCr samples under an explicit Policy.

The components are mathematical normalized code values, not bytes. For video range, Y=16/255 and Cb/Cr=128/255 are the nominal black/neutral codes. Construction preserves extended values and performs no clipping.