From patchwork Fri Mar 25 09:25:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15550 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 CF909BD80A for ; Fri, 25 Mar 2022 09:26:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 270E66118A; Fri, 25 Mar 2022 10:26:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648200362; bh=Hq6LPYpQ+wgrIuqEqKTOFN+2FnsC58V2qPwvEGhBBtY=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=3qdVCQ7uVkQCSht6GsZCavxzdTuzZchnbXbGzuXu1Uberng/izi99aZs278AbtiKo 2OACp9Kxvie1IBA5aT4DrUh6jgHfgAgR59HPLWMUkCsqb/P6IXZJrefzOdo6Wox6go jiCPsOYFNcObvVHviEdWytj91cAX0O6KcHpTeecV9CnFQkevzn9nGQGzqC4tPUPS+5 PpkJHWjTOFMuLakgCYwLqtWfHDQtw0/F6rGr3BHO9uGZExPNHDCGdu5Xt6oV19F6aL FfPgWjiwxYe6hnY2zlEX7a/8UUuGg0QeD/TYkXCjWkDglXJ0LR7Xv0VO8LRkDDFFRk 4WELsJhsebmhg== 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 839A560136 for ; Fri, 25 Mar 2022 10:26:00 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mIRKgh6O"; dkim-atps=neutral Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EDE386F3; Fri, 25 Mar 2022 10:25:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648200360; bh=Hq6LPYpQ+wgrIuqEqKTOFN+2FnsC58V2qPwvEGhBBtY=; h=From:To:Cc:Subject:Date:From; b=mIRKgh6Oqxc8NNXTzBqW49DhiOiA2AUefnOB3zQOB9Txir4K7DrgsDbZ3EUc2biQh rGFIoOYXcCxiI3NeSrhs5Vv5ECj9Ney+CcUCooALNsSWwBTTpXfNbWiKlhjQwZZBvC gDUaJBUp4o284rzUt3Gd3H9D423GQgnIR16sPofs= To: libcamera devel , Kate Hsuan , Jean-Michel Hautbois Date: Fri, 25 Mar 2022 09:25:50 +0000 Message-Id: <20220325092555.1799897-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/5] ipa: ipu3: af: Small improvements 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: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Following review of the IPU3 Af implementation, the following additional improvements were identified. No functional change to the running of the algorithm is intended or expected, though this does remove a memcpy, and adapts to use a Span for range based iterators, as well as hopefully make it easier to use custom ROI's and return the AF regions in later developments. *** This is only compile tested! *** Kate/JM - could you test this please? v3: - Minor cleanups from Laurent and collect tags. - Keeping the two loop implementation of Af::afEstimateVariance to prevent risk of "catasrophic cancellation". Kieran Bingham (5): ipa: ipu3: af: Move constants to implementation ipa: ipu3: af: Use geometry classes to perform grid centering ipa: ipu3: af: Remove redundant memcpy ipa: ipu3: af: Use Span for y_table_item_t ipa: ipu3: af: Simplify accumulations of y_items src/ipa/ipu3/algorithms/af.cpp | 140 +++++++++++++-------------------- src/ipa/ipu3/algorithms/af.h | 15 +--- 2 files changed, 56 insertions(+), 99 deletions(-) Tested-by: Jean-Michel Hautbois Tested-by: Kate Hsuan