From patchwork Thu Aug 4 13:21:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16965 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 97254C3275 for ; Thu, 4 Aug 2022 13:21:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6C00E63330; Thu, 4 Aug 2022 15:21:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659619282; bh=KqRur3i/TATRaJ82wn7XzuzoKREwA2OChZS+fs5ySYg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=TNHXBTZsgtLBdVWZ9E2xS/kYXyYsbVkDnsDwCRNA2pIOnFoMC+nCQOJlQwWkW2rQO JnBsCHKA3/x4/kx19E9JAJJeW8E+rPjAo1OeGbp1c6YaHhRmffMHs1gul6e+ve0VMd 8YNqk2Bv6M9HKpX490fvjcOpxy/WYjZWhj60JWsQFSX0UAXF96HVNI0tHlTPu/LE2o 8/3nBfRqBvkp6ppiK2WpY5Pd+G9tHZtUyQD1W368o++BBz9wOgQbebCiTAN/8qmTvM OH3nfpMR2HVXoBVt91AVeN6pJz+gM9PWUYuDe2oQW9U6x9ElOcz8pDJBQPgEgPB3qj w1a7SgsTflB7A== 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 030386330D for ; Thu, 4 Aug 2022 15:21:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SlwT3vnc"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DF9A6BD; Thu, 4 Aug 2022 15:21:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659619280; bh=KqRur3i/TATRaJ82wn7XzuzoKREwA2OChZS+fs5ySYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SlwT3vncwqvophF029Ok+Q3xpOvLz9yue1Q3yaAE70TkkmNITFwvhb+/RlvnQvu3P Tj/hlfg080GvgdxTeyKhQtwTlKw2qav2wQnVeSCmFf1LpITUtErpMtpxH39ak39jek GPf9CG5dUk9gARRJjV+I85g4rGsOhCKO3MDqk0v4= To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 16:21:11 +0300 Message-Id: <20220804132112.17604-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> References: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: rkisp1: Use YAML 1.1 for tuning data files 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" YAML 1.2 support has been added in libyaml in version 0.2.3. Debian stable ships version 0.2.2 of libyaml, which causes parse errors of the tuning tuning data files due to the YAML 1.2 directive at the beginning. As we don't use any feature of YAML 1.2, downgrade the data files to YAML 1.1. Signed-off-by: Laurent Pinchart Reviewed-by: Florian Sylvestre Reviewed-by: Kieran Bingham --- src/ipa/rkisp1/data/imx219.yaml | 2 +- src/ipa/rkisp1/data/ov5640.yaml | 2 +- src/ipa/rkisp1/data/uncalibrated.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipa/rkisp1/data/imx219.yaml b/src/ipa/rkisp1/data/imx219.yaml index 232d8ae8d58b..ce3d547f780c 100644 --- a/src/ipa/rkisp1/data/imx219.yaml +++ b/src/ipa/rkisp1/data/imx219.yaml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: CC0-1.0 -%YAML 1.2 +%YAML 1.1 --- version: 1 algorithms: diff --git a/src/ipa/rkisp1/data/ov5640.yaml b/src/ipa/rkisp1/data/ov5640.yaml index 93d7d1e709d3..45d4bb77f8ca 100644 --- a/src/ipa/rkisp1/data/ov5640.yaml +++ b/src/ipa/rkisp1/data/ov5640.yaml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: CC0-1.0 -%YAML 1.2 +%YAML 1.1 --- version: 1 algorithms: diff --git a/src/ipa/rkisp1/data/uncalibrated.yaml b/src/ipa/rkisp1/data/uncalibrated.yaml index bdbd5fda7eaf..a7bbd8d84263 100644 --- a/src/ipa/rkisp1/data/uncalibrated.yaml +++ b/src/ipa/rkisp1/data/uncalibrated.yaml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: CC0-1.0 -%YAML 1.2 +%YAML 1.1 --- version: 1 algorithms: From patchwork Thu Aug 4 13:21:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16966 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 3BD3AC3272 for ; Thu, 4 Aug 2022 13:21:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0098E6332D; Thu, 4 Aug 2022 15:21:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659619285; bh=5BIJqtpRNphTxpOdz1YKoDvfHEhXKO+dboprbhwo2ns=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DxT8kKIUvo/GLOdINrS4Ny9qV/mbwTxCvDOzZBYG1xHFescJQV8OzXm+5XOiGGMSK WRR+9pLjYvXsPMZSHLEhudHOyOCSaNcIdcd0GQRfymVaMtLKxqR+TnSRRIxITZ3ziS xBbaS1rqNqefQ6u/n+r4lRCs0FBsXPbLG/bCRbeGogu/WC9EGOly+DF0EPZkzwiddD DAy8qN2aDLuigSAkfeliaLqh3XKRMgmtQhOuHN4NUzTgWCSsENDPp3F9VaEQBwUNJm MWE70EG5+W9LlS1Rt6XimJuRZPbkvHUcBBpS4uSFrtNWubl3xfVkFN5rtGXad8gynS XQZosBDQsYpdQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 50EDB6332F for ; Thu, 4 Aug 2022 15:21:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XbLC7p/L"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C98956BD; Thu, 4 Aug 2022 15:21:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659619282; bh=5BIJqtpRNphTxpOdz1YKoDvfHEhXKO+dboprbhwo2ns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XbLC7p/L81dia0PRi4hCO6kO+wimrFCzCQh1tDBDlOBePavLcXKq4ye9b6UI5KOkf C5Yv/1gVGUgoU3OOfW/mZzlmLCsSWMpILQeIGDQnNLUeVdrC6DEV4jWbufdImi8RwJ x0ozZN0jJWMZG9DMJ0BZL06Lpg7ad0ywB9u5s4RA= To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 16:21:12 +0300 Message-Id: <20220804132112.17604-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> References: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: Switch internal YAML files to YAML 1.1 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" The python3-yaml package shipped by Debian is based on libyaml 0.2.2, which doesn't support YAML 1.2. It is documented as such: Python3-yaml is a complete YAML 1.1 parser and emitter for Python3. For some reasons the internal YAML files used to generate format- and control-related source files still parse correctly, despite the YAML 1.2 directive at the beginning. Still, given that we don't use any feature of YAML 1.2, and that the tuning data files now use YAML 1.1, switch the internal YAML files to version 1.1 as well for consistency. The main drawback of YAML 1.1 is that the unquoted literal strings Yes, No, On and Off will be parsed as booleans. We need to be careful to avoid those values in YAML files, until libcamera can switch to YAML 1.2 once more recent versions of libyaml get shipped by the distributions we want to support. Signed-off-by: Laurent Pinchart Reviewed-by: Florian Sylvestre Reviewed-by: Kieran Bingham --- src/libcamera/control_ids.yaml | 2 +- src/libcamera/formats.yaml | 2 +- src/libcamera/property_ids.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index ecab3ae97260..5510feefdfeb 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2019, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- # Unless otherwise stated, all controls are bi-directional, i.e. they can be # set through Request::controls() and returned out through Request::metadata(). diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml index d3fbf5f47211..e586cde1d705 100644 --- a/src/libcamera/formats.yaml +++ b/src/libcamera/formats.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2020, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- formats: - R8: diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index 11b7ebdc3105..cb55e0ed2283 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2019, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- controls: - Location: