From patchwork Thu Jun 16 14:23:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16236 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 1C927BD808 for ; Thu, 16 Jun 2022 14:24:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 211796563E; Thu, 16 Jun 2022 16:24:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1655389461; bh=YKnCC52Iz6fZ1SB6J7RRHGZAUhx5SuSb2rqUNVkE9So=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OBKXXWXUeC05nRzu6x/Oir7UbT/WlNzoTY+7I7DC8MYAqVtd9h4/tQ3lzvuZyGZyD UEyYpglHrDc9QY1FtqHenidCoAvnLZI9yVSCjbbUw4PILIR0gA/TpXuPMkHz674wig eWpmw2x+aJTWiH1EGy+Cmhib80I+h/bJm/8m8EKQSCuRUYmz55Ww9rYxHDXXa3a1/D bDxsmy5Lwe7YKuufVkKuvZcL2/UkTSsdUQyPOvbXnzzFHQZYWz02KTnIBG8IUcYn6e YR7FjptCfLrx+lX+PCqNpCXV9Tm/zoYdnG0Lsb+H22JPUF7ZfozZpZNLr5sPT/ePm2 r2w8Usv63vmkA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BF445600F0 for ; Thu, 16 Jun 2022 16:24:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="oMMkCWpv"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CA492415; Thu, 16 Jun 2022 16:24:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655389458; bh=YKnCC52Iz6fZ1SB6J7RRHGZAUhx5SuSb2rqUNVkE9So=; h=From:To:Cc:Subject:Date:From; b=oMMkCWpv9zYcsmJSfWd8ZyBxFGs1zVepnwlzKkMhNQOkwrsKBGFrKUu/KHMJGo3J/ kMMGxep0hbAUFQZ+hukvlBW3c//oDiI5zVc84bMTul8FVnxS2BcpywMFucX+yDV1Mc LsU2LzMp7svYQFKf1bBSPCYxuOJcxPNQ3BsFCT9g= To: libcamera-devel@lists.libcamera.org Date: Thu, 16 Jun 2022 17:23:56 +0300 Message-Id: <20220616142403.20723-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/7] libcamera: yaml_parser: Add iterator API 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series adds an iterator API. It is a subset of the previously posted "[RFC PATCH v2 00/14] Replace boost JSON parser with libyaml in Raspberry Pi IPA" series. I have dropped the part that touches the Raspberry Pi IPA due to the ongoing discussions about YAML mapping ordering. This series is closer to RFC v1 than RFC v2 (with a small additional drive-by cleanup in patch 1/7), and introduces an unordered iterator API (patches 2/7 and 3/7). This is already useful to use the iterators in the Android HAL (patch 4/7), but more importantly, this will be useful for the ongoing work on the RkISP1 IPA. Patches 6/7 and 7/7 are meants to support that use case. I will post a separate series that then moves the implementation to preserve the order (without any change to the API), and move the Raspberry Pi IPA from boost to YamlParser. Laurent Pinchart (7): libcamera: yaml_parser: Use std::is_same_v<> libcamera: yaml_parser: Add iterator API test: yaml_parser: Extend tests to cover the iterator API android: Use the YamlObject iterator API libcamera: yaml_parser: Remove memberNames() function libcamera: yaml_parser: Fix range checks for 32-bit integers libcamera: yaml_parser: Add get() specializations for 16-bit integers include/libcamera/internal/yaml_parser.h | 132 ++++++++++++++++++++-- src/android/camera_hal_config.cpp | 6 +- src/libcamera/yaml_parser.cpp | 135 ++++++++++++++++++----- test/yaml-parser.cpp | 99 +++++++++++++---- 4 files changed, 309 insertions(+), 63 deletions(-) base-commit: 71bdc1e441eba73ad80272573503445648d5ea9c