From patchwork Sat Oct 19 18:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 21703 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 12474C3302 for ; Sat, 19 Oct 2024 18:44:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EAB9B6538D; Sat, 19 Oct 2024 20:44:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="jBCl06NM"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E1B7065380 for ; Sat, 19 Oct 2024 20:44:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1729363450; cv=none; d=zohomail.com; s=zohoarc; b=XOE6xB1veE6snB4Ygth6aajWBibWVQZ/TzQSDPC983NfzmwI/VSvRlbHL/o8WsKo1Ia0zl16aIdjcxqetW9JUfaEA0iO3dch8WFrytEFukHFabWngWrBNhjhFhncaY73w/ufp8QSSYU6bO7hERjJdDnc7Y6wFA/3tgG5ejhBjRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729363450; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=knZ82CySN+eCHh67b8pL3OWDNyMRSzBhtlrAv/RofvM=; b=FCMdeMekxa+XBcO28M7voitVVkokkthbzJTNUbL3y/VN1tda85ECIh97bbSnLoKTQpEcpltg1tDKz+HqOkx+oRkRW7AOr2mb8iwVUsTd7DnN0vINbZSWNkBkDyYXK3xIvZWThY9ySLoLWTQOd2of5Cg0h+NqpcspiQeQA6jIiiw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1729363450; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=knZ82CySN+eCHh67b8pL3OWDNyMRSzBhtlrAv/RofvM=; b=jBCl06NMbl6TyDhjUb4Oguc1Zq92woELdbQDE0ZHMtxbYB5riGwWUYn/47Ow9U2O aDIHcLjJN+wLRHhQo1ESc94rRlPbOxzG/lGHh4aOjjvQYs1Jjr8VhOddHVNCQUUfveh yVZR1oaugbkcHfMisTH19Db04ZgwAuwE+WHsSC94= Received: by mx.zohomail.com with SMTPS id 1729363448036674.2882559438096; Sat, 19 Oct 2024 11:44:08 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH 1/2] libcamera: software_isp: Stop clearing context config and state again Date: Sat, 19 Oct 2024 20:43:39 +0200 Message-ID: <20241019184340.111785-1-robert.mader@collabora.com> X-Mailer: git-send-email 2.47.0 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" This partly reverts commit 41e3d61c, removing parts that had unintended side effects as the intention for the commit was purely to fix crashes. Clearing the configuration turned out to be problematic as some values such as configuration.black.level only get on initialization and thus were never used. Clearing the activeState resulted in additional, arguably undesired churn, very noticable when switching back and forth between cameras. Whether this is desirable is AFAIK a matter of taste/policy and shouldn't have been done as part of a crash fix. Fixes: 41e3d61c ("libcamera: software_isp: Clear IPA context on configure and stop") Signed-off-by: Robert Mader --- src/ipa/simple/soft_simple.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index c8ad55a2..065673dc 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -185,8 +185,6 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) const ControlInfo &gainInfo = sensorInfoMap_.find(V4L2_CID_ANALOGUE_GAIN)->second; /* Clear the IPA context before the streaming session. */ - context_.configuration = {}; - context_.activeState = {}; context_.frameContexts.clear(); context_.configuration.agc.exposureMin = exposureInfo.min().get(); From patchwork Sat Oct 19 18:43:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 21704 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 6D54BC3302 for ; Sat, 19 Oct 2024 18:44:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BCFFE65382; Sat, 19 Oct 2024 20:44:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="HzMErhS8"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 847DB65382 for ; Sat, 19 Oct 2024 20:44:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1729363452; cv=none; d=zohomail.com; s=zohoarc; b=Rk61GVMfqOG/FVHwD3KcyrkIrBybRpIsCYHGMh0H5x50mIAfFddorzd8XDQohvXipmyIJA0yuCMT7IIPtGiqgI9WfCwb3GGaStFoXNGpvRWC5zsEdGlm+P7F+qqC3XaU3NlO4grcBqMahG41kB6vBljrP0KXe+o7RsBPmLutWyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729363452; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ms0GbiLbv3HjBkOx9TpxK5w5qoRFRJEwwsk3W0kGKb0=; b=I7BM2Yhjq19V7rK4kTrRP69L6gCA3sd4zPfPcQoBHp4iPzTbvC3JNZNJRzJb/5AzAtWUw26NnJflYE9hDjpvv2577vl4667Q5jePm/RAZpBah1H6MA8halIOOoS35+BX7Zn7LEgYLWKQ6yjatSEzA5pZd/H1eA2f0Ap4QkLKP1M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1729363452; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=ms0GbiLbv3HjBkOx9TpxK5w5qoRFRJEwwsk3W0kGKb0=; b=HzMErhS83PBZ2XPT9hEQecUKDcuN0wpqZcDlf5yGXsk1e/hpavY+beeNHFf4MZcX 93rZUyveO0HVF3Vq9cxHaAKFwJvhY9ZyN7wnu5WXszuXNg11TB0z/vRRV3ZCzv9ggjW LyLXGYymSh+pm9RvjaSAfMEibMpAhbe25pKd/ynA= Received: by mx.zohomail.com with SMTPS id 1729363450961573.6471177936821; Sat, 19 Oct 2024 11:44:10 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH 2/2] ipa/simple: Add tuning file for IMX355 Date: Sat, 19 Oct 2024 20:43:40 +0200 Message-ID: <20241019184340.111785-2-robert.mader@collabora.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241019184340.111785-1-robert.mader@collabora.com> References: <20241019184340.111785-1-robert.mader@collabora.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" 64 at 10 bits. The value was guessed from known values for similar sensors and testing - on a Google Pixel 3a - suggest it's correct. Adding this tuning file is partly motivated in order to serve as example, as it's the first one for the simple IPA. Signed-off-by: Robert Mader Reviewed-by: Milan Zamazal --- src/ipa/simple/data/imx355.yaml | 11 +++++++++++ src/ipa/simple/data/meson.build | 1 + 2 files changed, 12 insertions(+) create mode 100644 src/ipa/simple/data/imx355.yaml diff --git a/src/ipa/simple/data/imx355.yaml b/src/ipa/simple/data/imx355.yaml new file mode 100644 index 00000000..f7d01b73 --- /dev/null +++ b/src/ipa/simple/data/imx355.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build index 92795ee4..6e690f82 100644 --- a/src/ipa/simple/data/meson.build +++ b/src/ipa/simple/data/meson.build @@ -1,6 +1,7 @@ # SPDX-License-Identifier: CC0-1.0 conf_files = files([ + 'imx355.yaml', 'uncalibrated.yaml', ])