-#if YCBCR_CLAMP_RANGE
- // If we use limited-range Y'CbCr, the card's usual 0–255 clamping
- // won't be enough, so we need to clamp ourselves here.
- //
- // We clamp before dither, which is a bit unfortunate, since
- // it means dither can take us out of the clamped range again.
- // However, since DitherEffect never adds enough dither to change
- // the quantized levels, we will be fine in practice.
- ycbcr_a.rgb = clamp(ycbcr_a.rgb, PREFIX(ycbcr_min), PREFIX(ycbcr_max));
-#endif
+ if (PREFIX(clamp_range)) {
+ // If we use limited-range Y'CbCr, the card's usual 0–255 clamping
+ // won't be enough, so we need to clamp ourselves here.
+ //
+ // We clamp before dither, which is a bit unfortunate, since
+ // it means dither can take us out of the clamped range again.
+ // However, since DitherEffect never adds enough dither to change
+ // the quantized levels, we will be fine in practice.
+ ycbcr_a.rgb = clamp(ycbcr_a.rgb, PREFIX(ycbcr_min), PREFIX(ycbcr_max));
+ }