[v2,3/6] libcamera: v4l2_subdevice: Add missing MEDIA_BUS_FMT_xxxx16_1X16 info
diff mbox series

Message ID 20240508080401.14850-4-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Pre Raspberry Pi 5 support changes
Related show

Commit Message

Naushir Patuck May 8, 2024, 8:03 a.m. UTC
Add the missing 16-bit MEDIA_BUS_FMT_xxxx16_1X16 definitions to the
mediaBusFormatInfo table.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/v4l2_subdevice.cpp | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Jacopo Mondi May 9, 2024, 9:48 a.m. UTC | #1
Hi Naush

On Wed, May 08, 2024 at 09:03:58AM GMT, Naushir Patuck wrote:
> Add the missing 16-bit MEDIA_BUS_FMT_xxxx16_1X16 definitions to the
> mediaBusFormatInfo table.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/libcamera/v4l2_subdevice.cpp | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 1076b7006b0b..ca01ea3fe455 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -651,6 +651,34 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>  		.bitsPerPixel = 14,
>  		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
>  	} },
> +	{ MEDIA_BUS_FMT_SBGGR16_1X16, {
> +		.name = "SBGGR16_1X16",
> +		.code = MEDIA_BUS_FMT_SBGGR16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGBRG16_1X16, {
> +		.name = "SGBRG16_1X16",
> +		.code = MEDIA_BUS_FMT_SGBRG16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGRBG16_1X16, {
> +		.name = "SGRBG16_1X16",
> +		.code = MEDIA_BUS_FMT_SGRBG16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SRGGB16_1X16, {
> +		.name = "SRGGB16_1X16",
> +		.code = MEDIA_BUS_FMT_SRGGB16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
>  	/* \todo Clarify colour encoding for HSV formats */
>  	{ MEDIA_BUS_FMT_AHSV8888_1X32, {
>  		.name = "AHSV8888_1X32",
> --
> 2.34.1
>
Kieran Bingham May 9, 2024, 11:09 a.m. UTC | #2
Quoting Naushir Patuck (2024-05-08 09:03:58)
> Add the missing 16-bit MEDIA_BUS_FMT_xxxx16_1X16 definitions to the
> mediaBusFormatInfo table.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/v4l2_subdevice.cpp | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 1076b7006b0b..ca01ea3fe455 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -651,6 +651,34 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>                 .bitsPerPixel = 14,
>                 .colourEncoding = PixelFormatInfo::ColourEncodingRAW,
>         } },
> +       { MEDIA_BUS_FMT_SBGGR16_1X16, {
> +               .name = "SBGGR16_1X16",
> +               .code = MEDIA_BUS_FMT_SBGGR16_1X16,
> +               .type = MediaBusFormatInfo::Type::Image,
> +               .bitsPerPixel = 16,
> +               .colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +       } },
> +       { MEDIA_BUS_FMT_SGBRG16_1X16, {
> +               .name = "SGBRG16_1X16",
> +               .code = MEDIA_BUS_FMT_SGBRG16_1X16,
> +               .type = MediaBusFormatInfo::Type::Image,
> +               .bitsPerPixel = 16,
> +               .colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +       } },
> +       { MEDIA_BUS_FMT_SGRBG16_1X16, {
> +               .name = "SGRBG16_1X16",
> +               .code = MEDIA_BUS_FMT_SGRBG16_1X16,
> +               .type = MediaBusFormatInfo::Type::Image,
> +               .bitsPerPixel = 16,
> +               .colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +       } },
> +       { MEDIA_BUS_FMT_SRGGB16_1X16, {
> +               .name = "SRGGB16_1X16",
> +               .code = MEDIA_BUS_FMT_SRGGB16_1X16,
> +               .type = MediaBusFormatInfo::Type::Image,
> +               .bitsPerPixel = 16,
> +               .colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +       } },
>         /* \todo Clarify colour encoding for HSV formats */
>         { MEDIA_BUS_FMT_AHSV8888_1X32, {
>                 .name = "AHSV8888_1X32",
> -- 
> 2.34.1
>
Laurent Pinchart May 9, 2024, 11:33 a.m. UTC | #3
Hi Naush,

Thank you for the patch.

On Wed, May 08, 2024 at 09:03:58AM +0100, Naushir Patuck wrote:
> Add the missing 16-bit MEDIA_BUS_FMT_xxxx16_1X16 definitions to the
> mediaBusFormatInfo table.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

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

> ---
>  src/libcamera/v4l2_subdevice.cpp | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 1076b7006b0b..ca01ea3fe455 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -651,6 +651,34 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>  		.bitsPerPixel = 14,
>  		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
>  	} },
> +	{ MEDIA_BUS_FMT_SBGGR16_1X16, {
> +		.name = "SBGGR16_1X16",
> +		.code = MEDIA_BUS_FMT_SBGGR16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGBRG16_1X16, {
> +		.name = "SGBRG16_1X16",
> +		.code = MEDIA_BUS_FMT_SGBRG16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGRBG16_1X16, {
> +		.name = "SGRBG16_1X16",
> +		.code = MEDIA_BUS_FMT_SGRBG16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SRGGB16_1X16, {
> +		.name = "SRGGB16_1X16",
> +		.code = MEDIA_BUS_FMT_SRGGB16_1X16,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 16,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
>  	/* \todo Clarify colour encoding for HSV formats */
>  	{ MEDIA_BUS_FMT_AHSV8888_1X32, {
>  		.name = "AHSV8888_1X32",

Patch
diff mbox series

diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 1076b7006b0b..ca01ea3fe455 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -651,6 +651,34 @@  const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
 		.bitsPerPixel = 14,
 		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
 	} },
+	{ MEDIA_BUS_FMT_SBGGR16_1X16, {
+		.name = "SBGGR16_1X16",
+		.code = MEDIA_BUS_FMT_SBGGR16_1X16,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 16,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SGBRG16_1X16, {
+		.name = "SGBRG16_1X16",
+		.code = MEDIA_BUS_FMT_SGBRG16_1X16,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 16,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SGRBG16_1X16, {
+		.name = "SGRBG16_1X16",
+		.code = MEDIA_BUS_FMT_SGRBG16_1X16,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 16,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SRGGB16_1X16, {
+		.name = "SRGGB16_1X16",
+		.code = MEDIA_BUS_FMT_SRGGB16_1X16,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 16,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
 	/* \todo Clarify colour encoding for HSV formats */
 	{ MEDIA_BUS_FMT_AHSV8888_1X32, {
 		.name = "AHSV8888_1X32",