Message ID | 20240123152034.119295-1-kieran.bingham@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
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@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@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 } },
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 } },
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@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(+)