toYCbCr - multiple declarations

Function toYCbCr

Converts encoded sRGB to normalized YCbCr samples under Policy.

YCbCr!(T,Policy) toYCbCr(Policy, T)(
  SRgb!T value
) pure nothrow @nogc @safe;

The input is encoded (nonlinear) sRGB, not linear-light sRGB. The result is normalized code values: full range uses neutral chroma at 0.5, while video range uses the 8-bit-equivalent code positions 16..235 and 16..240. No clipping, rounding, or byte quantization is performed.

Function toYCbCr

Converts linear-light sRGB to normalized YCbCr using the sRGB transfer curve.

YCbCr!(T,Policy) toYCbCr(Policy, T)(
  LinearSRgb!T value
) pure nothrow @nogc @safe;