From patchwork Mon Oct 28 03:04:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Hou X-Patchwork-Id: 21759 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 87CC3BD78E for ; Mon, 28 Oct 2024 03:05:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 90EA060360; Mon, 28 Oct 2024 04:04:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="nxDSDJ8Q"; dkim-atps=neutral Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20617.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::617]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6497060360 for ; Mon, 28 Oct 2024 04:04:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KlGvh3bkcFCAcyihK/3LoGLyWSrZPVnwMVhMZz1HLFsJXBs4EKgVfZyXKq7tUnHzFz289SySjYBqJTD/Y7ihmLejKU5sH21vlqxrRssGV4mC5thc06hLXEhPmpb+ojNKa82mkVg4H+ZwghKJ77RKVxATT3lGzKTBwRBH2oPvqZEPb9mQ2OKMEiRw9hi67VaU+10r2C5fEOt7e6j6iLApGFHvlbWn5NemxMfZYRYC8myZEbSxDjnGvbFUTw9dM1Vdym0L1Kil/zxdT4EjKvF+yZVUbhdNSzob3JUCNXogqt/6VXnMw4kFmI2NQSgxvwlkOzZOdb/Yn4HlBCxYOs9e+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0tIg5zpjppPXk/UqN8MldnbOTeTUVf9izxOkB5qrrtA=; b=zB9Ois/0mZzDGZIslLuqhnlKy+tWLyEQvIH3Btco4zDbCtG/hul0eSlzybxxxDNKUwtDn5iBjUQsemoV7Zqu9uWckF0tPHrxB9JJO9tJuHnUTfvE/5I9jh2R8XP7/0Kxtl1tOLslPFJ41MQzirSQ+uFor3Q1v/2L9Hf62ny2PrDmZWuv5kCfJov1HKPhnnfzBojtk+l+vSDp0w4m9R6pV25FPaczlGG98M9YBodtxfiI3Qp6i5le3tQZ6qAosLkW1LgyrYHP79DW9R4kK7Kp0ewcmpwtwxRt3noS4oAyfaP7xKo9d8mOK+fHcNJd+Us/ITVKhFRoFMN6uB7S6ZbDgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0tIg5zpjppPXk/UqN8MldnbOTeTUVf9izxOkB5qrrtA=; b=nxDSDJ8QxjchPeJOaPc5nLHizJyO/GXmvcJPGTOCm1Umi239Pbs107FJIeH7yvOiTe47x+T6ht9YPMibqPTOmMnuE/Fgossj7ClzCAVd8DcdvZSVzSq6INjv2wTbkHCUDeRF3cQzLWyH3jxgS8XN1xQmWaDJBJ3Ba2Yhqe7eV6C6BbJxtLfTNInACarTq+NaGbsVDZ5A5vHv5ZhBG00YG+s0uze8yMXgyqR+AeTJ9ccWUGv3nAul+hQWXCCBkBmg9sq/bA+K12paLwOtWqbHXQVRSwoO8k+etjKar3jo35Ci32ePDYinONWdivHpsIhIaliNcmCsChPdCkTSy7QzSA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8285.eurprd04.prod.outlook.com (2603:10a6:102:1ca::15) by GVXPR04MB10518.eurprd04.prod.outlook.com (2603:10a6:150:1eb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 03:04:53 +0000 Received: from PAXPR04MB8285.eurprd04.prod.outlook.com ([fe80::e003:8fb:64ea:acfd]) by PAXPR04MB8285.eurprd04.prod.outlook.com ([fe80::e003:8fb:64ea:acfd%6]) with mapi id 15.20.8093.021; Mon, 28 Oct 2024 03:04:53 +0000 From: Hou Qi To: libcamera-devel@lists.libcamera.org Cc: jared.hu@nxp.com, qi.hou@nxp.com, julien.vuillaumier@nxp.com Subject: [PATCH v2] libcamera: formats: Change bytesPerGroup of RGB565 and RGB565_BE from 3 to 2 Date: Mon, 28 Oct 2024 12:04:28 +0900 Message-Id: <20241028030428.1813579-1-qi.hou@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR01CA0121.apcprd01.prod.exchangelabs.com (2603:1096:4:40::25) To PAXPR04MB8285.eurprd04.prod.outlook.com (2603:10a6:102:1ca::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8285:EE_|GVXPR04MB10518:EE_ X-MS-Office365-Filtering-Correlation-Id: 75201abe-e6e4-435d-78da-08dcf6fd4b88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: HmNiFAzwgTs0IyWXMPkR4Zy+FQzyN+JZwz08BZNkbLfcsLH26Rp4cwiif1oqWZSL5PpHD06D1qQ3xqW9yK0/9QZ+4OJrhDcudKcns6DbmvnDHX7UNFpJU856P5X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P674OvBR9P/Hn2YBk2vTgbcbH61/Jsg8n5xMzj4DQXsMKmkJN1yxN30GNBje798o+6ty4pfpz+rk3AKxdtuSKsG+t5pyvCsME+AokSB2BtZAMrmDupYscQvNNsSP3/m0EKOc5gTAxyuUPYzwjRNvoauUCvjfeOtfiQZvTo4lMirzIaGNi+0g= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8285.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xxjp4cVQEQ/6sFGAUXukzxMXxrmGrarLyFoJmLyio4fiDRjffTZvgB2rwGlzLD8LIQf4dSAnA4khsrO0T6Ys0OEk+7apWwureyFPr7eRkEaUJCa6NnutIFLkZRy1enklstwaBljkkpOQDZy2EbdqXTze/SHOqKvE0f8Ymz1dgRzSaypUOA1BtldyMz6b7axx0DtwXVrOYozzHYZZ82gwKDZy6hUzVwUK3pJHH/zC0wEu62cs+4RqKQLqpv+mFKX/8b86oV+ouSAB/dgKEUpNBK1Wu312Et1xg7xzWC8MnEhUute+PIWgO7fwtIoRkswm0jKD/Q+FUEmT19HEewyfZZkglzec/gIjdV4IFSNmItRcvil6SWq/xr6VmUC7pKSW40KzREACesMNCJ0gCQo51srb0CDzFlhjGq1HcQns5pAoC/i+cn0GsLJhRsO1OBzTxOVD8BkKZNcaLBFic/zWpTLKh0PNzsWcf6/IaM5FzEtw2tNskSe+yMqAJDnY280Yui4SVKnwxypDK5JIRo5ENAuq01uC8jTjwLcoI7e4Achz2uJLthN3BTRapCqrBMVPfT8nawlahlyjwZ4bI53DVBfov6YS/0+qkcLGekEi7XtpAxTyEwCXj9QQZWNIwz8gLXUDbhNUUua2oTAgL2MtGwrCPcE22Y9pq0Kz6wpNuf+OmRC+FHtqDy7oFrrrzIA74oM86fg+gyLNc3ZbkAQnnyNWUwSVRGzjrVyF7GaGjGQN5bcKPovxCJmXZ+4KXMa91cYj928hn/v5klff3yBBn1FZbLfYhOCVOPJDmbHV/f4tivxluaIFASxJDG+dg7FWY2yvijXZ2rN5M8e3EdvTIhTzfy6NrmD4o/+oGryLAFvgb8kJiJ5S7SP8jIhX0M3b+O89jc8x+buPdgPx9b2qlZDPvPs91+KXtLjpq9tNGGCXcm6cjqzqmb9upXaFrpn1/DRcY3P99fblahnPhsM7Kf1jOopPkmhVxDYhDw+/KzwGmxnoDzOS9KQpIDlOHJMIe0pbxXQ/iaHaE2fufeRAsFIZjvrhYNe8PLUcNzd/Lx4cNGU2nOb6STpfvYrqnhQ9oKe8CQGyJM1Ao5KbZstlAG69xePAzucztgbYH7TfhTxQBQWwdgPjCpVWfEV5JV6gzJqkossBz95rkULTGgTAXWUUj9Vtskj3w0TsQQ1valLBYnugrleusAW/x0TNdVP2C30+/YIoD7ZiPphujwGbbwJRCZahBH2Bj6m1tLnyQuyTK+fyQ2ZW+ejRDtnqcV3o+3tSJt11mQwvfituyMoQdO3904+g8TWXzc2VTKU+Tya2HmPI1HHn9ZCmaYgX6oqjawzqr5eAsxKc0f20LJz7tRMo+JC6JQgovietVBSafdt2y2HiXm4IDfTuHP69S9Pf5STgPxgfTzIeAxeHMQDcAYg0qkCfjvasNGL4itmSCFDp5b2nym3ichRfxQEW29UQpYVqNYa/SIpo00JQZOL5+k9h1E0kYmJMUFWvYNjXloVQrzPIab0kH0xEsXYZjnTdiZEQfZwrXmtT+yhcGNkIA3WQXz9aRD8nuNbjUmtDa/0= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75201abe-e6e4-435d-78da-08dcf6fd4b88 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8285.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 03:04:53.7110 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5BV7T/8D/lrdOiNWdG56Ym42zxjJ5NLWrFKST7Vd05R+rbzx/FHF3LYZ7kmOoy+b X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10518 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" The RGB565 and RGB565_BE formats incorrectly specify a wrong value of 3 bytes per group of pixels, when they actually use 2. Fix them. Signed-off-by: Hou Qi Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/formats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index dbefb094..bfcdfc08 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -157,7 +157,7 @@ const std::map pixelFormatInfo{ .colourEncoding = PixelFormatInfo::ColourEncodingRGB, .packed = false, .pixelsPerGroup = 1, - .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, } }, { formats::RGB565_BE, { .name = "RGB565_BE", @@ -167,7 +167,7 @@ const std::map pixelFormatInfo{ .colourEncoding = PixelFormatInfo::ColourEncodingRGB, .packed = false, .pixelsPerGroup = 1, - .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, } }, { formats::BGR888, { .name = "BGR888",