[1/2] libcamera: v4l2_subdevice: Add 14-bit Bayer formats
diff mbox series

Message ID 20240305110136.3624-2-nick.hollinghurst@raspberrypi.com
State Accepted
Headers show
Series
  • Add 14-bit Bayer format support
Related show

Commit Message

Nick Hollinghurst March 5, 2024, 11:01 a.m. UTC
Add MEDIA_BUS_FMT_SBGGR14_1X14 etc to formatInfoMap.
Not adding any Y14 for now.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
---
 src/libcamera/v4l2_subdevice.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Laurent Pinchart March 5, 2024, 3:26 p.m. UTC | #1
Hi Nick,

Thank you for the patch.

On Tue, Mar 05, 2024 at 11:01:35AM +0000, Nick Hollinghurst wrote:
> Add MEDIA_BUS_FMT_SBGGR14_1X14 etc to formatInfoMap.
> Not adding any Y14 for now.

Nice to see the gap being filled :-)

> Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/v4l2_subdevice.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index aea90aba..dfe46fa7 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -134,6 +134,10 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {
>  	{ MEDIA_BUS_FMT_SGBRG12_1X12, { 12, "SGBRG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
>  	{ MEDIA_BUS_FMT_SGRBG12_1X12, { 12, "SGRBG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
>  	{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, "SRGGB12_1X12", PixelFormatInfo::ColourEncodingRAW } },
> +	{ MEDIA_BUS_FMT_SBGGR14_1X14, { 14, "SBGGR14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +	{ MEDIA_BUS_FMT_SGBRG14_1X14, { 14, "SGBRG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +	{ MEDIA_BUS_FMT_SGRBG14_1X14, { 14, "SGRBG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +	{ MEDIA_BUS_FMT_SRGGB14_1X14, { 14, "SRGGB14_1X14", PixelFormatInfo::ColourEncodingRAW } },
>  	{ MEDIA_BUS_FMT_SBGGR16_1X16, { 16, "SBGGR16_1x16", PixelFormatInfo::ColourEncodingRAW } },
>  	{ MEDIA_BUS_FMT_SGBRG16_1X16, { 16, "SGBRG16_1x16", PixelFormatInfo::ColourEncodingRAW } },
>  	{ MEDIA_BUS_FMT_SGRBG16_1X16, { 16, "SGRBG16_1x16", PixelFormatInfo::ColourEncodingRAW } },
Naushir Patuck March 6, 2024, 12:41 p.m. UTC | #2
Hi Nick,

On Tue, 5 Mar 2024 at 11:01, Nick Hollinghurst
<nick.hollinghurst@raspberrypi.com> wrote:
>
> Add MEDIA_BUS_FMT_SBGGR14_1X14 etc to formatInfoMap.
> Not adding any Y14 for now.
>
> Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>

Reviewed-by: Naushir Patuck <naush@raspberrypi.com>

> ---
>  src/libcamera/v4l2_subdevice.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index aea90aba..dfe46fa7 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -134,6 +134,10 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {
>         { MEDIA_BUS_FMT_SGBRG12_1X12, { 12, "SGBRG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
>         { MEDIA_BUS_FMT_SGRBG12_1X12, { 12, "SGRBG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
>         { MEDIA_BUS_FMT_SRGGB12_1X12, { 12, "SRGGB12_1X12", PixelFormatInfo::ColourEncodingRAW } },
> +       { MEDIA_BUS_FMT_SBGGR14_1X14, { 14, "SBGGR14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +       { MEDIA_BUS_FMT_SGBRG14_1X14, { 14, "SGBRG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +       { MEDIA_BUS_FMT_SGRBG14_1X14, { 14, "SGRBG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
> +       { MEDIA_BUS_FMT_SRGGB14_1X14, { 14, "SRGGB14_1X14", PixelFormatInfo::ColourEncodingRAW } },
>         { MEDIA_BUS_FMT_SBGGR16_1X16, { 16, "SBGGR16_1x16", PixelFormatInfo::ColourEncodingRAW } },
>         { MEDIA_BUS_FMT_SGBRG16_1X16, { 16, "SGBRG16_1x16", PixelFormatInfo::ColourEncodingRAW } },
>         { MEDIA_BUS_FMT_SGRBG16_1X16, { 16, "SGRBG16_1x16", PixelFormatInfo::ColourEncodingRAW } },
> --
> 2.30.2
>

Patch
diff mbox series

diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index aea90aba..dfe46fa7 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -134,6 +134,10 @@  const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {
 	{ MEDIA_BUS_FMT_SGBRG12_1X12, { 12, "SGBRG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
 	{ MEDIA_BUS_FMT_SGRBG12_1X12, { 12, "SGRBG12_1X12", PixelFormatInfo::ColourEncodingRAW } },
 	{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, "SRGGB12_1X12", PixelFormatInfo::ColourEncodingRAW } },
+	{ MEDIA_BUS_FMT_SBGGR14_1X14, { 14, "SBGGR14_1X14", PixelFormatInfo::ColourEncodingRAW } },
+	{ MEDIA_BUS_FMT_SGBRG14_1X14, { 14, "SGBRG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
+	{ MEDIA_BUS_FMT_SGRBG14_1X14, { 14, "SGRBG14_1X14", PixelFormatInfo::ColourEncodingRAW } },
+	{ MEDIA_BUS_FMT_SRGGB14_1X14, { 14, "SRGGB14_1X14", PixelFormatInfo::ColourEncodingRAW } },
 	{ MEDIA_BUS_FMT_SBGGR16_1X16, { 16, "SBGGR16_1x16", PixelFormatInfo::ColourEncodingRAW } },
 	{ MEDIA_BUS_FMT_SGBRG16_1X16, { 16, "SGBRG16_1x16", PixelFormatInfo::ColourEncodingRAW } },
 	{ MEDIA_BUS_FMT_SGRBG16_1X16, { 16, "SGRBG16_1x16", PixelFormatInfo::ColourEncodingRAW } },