From patchwork Fri Jul 28 13:36:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18898 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 A5088BDC71 for ; Fri, 28 Jul 2023 13:37:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D7D3B627EE; Fri, 28 Jul 2023 15:37:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1690551424; bh=oXOSWnW8WeuDYahMlccbdowOBXGw04yZMfnvlcf7YR8=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=d5c4H97AbQChB7VnrwaQiH9i5n/sMmTqy+0+QwI5aYy16QwkOe9ijNl//xBgMMfFj dz22iDLE0/z3pzCyfLHR5ayPIDOFyTZ2cIy7y7tUHJOfs3C8SK6x3Ad4LDtXQCzuzi PcfCM4CllsiS0ji2rnl1ft6jabGLq6NHP74uOzcY4K9dLNPtA21PyeW+uqD1COZNJc 6sX3ePveRZ8pG30OFw/EfrHo8iuemTiFr9GvQ6BsoWcTi1annPI7CRXw8m6Wpo+EgI XOzbK5wDw2hkWwIFhx7rV3MqBaQWFeBpzIsErfVBuzkklGbbj5zW3yMn0t8VI3CR5F wG9OZyli31uug== Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D315627E6 for ; Fri, 28 Jul 2023 15:37:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qCJT/DoW"; dkim-atps=neutral Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3090d3e9c92so2193543f8f.2 for ; Fri, 28 Jul 2023 06:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1690551422; x=1691156222; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LtczxYVE1Y4h79dImUSdE2qXXjHwaJNey8rAfk0efgQ=; b=qCJT/DoWelbSwsG04TRpP0IHwc/8/p9u/5kUkJ7zPM1v9B81yn/KlysBnI0RO15vhU FY7kgLrsM+J3N2X65I/OxqQPHaWizuVS8kEU4kyzf77BNOcshG5s7rOMkvgpy+xDVGQm sODzMHimsxlawnaaiWwULrFxtSq8DgrR0fcHWgm1g1TXELyc5S50e4dU4ToD3dWU3xd4 dqFOwKSCmBU0HWipKGuqEJ+FOaQHptp/yKB+XsMukmnhGlgy4mpPf+e5U6BwZvkT0NFo wHHqzeSnZpgp6fwwAcp/+7TjoJhu074dCsLO8a+l6mTMCMkJ164xVtOoECw1qmQQMxlT MkFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690551422; x=1691156222; 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=LtczxYVE1Y4h79dImUSdE2qXXjHwaJNey8rAfk0efgQ=; b=C58ZKniAJ1spD/XXiUF2N3Ob2mHhFGnMEtQKgA2TFirHf0M2xL3zhhQ+1AV2z+05cQ usuGW/n++lj+g6lR4XSYbnqub+SEb46DhCizuOLMgOD8hGAyplXHFY8ThqszM1ndJuYh DEwxOfHQZj0/WbiLGqMqZnKeKChWLqC2Hn0WAIGDTYNFkaCd3r/LYenwzstPZCtlEOmd c3O3YZIJGm8GAFVnZKQtffs+2v1OqZ4llTxv4VmYHb/Gqyv6ra+kihGhabaKGd7wk4lR jvQRL6MtV/S7WDaD64Ukg6fxHJnOLESDtKKUJOhcNDhwJNQwpKg17d5O5rxJAxdNatIh yRSw== X-Gm-Message-State: ABy/qLZfhptZ21WWu0AZLA8VtiBKulOrtS8GabafVTLc7MOZR+Dz0McA IMP6PqXRDu90z2x6drqWXWStn8MuCnceuYP0Ubc= X-Google-Smtp-Source: APBJJlGkSmdbpGOzoVfPNJeVDUeIms1vUJKWeajNm4fJjKgGdB95lynEUffq8x6LPzi0HDfWQFHIiw== X-Received: by 2002:a5d:6192:0:b0:314:101c:42ba with SMTP id j18-20020a5d6192000000b00314101c42bamr1953065wru.54.1690551422381; Fri, 28 Jul 2023 06:37:02 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id i15-20020adffdcf000000b003145559a691sm4847758wrs.41.2023.07.28.06.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 06:37:02 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 28 Jul 2023 14:36:57 +0100 Message-Id: <20230728133700.3713-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Raspberry Pi AGC tidying 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 This short series just tidies up some aspects of the AGC/AEC code. None of it should have any functional impact at this point. There are 3 commits: * The first tidies up where we fetch the AWB status. * The second calculates the required digital gain in a more natural place which simplifies the code. It should probably always have been like this! * The last commit splits out a separate agc.prepare_status from the agc.status. Although it has no effect now, it will prevent surprises if we fail to call either prepare() or process(), or call them in a different order. This work is all preparatory to a rather larger reorganisation of our AGC that will introduce the idea of AGC "channels", allowing, for example, separate long and short exposure channels to be driven simultaneously. Thanks! David David Plowman (3): ipa: rpi: agc: Fetch AWB status in process method, not prepare ipa: rpi: agc: Filter exposures before dealing with digital gain ipa: rpi: agc: Split AgcStatus into AgcStatus and AgcPrepareStatus src/ipa/rpi/common/ipa_base.cpp | 8 ++--- src/ipa/rpi/controller/agc_status.h | 9 +++-- src/ipa/rpi/controller/rpi/agc.cpp | 53 ++++++++++------------------- src/ipa/rpi/controller/rpi/agc.h | 4 +-- src/ipa/rpi/vc4/vc4.cpp | 6 ++-- 5 files changed, 34 insertions(+), 46 deletions(-)