From patchwork Wed Mar 22 13:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18427 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 A6BF2C0F1B for ; Wed, 22 Mar 2023 13:06:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CA5106270D; Wed, 22 Mar 2023 14:06:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1679490379; bh=WF8Wll4m4uK+yLCID/teg1dpVN+z5A9hZXLsj2Q1MXc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GlI13I51a4pgOsR7AQFoj1hLx9lZQ6fKjtbkzZGHpamBFV1DgaG2MceSMXbvn7HcB pmMqpdy05C2cWrw1GZREvQ/PoMYjG0DPhI3VCNSDom2FhwtGwZimcfB2GK/Aezi31D 3FLH4oiUkxO7o3TRQGIixQZbba7T0G8H7TL9T2LuxtRxT7qRccm1P3yOIU1W2YdoN8 SsMhJaEfPp8xNBXdBkXA4L2zQUN3o+hCtg3XSutygcLbG9toCq0MP4Ny2FUASFdW1l 2dUplstlHi3wUWQfiXxkrBEvACvFI5HvFHLT3X7IKTNGz1YoJcaSOJTz/H3t4m9fv/ CyL71snyZuivA== Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 16D7A61ECE for ; Wed, 22 Mar 2023 14:06:17 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Ro5RHmRj"; dkim-atps=neutral Received: by mail-io1-xd2b.google.com with SMTP id d14so5520210ion.9 for ; Wed, 22 Mar 2023 06:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1679490376; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=euXEkiT98mlp7jLjndD3nWFnhqZQxC7UoFiknG1A6Eg=; b=Ro5RHmRj+2iFXFOjIfsM0faFdd7rfe/6onXiu6+8ZaHGC55K7Dl6825A6i5aeWJfcU JP8F919mZcpZVwoIvhoSy0ZZlwih4m0pMPKCTHv18mGH4DYyFa2Y+lvmEK9+4ixg8BU8 S3ErI+AMvsDquwO56bVHc2uk51Ihk322O937o7Poya2UhQ+DKc/ejytzd4Ogmt3VgFTp k8l9jkjPtrKtEtiypy+E8NAZrAVnPhPgr0KFIL3zj7944cQrohSoxtyTlC68RezUGx1o 8pl4BLiVUElF/KDl0UQrhR3WsU54XjcG2ND4qXipr17C/fklgkPS+l6SjmqSr7wjv+u0 NVzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679490376; 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=euXEkiT98mlp7jLjndD3nWFnhqZQxC7UoFiknG1A6Eg=; b=oIRysH8cADSVKSth8obu204Qych/TQNOAXsaWarch60uZVQ54TrA7br9vFV0fODaBA smAaWS7dC/4Pk+K4tU2RbifyGc7jnrSA5zaHgbnGcIe5Phe+NbJTSbX09oFmpjf7MIba IAcJk8FbIGOCYk0CxjS22i3fzUKjCSMVhiRwcLwmMYLl53Y508zTwe6heQnsr8rbOdrF 87Ge13vh0uTMa6m9MD+xT+WEOXlBxmjJ71lVOuxI7lvAe6panPtiEr9gWhe7E8f7Xb+i ai/iCyNrxvGlTRmuwaU2RGLMEBPlJvx4+p7o3b8tXKioCSoSo5aqUcznVZnp4GsqS/S+ 9WXw== X-Gm-Message-State: AO0yUKWfew858hQ2vBtTlK2GepM/smXx5HbxXgliWR72ypVt5smfftSr o6M3T2ufnmvtXcIDJTv92iWLVLsh2gSnqKXmnDhnqg== X-Google-Smtp-Source: AK7set/c3xQrFqV6DMTji7xL5+21ImhvN3WP27hrNf1+evRUdznOqIWXzVof3KKKuOT/caleD+PdRA== X-Received: by 2002:a6b:4902:0:b0:758:a859:6247 with SMTP id u2-20020a6b4902000000b00758a8596247mr1238826iob.9.1679490376292; Wed, 22 Mar 2023 06:06:16 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id l6-20020a026646000000b003c488204c6fsm4927960jaf.76.2023.03.22.06.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 06:06:15 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Mar 2023 13:06:02 +0000 Message-Id: <20230322130612.5208-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 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, The aim of this patch series is to generalise our algorithm code as much as possible and remove any hardcoded assumptions about the hardware statistics structures. This is built onto of the generalised statistics struture work that has been recently merged. Along the way there are some tidy ups to the algorithm code, particularly ALSC where we use pre-allocated temporary arrays for the run-time calculations. 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 focus algorithm ipa: raspberrypi: Generalise the agc 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 | 45 +++ 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 | 161 +++++----- src/ipa/raspberrypi/controller/rpi/af.h | 28 +- src/ipa/raspberrypi/controller/rpi/agc.cpp | 19 +- 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 | 12 +- src/ipa/raspberrypi/raspberrypi.cpp | 64 ++-- 19 files changed, 498 insertions(+), 360 deletions(-) delete mode 100644 src/ipa/raspberrypi/controller/focus_status.h