[PATCH] drm/format-helper: Normalize BT.601 factors to 256

Javier Martinez Canillas javierm at redhat.com
Wed Jun 4 12:17:49 UTC 2025


Thomas Zimmermann <tzimmermann at suse.de> writes:

> BT.601 weights RGB components by certain factors to convert the
> color to grayscale. Normalize the constants to 256 instead of 10.
> Allows for slightly more precise rounding. The division by 256 can
> be compiled as an 8-bit shift, which might be faster on some hardware.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---

Makes sense.

Acked-by: Javier Martinez Canillas <javierm at redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list