[PATCH v2 4/4] libcamera: v4l2_subdevice: Explain sort order of formatInfoMap
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Jan 23 16:30:46 CET 2024
On Tue, Jan 23, 2024 at 03:20:34PM +0000, Kieran Bingham wrote:
> The sort order used in the table isn't obvious. Reference the source of
> linux/media-bus-format.h at the top of the table for reference for
> future updates.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>
> This patch replaces:
> [PATCH v2 4/4] libcamera: v4l2subdev: Organise the formatInfoMap
>
> src/libcamera/v4l2_subdevice.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 265240dbd405..6d0785b7b484 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -57,6 +57,7 @@ struct V4L2SubdeviceFormatInfo {
> * bus codes
> */
> const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {
> + /* This table is sorted to match the order in linux/media-bus-format.h */
> { MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { 16, "RGB444_2X8_PADHI_BE", PixelFormatInfo::ColourEncodingRGB } },
> { MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { 16, "RGB444_2X8_PADHI_LE", PixelFormatInfo::ColourEncodingRGB } },
> { MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, { 16, "RGB555_2X8_PADHI_BE", PixelFormatInfo::ColourEncodingRGB } },
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list