[libcamera-devel,v2,3/7] libcamera: v4l2_pixelformat: Add entries for NV24 and NV42
diff mbox series

Message ID 20210908081437.4022697-4-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • v4l2-compat fixes
Related show

Commit Message

Paul Elder Sept. 8, 2021, 8:14 a.m. UTC
The entries for NV24 and NV42 were missing from the V4L2PixelFormat map.
Add them.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 src/libcamera/v4l2_pixelformat.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Laurent Pinchart Sept. 8, 2021, 9:26 a.m. UTC | #1
Hi Paul,

Thank you for the patch.

On Wed, Sep 08, 2021 at 05:14:33PM +0900, Paul Elder wrote:
> The entries for NV24 and NV42 were missing from the V4L2PixelFormat map.
> Add them.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

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

> ---
>  src/libcamera/v4l2_pixelformat.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
> index e0956442..0a8312c4 100644
> --- a/src/libcamera/v4l2_pixelformat.cpp
> +++ b/src/libcamera/v4l2_pixelformat.cpp
> @@ -97,6 +97,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
>  		{ formats::NV21, "Y/CrCb 4:2:0" } },
>  	{ V4L2PixelFormat(V4L2_PIX_FMT_NV21M),
>  		{ formats::NV21, "Y/CrCb 4:2:0 (N-C)" } },
> +	{ V4L2PixelFormat(V4L2_PIX_FMT_NV24),
> +		{ formats::NV24, "Y/CbCr 4:4:4" } },
> +	{ V4L2PixelFormat(V4L2_PIX_FMT_NV42),
> +		{ formats::NV42, "Y/CrCb 4:4:4" } },
>  	{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420),
>  		{ formats::YUV420, "Planar YUV 4:2:0" } },
>  	{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420M),

Patch
diff mbox series

diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index e0956442..0a8312c4 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -97,6 +97,10 @@  const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
 		{ formats::NV21, "Y/CrCb 4:2:0" } },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_NV21M),
 		{ formats::NV21, "Y/CrCb 4:2:0 (N-C)" } },
+	{ V4L2PixelFormat(V4L2_PIX_FMT_NV24),
+		{ formats::NV24, "Y/CbCr 4:4:4" } },
+	{ V4L2PixelFormat(V4L2_PIX_FMT_NV42),
+		{ formats::NV42, "Y/CrCb 4:4:4" } },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420),
 		{ formats::YUV420, "Planar YUV 4:2:0" } },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420M),