From patchwork Tue Jan 23 14:35:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 19464 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D586DC32BC for ; Tue, 23 Jan 2024 14:35:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 77CC262950; Tue, 23 Jan 2024 15:35:43 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KCLV4qw9"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A2E9262944 for ; Tue, 23 Jan 2024 15:35:40 +0100 (CET) Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E729B1BB1; Tue, 23 Jan 2024 15:34:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1706020467; bh=mesbsB+AloSGClq3XdJdl/JtYcGp5eAUO/GCK4W87wE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCLV4qw9sh3Zld9WHsNuGwiAbvy7UlxDuWJdt9By1HuxQrBaGMyPpLCPV/5HXNpGr iOjJNupXMRiK/C+qbK38VZFieJ4f7Q6VNE3Q1eQ13ZbCB/lSxfqsf+8nqIS+63XkuZ YZ1bBbeQB/4dC2mgp2taVr82ljvddF94CQX7dnvM= From: Kieran Bingham To: libcamera devel Subject: [PATCH v2 2/4] libcamera: formats: Fix sort ordering of R10_CSI2P Date: Tue, 23 Jan 2024 14:35:33 +0000 Message-Id: <20240123143535.52255-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123143535.52255-1-kieran.bingham@ideasonboard.com> References: <20240123143535.52255-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Laurent Pinchart --- 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 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 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, {