From 0f1fde1fafb64ac6e33325b30443b53e243bfb0e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 19 May 2020 11:14:52 -0400 Subject: [PATCH] util/format: Use SATURATE Signed-off-by: Alyssa Rosenzweig Reviewed-by: Eric Engestrom Part-of: --- src/util/format/u_format_yuv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/format/u_format_yuv.h b/src/util/format/u_format_yuv.h index 3c822bcb148..37f76dc014c 100644 --- a/src/util/format/u_format_yuv.h +++ b/src/util/format/u_format_yuv.h @@ -58,9 +58,9 @@ static inline void util_format_rgb_float_to_yuv(float r, float g, float b, uint8_t *y, uint8_t *u, uint8_t *v) { - const float _r = CLAMP(r, 0.0f, 1.0f); - const float _g = CLAMP(g, 0.0f, 1.0f); - const float _b = CLAMP(b, 0.0f, 1.0f); + const float _r = SATURATE(r); + const float _g = SATURATE(g); + const float _b = SATURATE(b); const float scale = 255.0f; -- 2.30.2