[v3,8/9] libcamera: v4l2-subdevice: Add Mali C55 media bus formats
diff mbox series

Message ID 20240626140309.50052-9-jacopo.mondi@ideasonboard.com
State Superseded
Headers show
Series
  • Miscellaneous Mali-C55 Pipeline Fixes
Related show

Commit Message

Jacopo Mondi June 26, 2024, 2:03 p.m. UTC
Add support in the mediaBusFormatInfo map in the v4l2-subdevice.c file
support for the media bus formats used by the Mali C55 ISP.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 src/libcamera/v4l2_subdevice.cpp | 42 ++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Comments

Umang Jain June 29, 2024, 6:57 a.m. UTC | #1
Hi Jacopo,

Thank you for the patch

On 26/06/24 7:33 pm, Jacopo Mondi wrote:
> Add support in the mediaBusFormatInfo map in the v4l2-subdevice.c file
> support for the media bus formats used by the Mali C55 ISP.

s/support//
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/libcamera/v4l2_subdevice.cpp | 42 ++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 82824433726f..6f154caf5b0e 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -189,6 +189,20 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>   		.bitsPerPixel = 24,
>   		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
>   	} },
> +	{ MEDIA_BUS_FMT_RGB121212_1X36, {
> +		.name = "RGB121212_1X36",
> +		.code = MEDIA_BUS_FMT_RGB121212_1X36,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 36,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
> +	} },
> +	{ MEDIA_BUS_FMT_RGB202020_1X60, {
> +		.name = "RGB202020_1X60",
> +		.code = MEDIA_BUS_FMT_RGB202020_1X60,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 60,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
> +	} },
>   	{ MEDIA_BUS_FMT_ARGB8888_1X32, {
>   		.name = "ARGB8888_1X32",
>   		.code = MEDIA_BUS_FMT_ARGB8888_1X32,
> @@ -679,6 +693,34 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>   		.bitsPerPixel = 16,
>   		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
>   	} },
> +	{ MEDIA_BUS_FMT_SBGGR20_1X20, {
> +		.name = "SBGGR20_1X20",
> +		.code = MEDIA_BUS_FMT_SBGGR20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGBRG20_1X20, {
> +		.name = "SGBRG20_1X20",
> +		.code = MEDIA_BUS_FMT_SGBRG20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGRBG20_1X20, {
> +		.name = "SGRBG20_1X20",
> +		.code = MEDIA_BUS_FMT_SGRBG20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SRGGB20_1X20, {
> +		.name = "SRGGB20_1X20",
> +		.code = MEDIA_BUS_FMT_SRGGB20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
>   	/* \todo Clarify colour encoding for HSV formats */
>   	{ MEDIA_BUS_FMT_AHSV8888_1X32, {
>   		.name = "AHSV8888_1X32",
Dan Scally July 8, 2024, 11:09 a.m. UTC | #2
Hi Jacopo

On 26/06/2024 15:03, Jacopo Mondi wrote:
> Add support in the mediaBusFormatInfo map in the v4l2-subdevice.c file
> support for the media bus formats used by the Mali C55 ISP.
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
>   src/libcamera/v4l2_subdevice.cpp | 42 ++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 82824433726f..6f154caf5b0e 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -189,6 +189,20 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>   		.bitsPerPixel = 24,
>   		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
>   	} },
> +	{ MEDIA_BUS_FMT_RGB121212_1X36, {
> +		.name = "RGB121212_1X36",
> +		.code = MEDIA_BUS_FMT_RGB121212_1X36,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 36,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
> +	} },
> +	{ MEDIA_BUS_FMT_RGB202020_1X60, {
> +		.name = "RGB202020_1X60",
> +		.code = MEDIA_BUS_FMT_RGB202020_1X60,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 60,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
> +	} },
>   	{ MEDIA_BUS_FMT_ARGB8888_1X32, {
>   		.name = "ARGB8888_1X32",
>   		.code = MEDIA_BUS_FMT_ARGB8888_1X32,
> @@ -679,6 +693,34 @@ const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
>   		.bitsPerPixel = 16,
>   		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
>   	} },
> +	{ MEDIA_BUS_FMT_SBGGR20_1X20, {
> +		.name = "SBGGR20_1X20",
> +		.code = MEDIA_BUS_FMT_SBGGR20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGBRG20_1X20, {
> +		.name = "SGBRG20_1X20",
> +		.code = MEDIA_BUS_FMT_SGBRG20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SGRBG20_1X20, {
> +		.name = "SGRBG20_1X20",
> +		.code = MEDIA_BUS_FMT_SGRBG20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
> +	} },
> +	{ MEDIA_BUS_FMT_SRGGB20_1X20, {
> +		.name = "SRGGB20_1X20",
> +		.code = MEDIA_BUS_FMT_SRGGB20_1X20,
> +		.type = MediaBusFormatInfo::Type::Image,
> +		.bitsPerPixel = 20,
> +		.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 82824433726f..6f154caf5b0e 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -189,6 +189,20 @@  const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
 		.bitsPerPixel = 24,
 		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
 	} },
+	{ MEDIA_BUS_FMT_RGB121212_1X36, {
+		.name = "RGB121212_1X36",
+		.code = MEDIA_BUS_FMT_RGB121212_1X36,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 36,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
+	} },
+	{ MEDIA_BUS_FMT_RGB202020_1X60, {
+		.name = "RGB202020_1X60",
+		.code = MEDIA_BUS_FMT_RGB202020_1X60,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 60,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
+	} },
 	{ MEDIA_BUS_FMT_ARGB8888_1X32, {
 		.name = "ARGB8888_1X32",
 		.code = MEDIA_BUS_FMT_ARGB8888_1X32,
@@ -679,6 +693,34 @@  const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo{
 		.bitsPerPixel = 16,
 		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
 	} },
+	{ MEDIA_BUS_FMT_SBGGR20_1X20, {
+		.name = "SBGGR20_1X20",
+		.code = MEDIA_BUS_FMT_SBGGR20_1X20,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 20,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SGBRG20_1X20, {
+		.name = "SGBRG20_1X20",
+		.code = MEDIA_BUS_FMT_SGBRG20_1X20,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 20,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SGRBG20_1X20, {
+		.name = "SGRBG20_1X20",
+		.code = MEDIA_BUS_FMT_SGRBG20_1X20,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 20,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
+	{ MEDIA_BUS_FMT_SRGGB20_1X20, {
+		.name = "SRGGB20_1X20",
+		.code = MEDIA_BUS_FMT_SRGGB20_1X20,
+		.type = MediaBusFormatInfo::Type::Image,
+		.bitsPerPixel = 20,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW
+	} },
 	/* \todo Clarify colour encoding for HSV formats */
 	{ MEDIA_BUS_FMT_AHSV8888_1X32, {
 		.name = "AHSV8888_1X32",