From patchwork Wed Aug 23 12:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18950 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 1348EBF415 for ; Wed, 23 Aug 2023 12:09:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3B410627E2; Wed, 23 Aug 2023 14:09:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1692792561; bh=XwnetibQbGGDHpEuGTafE86TrBuchyz3daw7Pf30JoA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qYn3YJMM4HhngiTnmFKXz4bGX/QrJpGd06mHt0sdTMeoFiToTSrBzzkAVl03Yt1lf A4B1FJEbFPKrN+TuPkr0PEKEIiNB3zzUndQHMrllaVBkyBG7v3rnUKD9gC5bpCYXh/ miSnaWP+QJi++2KQzEEn3wuWrYGRJ9XF1gY23T0wxkL//yZw0FfPA38ZYPST2r85Yx TMZVPCrJ+dcBbA+zHPfHgvF6Zh1f8xFq4YLyPcdlIglCdx2ng/kh9GqOzGGf4+89Pp 01TCBqoSKkL6ve23wvaw+pvNhSENy8rcwg/6ZuxnC4w6FGl6RAOjwMWe2kiaXABWyG GS3VKh/gI/OAQ== Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 788BC60379 for ; Wed, 23 Aug 2023 14:09:19 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="XCCAcdzT"; dkim-atps=neutral Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so92139941fa.2 for ; Wed, 23 Aug 2023 05:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1692792558; x=1693397358; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N/aXcB2WPjrGsr/DZqhRsk5y/w31OC+YEXD1ohJqoro=; b=XCCAcdzTJWq+ZGMtFxg+xlaMJ/BiLHf541feVGDtFM5wdhsmkyaljLy8aEpO3ee+VM 9/bnR49LvE9X8VTqu+xM82Euj5EplOgKdrXpmn2UIstJXDQ1JvYGTn9PZ7G2Pn1E+Spl N3Uk6qLtkgSTQlZkjUkfvIOSf0Xaku+WLcQoa/0PMcn/R/vRaIC0vZwfBfVTxPv+GxgH 5B4uTKGRwm1aJQOqhCYUv07mJJ7sTxnHMp4j8XLWf54Jv8mi/K0WqVaqnl+pV1Tr3q7B s6NA1xrHEJES40ED/Auw36YMG8vKNbovkTw2dFMHpieXX2TIWrwCnxNluqIE4BOpmDDk 5L/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692792558; x=1693397358; 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=N/aXcB2WPjrGsr/DZqhRsk5y/w31OC+YEXD1ohJqoro=; b=Jo41bUmExG31z5gzHgeUsPiTYWHGJQOxGiv8rq8h0z+cFKBbXYGiq64k6Igs/AhIgr VnfPh3DIo5UECHOFTtrXn8T4Z4cXUxyWoiHFvT99RV6rAn4HWkShdyxTB0kOpBRWjkWR TTdreWlHp0nC7zxlPDZlqw4Te+Lez1eNXw7XOghH8pgGH9rCRhazx8oqioKCUfj+zXPN PNZjd/Yw4E0XFLGPgI4A3JUsXINqgeOE/SZ22emKDGWm7X/C5MQHsiRxB5SyZ8C2smwh SJWGWublsirIAU3wYs2mu51mr1jkMsyQw6ZvcXfeHkjtj6hRdXJW8JbfxCft/vy90ef4 G0hQ== X-Gm-Message-State: AOJu0YxkQgmfeJ9zeAroAI9DnHNrLHAgqTQz0uNHJxCz938Ng+SJO8rp FtF/qtL50A5IyFrgv180AN+64vO1pRIqtOtpQpg= X-Google-Smtp-Source: AGHT+IGfV/xKJqtMDI00YkxiK8oEgEorsqRJ9XEbfJYPeYEPFgrCaMBmMAtWxIDDYlEoF8Img79IXg== X-Received: by 2002:a2e:960f:0:b0:2bc:dfc0:1afc with SMTP id v15-20020a2e960f000000b002bcdfc01afcmr705068ljh.10.1692792558140; Wed, 23 Aug 2023 05:09:18 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id u1-20020a7bcb01000000b003fefcbe7fa8sm3800589wmj.28.2023.08.23.05.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 05:09:17 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Aug 2023 13:09:10 +0100 Message-Id: <20230823120915.18621-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/5] Multi-channel AGC 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi everyone Version 2 of this set has just a few hygiene updates as suggested by Naush (those are in patches 4 and 5). There's one further update to patch 2 because it was originally authored before the flicker control had been added. That flicker code also needs a minor modification in line with all the other AGC controls in this patch, and without it, the code would in fact not compile. Hope that all makes sense! Thanks David David Plowman (4): ipa: rpi: agc: Reorganise code for multi-channel AGC ipa: rpi: agc: Implementation of multi-channel AGC ipa: rpi: agc: Add AgcChannelConstraint class ipa: rpi: agc: Use channel constraints in the AGC algorithm Naushir Patuck (1): ipa: rpi: histogram: Add interBinMean() src/ipa/rpi/common/ipa_base.cpp | 20 +- src/ipa/rpi/controller/agc_algorithm.h | 19 +- src/ipa/rpi/controller/agc_status.h | 1 + src/ipa/rpi/controller/histogram.cpp | 22 +- src/ipa/rpi/controller/histogram.h | 2 + src/ipa/rpi/controller/meson.build | 1 + src/ipa/rpi/controller/rpi/agc.cpp | 969 ++++--------------- src/ipa/rpi/controller/rpi/agc.h | 124 +-- src/ipa/rpi/controller/rpi/agc_channel.cpp | 1019 ++++++++++++++++++++ src/ipa/rpi/controller/rpi/agc_channel.h | 149 +++ 10 files changed, 1426 insertions(+), 900 deletions(-) create mode 100644 src/ipa/rpi/controller/rpi/agc_channel.cpp create mode 100644 src/ipa/rpi/controller/rpi/agc_channel.h