[v2,2/4] libcamera: formats: Fix sort ordering of R10_CSI2P
diff mbox series

Message ID 20240123143535.52255-3-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • Mono format fixes
Related show

Commit Message

Kieran Bingham Jan. 23, 2024, 2:35 p.m. UTC
Move formats::R10_CSI2P to be grouped with the formats::R10 counterpart
and keep the section of format declarations sorted in increasing bit
depth.

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

v2: new patch

 src/libcamera/formats.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Laurent Pinchart Jan. 23, 2024, 2:46 p.m. UTC | #1
On Tue, Jan 23, 2024 at 02:35:33PM +0000, Kieran Bingham wrote:
> Move formats::R10_CSI2P to be grouped with the formats::R10 counterpart
> and keep the section of format declarations sorted in increasing bit
> depth.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

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

> ---
> 
> v2: new patch
> 
>  src/libcamera/formats.cpp | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 46ccd43ba63a..8a606a7c37f1 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -497,6 +497,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  		.pixelsPerGroup = 1,
>  		.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
>  	} },
> +	{ formats::R10_CSI2P, {
> +		.name = "R10_CSI2P",
> +		.format = formats::R10_CSI2P,
> +		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), },
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
> +		.packed = true,
> +		.pixelsPerGroup = 4,
> +		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
> +	} },
>  	{ formats::R12, {
>  		.name = "R12",
>  		.format = formats::R12,
> @@ -517,16 +527,6 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  		.pixelsPerGroup = 1,
>  		.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
>  	} },
> -	{ formats::R10_CSI2P, {
> -		.name = "R10_CSI2P",
> -		.format = formats::R10_CSI2P,
> -		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), },
> -		.bitsPerPixel = 10,
> -		.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
> -		.packed = true,
> -		.pixelsPerGroup = 4,
> -		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
> -	} },
>  
>  	/* Bayer formats. */
>  	{ formats::SBGGR8, {

Patch
diff mbox series

diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index 46ccd43ba63a..8a606a7c37f1 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -497,6 +497,16 @@  const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
 		.pixelsPerGroup = 1,
 		.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
 	} },
+	{ formats::R10_CSI2P, {
+		.name = "R10_CSI2P",
+		.format = formats::R10_CSI2P,
+		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), },
+		.bitsPerPixel = 10,
+		.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+		.packed = true,
+		.pixelsPerGroup = 4,
+		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
+	} },
 	{ formats::R12, {
 		.name = "R12",
 		.format = formats::R12,
@@ -517,16 +527,6 @@  const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
 		.pixelsPerGroup = 1,
 		.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
 	} },
-	{ formats::R10_CSI2P, {
-		.name = "R10_CSI2P",
-		.format = formats::R10_CSI2P,
-		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), },
-		.bitsPerPixel = 10,
-		.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
-		.packed = true,
-		.pixelsPerGroup = 4,
-		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
-	} },
 
 	/* Bayer formats. */
 	{ formats::SBGGR8, {