From patchwork Tue Sep 12 10:24:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18989 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 DCE9EBE080 for ; Tue, 12 Sep 2023 10:24:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2AA74628ED; Tue, 12 Sep 2023 12:24:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694514290; bh=60ZGXcxuLpF9cczFZU0QXPVvFra06Vaj+l0A8s0ctU8=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dM7lyPH0velK6qnz3mrtMf63o5npfWWRA3fyHS2Bx5UF0AlCAAnYpKRZevu/6fUzF nIg+B7VqXW6AfL/Ier+I//hdCGDAB/AllHHa3XJZ36RtwBIt6v+h31QaCLosoLqpMN jth4JYq10D9rjISVvoLHETzyvmKkwU1jpfPQWRyXHBl8LEBykx8QfsDvB+uwt4bCP/ fBQ9MqjZhA0nbO1J33POJwyZYPrTvEvaxiJrPfkqKhWoovpi3XwZSdUQYn2QnM6ObL QYFZzb2ixcIOXxJFcWZXnRuap5T9mbLSbMcF7YU/C0KyCoqZWBD6i7V1x50jb+veXy 5JtbX4uRpUPJQ== Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9838861DEF for ; Tue, 12 Sep 2023 12:24:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="FTmC54qk"; dkim-atps=neutral Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-402d499580dso57608475e9.1 for ; Tue, 12 Sep 2023 03:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1694514288; x=1695119088; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MCT73aWqga6/Z8xV1Ep/VhfT5ek9WqYLTLH7Awcif9A=; b=FTmC54qk6lDK1nH30N4G+m+ozaDXQw4xm3Nj9a4U4SaskClf4ABjVT9t+3qg1gcZD1 CyLswbNOW+mJD6kq6mA7JPhUQLXY/R09OqEUSy5eHrnB1mP+62Rs5EdhoZK9QGmXZjWh xWlrSYCbNLXNH8SJ7e2vkgs38VedoxrM/RYe8iGhpsgy8Yb1N2XH3/+QSlGk9BsA/80A 3CMhM2qLneHY8iT/2MWmel/J2R/3kpbjwimYJjnf3LTr19EZCSZQewlInUwgGMLv18E+ rMVktJDZvlnsam/IHi63ODajcvtHIhinTiLNQjaPYTq7s5QdmSc+jWf9KR0EWilLsZSo iy4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694514288; x=1695119088; 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=MCT73aWqga6/Z8xV1Ep/VhfT5ek9WqYLTLH7Awcif9A=; b=rJpbf+jY91NKDesaR7hHQ20QGyD/ovGzVlTBOBUzL3vLX80C6h0s/B8SAtFZ99UPRG RgblMDNIS06EOuhHpKx5qS3U+rFh7MLepLu4HAaoBk5UGIbNcLgeBdpU7RdFUM0d0vF/ rmKB8h3iwT0WNkoFxqdYaS16n2fcPcQvcFct3JEcnwlAHDb52UNVHuKRhi2/3I4M7VxM M4yA46PE6SMRkaI2c3V87G07JW0nS4v3dxssN2XE9ivyyaar8LmrY6pRhbuRfWGI8OIs v+7H4NBLY9DUgvIY6lScDbFpmANiuMHZRYrTRAbn/h59nqvQIAn/024OPzqGult6e8om 8Mtg== X-Gm-Message-State: AOJu0YxduCsGKW6bVShcU5Fd+s0BjLMDz7fPN9AQDwTFE+7dQJDfMGf1 Z3BnIworurE3duqdtVxK8Sa7a7wZ/xGJ5LL75TI= X-Google-Smtp-Source: AGHT+IH7A5kFr57bU38I6OtXldBnxVt+33BH13PROtRdJEOZwc/Nleet+LlE2LpRMqUGzmdcfb2/Fg== X-Received: by 2002:a05:600c:204d:b0:402:e68f:888a with SMTP id p13-20020a05600c204d00b00402e68f888amr10409659wmg.3.1694514287788; Tue, 12 Sep 2023 03:24:47 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id n10-20020a05600c294a00b003fefaf299b6sm12426575wmd.38.2023.09.12.03.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 03:24:47 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 12 Sep 2023 11:24:37 +0100 Message-Id: <20230912102442.169001-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 3 of this patch set addresses most of the points that Jacopo raised in his review, so thank you very much for those! Mostly I've done all the suggested things, especially the little "tidy-ups", with a couple of exceptions. Jacopo suggested moving the addition of the setActiveChannels function into the first patch where it is used, though I've left it in the previous patch where AGC channels are introduced. But I don't mind moving it if folks would prefer that. I've also not made any of the changes to code that I simply copied from one file to another - probably best left for another day? I think there were a couple of things where I couldn't really decide what was better, but am happy to discuss those again too. 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 | 972 ++++--------------- src/ipa/rpi/controller/rpi/agc.h | 125 +-- src/ipa/rpi/controller/rpi/agc_channel.cpp | 1012 ++++++++++++++++++++ src/ipa/rpi/controller/rpi/agc_channel.h | 151 +++ 10 files changed, 1425 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