[libcamera-devel,v2,1/4] libcamera: bayer_format: Add unpacked mono 12-bit format to the conversion table
diff mbox series

Message ID 20220929072323.7400-2-naush@raspberrypi.com
State Superseded
Headers show
Series
  • imx296 colour tuning
Related show

Commit Message

Naushir Patuck Sept. 29, 2022, 7:23 a.m. UTC
Add BayerFormat conversions for formats::R12 (12-bit unpacked) format.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/bayer_format.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

David Plowman Oct. 3, 2022, 9:37 a.m. UTC | #1
Hi Naush

Thanks for the patch!

On Thu, 29 Sept 2022 at 08:23, Naushir Patuck via libcamera-devel
<libcamera-devel@lists.libcamera.org> wrote:
>
> Add BayerFormat conversions for formats::R12 (12-bit unpacked) format.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks!
David

> ---
>  src/libcamera/bayer_format.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp
> index c2a52f4740d6..f27cc1662d25 100644
> --- a/src/libcamera/bayer_format.cpp
> +++ b/src/libcamera/bayer_format.cpp
> @@ -191,6 +191,7 @@ const std::unordered_map<unsigned int, BayerFormat> mbusCodeToBayer{
>         { MEDIA_BUS_FMT_SRGGB16_1X16, { BayerFormat::RGGB, 16, BayerFormat::Packing::None } },
>         { MEDIA_BUS_FMT_Y8_1X8, { BayerFormat::MONO, 8, BayerFormat::Packing::None } },
>         { MEDIA_BUS_FMT_Y10_1X10, { BayerFormat::MONO, 10, BayerFormat::Packing::None } },
> +       { MEDIA_BUS_FMT_Y12_1X12, { BayerFormat::MONO, 12, BayerFormat::Packing::None } },
>  };
>
>  } /* namespace */
> --
> 2.25.1
>

Patch
diff mbox series

diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp
index c2a52f4740d6..f27cc1662d25 100644
--- a/src/libcamera/bayer_format.cpp
+++ b/src/libcamera/bayer_format.cpp
@@ -191,6 +191,7 @@  const std::unordered_map<unsigned int, BayerFormat> mbusCodeToBayer{
 	{ MEDIA_BUS_FMT_SRGGB16_1X16, { BayerFormat::RGGB, 16, BayerFormat::Packing::None } },
 	{ MEDIA_BUS_FMT_Y8_1X8, { BayerFormat::MONO, 8, BayerFormat::Packing::None } },
 	{ MEDIA_BUS_FMT_Y10_1X10, { BayerFormat::MONO, 10, BayerFormat::Packing::None } },
+	{ MEDIA_BUS_FMT_Y12_1X12, { BayerFormat::MONO, 12, BayerFormat::Packing::None } },
 };
 
 } /* namespace */