From patchwork Mon Mar 27 12:20:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18469 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 7EE52BD160 for ; Mon, 27 Mar 2023 12:20:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CF0B662724; Mon, 27 Mar 2023 14:20:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1679919642; bh=jhve7MQByecHAY1EquiHrWj5xh5PrBlVQfraj10fqLU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=0BeENEWKKYnDoXw6/8T/zZJM7JMaaBXVu6x2f5M8hoq35iPwL7rMffy0ldTD5U/ST 2XRWdhUYwi2jtV0z3OGtbBD6hykgEKRoTwbSTo43WU1yEM1ppwsB6q5w+UxX/gGiIp wBOOND5P8pHfOQlzlDNbCkSU4PKjVvuj3sFKqKTUQ6m4J9Mabn3Ha7s/YbiBMMd0MT W5RvPvjLz5UsBMFyBBwU025gbj7FiI0NiH8dhSq9RapZY7OToMqAKTl1eEok6rlacK z4CyZ1GM37GsMEwt2OtXnz7PqYjEbKP8/5b3xZUntlSqRu1UkUUMEOLqMrrS6xZ61+ 5h/6sCnWPXVpA== Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F34E626D7 for ; Mon, 27 Mar 2023 14:20:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="p1MRZlPS"; dkim-atps=neutral Received: by mail-io1-xd36.google.com with SMTP id z1so3780082iot.11 for ; Mon, 27 Mar 2023 05:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1679919640; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CSrmSfQ+jyApOtbef+A3U0BgU+h0cTLeutwrHCgdjSc=; b=p1MRZlPSWJOuVBzhgBcBPXJLhALfdCZnMFXoRZoC8a5Md074DoctUa+5BDn9JT6r/N I7Myg+m1KvtTBOdufShTcTnCpcZCZN3cGbKWt+XStjhUgPleO7RfSkkBm+H5j+CLWRPq EFGFHN/PJpsi26qd1l5agQCjuOV9WEKUwgmzdggZjr+6IO4L4nhBIFBzjaX5KhqaNnzl +WIo/M9KI3FllhdYmC2QtVjLy//NHAKWVT52CJ6UhcAoib/eVCzhARWTnDgboq+3TvQt 2XvUICerzIk6rh1UI0qF3egI9HKpFZz5AhmUNZiMTcrqDnV3IY0jm5WOSw2eppR8dKLy XK9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679919640; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CSrmSfQ+jyApOtbef+A3U0BgU+h0cTLeutwrHCgdjSc=; b=Sa1AufJunACEDvSVavkDAxjRdH2GZmK/3WMMnB4Gdwj9D30z3oXOIVcUCu2pWcJDnY o6lvQ313UTp6zVKS0i+NcKAwAw8InRuyVD89jFDbNVZmlpjvB1zAoUnREsINfAY88aBS mxY1F2TfT5TgkzWmiSvUpwtjTaseo2AIf5IFEciLRITs2FFLcWpwHKRp2hZetCI0hJCB B4ZFxwSDJAAhPv8cr4H8uN6WxYfgBsWUZBaGgtZyQUvxq8hzT7MfIwzney5uK3l6IFs3 cIQauWcwaN+gd8n3Ipq7PRhJmErJdGAey38/1+TAbCfhSUtrJncAxADKfEQ7cqYTvni/ +5rA== X-Gm-Message-State: AO0yUKWPLHyybot3NBw2qmzDmyKPtt/GZaFNFJL9J0x5lWX+8BmT1TJ6 6/FYWH9Fa0WZa4aW9XyntW24lNbKKpltEXIgZX0ZXg== X-Google-Smtp-Source: AK7set90rQplo55v2lCdDanj3jV/FVWhGl2MOXvZNZcdZTDNSyAH39H4T7pqFJXQ6X0DhSUbSQxgaA== X-Received: by 2002:a6b:5b17:0:b0:74d:1318:618c with SMTP id v23-20020a6b5b17000000b0074d1318618cmr9081691ioh.10.1679919639864; Mon, 27 Mar 2023 05:20:39 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id r7-20020a5edb47000000b00758ff97aaedsm3239026iop.16.2023.03.27.05.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 05:20:39 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Mar 2023 13:20:20 +0100 Message-Id: <20230327122030.11756-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 00/10] Raspberry Pi: Generalised algorithms 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, Version 2 is a minor update that addresses Jacopo's review suggestions. However, there is also a change that removes the redundant "rpi.focus" algorithm from our source tree. This is the algorithm used to report focus measures out to the application. It is replaced by code in raspberrypi.cpp that does exactly the same thing. Regards, Naush David Plowman (2): ipa: raspberrypi: alsc: Replace std::vectors by Array2D class ipa: raspberrypi: alsc: Use a better type name for sparse arrays Naushir Patuck (7): ipa: raspberrypi Store the target string in the controller ipa: raspberrypi: Add hardware configuration to the controller ipa: raspberrypi: Generalise the ALSC algorithm ipa: raspberrypi: Generalise the contrast algorithm ipa: raspberrypi: Make RegionStats::get() always return a Region struct ipa: raspberrypi: Generalise the agc algorithm ipa: raspberrypi: Remove the focus reporting algorithm Nick Hollinghurst (1): ipa: raspberrypi: Generalise the autofocus algorithm src/ipa/raspberrypi/cam_helper_imx708.cpp | 23 +- src/ipa/raspberrypi/controller/algorithm.h | 8 + src/ipa/raspberrypi/controller/alsc_status.h | 13 +- .../raspberrypi/controller/contrast_status.h | 11 +- src/ipa/raspberrypi/controller/controller.cpp | 37 +++ src/ipa/raspberrypi/controller/controller.h | 15 + src/ipa/raspberrypi/controller/focus_status.h | 20 -- src/ipa/raspberrypi/controller/pdaf_data.h | 21 +- src/ipa/raspberrypi/controller/region_stats.h | 4 +- src/ipa/raspberrypi/controller/rpi/af.cpp | 176 +++++------ src/ipa/raspberrypi/controller/rpi/af.h | 29 +- src/ipa/raspberrypi/controller/rpi/agc.cpp | 20 +- src/ipa/raspberrypi/controller/rpi/agc.h | 9 +- src/ipa/raspberrypi/controller/rpi/alsc.cpp | 291 ++++++++++-------- src/ipa/raspberrypi/controller/rpi/alsc.h | 83 ++++- .../raspberrypi/controller/rpi/contrast.cpp | 30 +- src/ipa/raspberrypi/controller/rpi/contrast.h | 1 - src/ipa/raspberrypi/controller/rpi/focus.cpp | 49 --- src/ipa/raspberrypi/data/imx290.json | 3 - src/ipa/raspberrypi/data/imx296.json | 3 - src/ipa/raspberrypi/data/imx296_mono.json | 3 - src/ipa/raspberrypi/data/imx477.json | 3 - src/ipa/raspberrypi/data/imx477_noir.json | 3 - .../raspberrypi/data/imx477_scientific.json | 3 - src/ipa/raspberrypi/data/imx477_v1.json | 3 - src/ipa/raspberrypi/data/imx708.json | 3 - src/ipa/raspberrypi/data/imx708_noir.json | 3 - src/ipa/raspberrypi/data/imx708_wide.json | 3 - .../raspberrypi/data/imx708_wide_noir.json | 3 - src/ipa/raspberrypi/meson.build | 1 - src/ipa/raspberrypi/raspberrypi.cpp | 69 +++-- 31 files changed, 507 insertions(+), 436 deletions(-) delete mode 100644 src/ipa/raspberrypi/controller/focus_status.h delete mode 100644 src/ipa/raspberrypi/controller/rpi/focus.cpp