[libcamera-devel] [PATCH 02/11] include: drm_fourcc: Add Y10 format
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Mar 19 14:59:00 CET 2023
Hi Dan,
Thank you for the patch.
On Sat, Mar 18, 2023 at 11:40:05PM +0000, Daniel Scally via libcamera-devel wrote:
> Add a FourCC entry for the V4L2_PIX_FMT_Y10 image data format.
>
> Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
> ---
> include/linux/drm_fourcc.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h
> index 1496e097..b181a534 100644
> --- a/include/linux/drm_fourcc.h
> +++ b/include/linux/drm_fourcc.h
> @@ -98,6 +98,9 @@ extern "C" {
> /* Reserve 0 for the invalid format specifier */
> #define DRM_FORMAT_INVALID 0
>
> +/* 10 bpp greyscale */
> +#define DRM_FORMAT_Y10 fourcc_code('Y', '1', '0', ' ') /* [15:0] Y-only little endian*/
For historical reasons, greyscale formats are named "R" in DRM. We
already have DRM_FORMAT_R10 support, so you should be all set.
By the way, if you need to add a new DRM format in the future, the patch
should be sent to the kernel first.
> /* color index */
> #define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list