[libcamera-devel] [PATCH 2/2] libcamera: formats: add missing RGBX8888 info

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu May 19 01:20:11 CEST 2022


Hi Tomi,

Thank you for the patch.

On Wed, May 18, 2022 at 03:20:14PM +0300, Tomi Valkeinen wrote:
> Add missing RGBX8888 PixelFormatInfo.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
> ---
>  src/libcamera/formats.cpp | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 3e60ec7d..1c710541 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -231,6 +231,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  		.pixelsPerGroup = 1,
>  		.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
>  	} },
> +	{ formats::RGBX8888, {
> +		.name = "RGBX8888",
> +		.format = formats::RGBX8888,
> +		.v4l2Formats = {
> +			.single = V4L2PixelFormat(V4L2_PIX_FMT_RGBX32),

I think this should be BGRX32. Furthermore, you need to also update the
vpf2pf map in v4l2_pixelformat.cpp.

> +			.multi = V4L2PixelFormat(),
> +		},
> +		.bitsPerPixel = 32,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
> +		.packed = false,
> +		.pixelsPerGroup = 1,
> +		.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
> +	} },
>  	{ formats::BGRX8888, {
>  		.name = "BGRX8888",
>  		.format = formats::BGRX8888,

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list