From patchwork Fri Nov 10 10:45:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 19192 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 63E24C3284 for ; Fri, 10 Nov 2023 10:45:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A26D7629BC; Fri, 10 Nov 2023 11:45:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1699613124; bh=A1+U9S3Pt1XlVbe+RIo1Sz6lc7R7WApLZ9n+G/1UAVw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GkIFPDN/BLwT+6CKnctOJibn7ggZNTPSsdddP1ceQ+/J1hOqZHJZr9Y82NkDxne0w mCF2ywpPbjtveo3n+R/IsMZaUyXBMOD879JcpzM6wAjAstpY6ihfagsE+NWI854Gx+ 8mD6T+gbB1cXX0xJ2s3atUUWDUnMQjbbvcmJ7KyXIqfmgEjxHei+C/JIuGMGhJilf/ 1pDR4HZ207KzRQMCLsoGxocZYtF7OMtHH6G90C0kky1236t3Q4bqBkjyTVmn6HzEa6 Nj6djLmtMeEE/U23b8RWPOXTJQveix9E9HCSiquHFLOcghO/tyGPriwUudd6hTd4tw IgqBgIQ9trd4Q== Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3027C629AB for ; Fri, 10 Nov 2023 11:45:23 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="h/2PvuOv"; dkim-atps=neutral Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40859c464daso14148095e9.1 for ; Fri, 10 Nov 2023 02:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1699613122; x=1700217922; 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=7KBMCJLQhBzsuuW/fMdrs68y4Z1BYs2piiTZhacY4+4=; b=h/2PvuOvTG4eLf96Sd569gDG4pZyC5w1J0hl2r2ry++w+fGJ0g3S4ODYdODi+cuSJn yBcddud0qAdcUHjRN49HvmCKGx1xMnExKYdcUSFIO06ASHlB+s2ONn8P1EQxUTzz0PbN +7MXRzdIyQU+x4ceE1sggF/2er6z6d5QbmSfvjBUiYDcB5y3iL4fEMfcm9IYQg8Crq7M xr8WTNPtNun1hhy9ekZXdgvk7X56wsaR2uf4buk0U8zwBSU3hNxjyHdj2R44gSm9z75t p+A68Xr7Rvb4NEBUgcUzLmkvHzE6LbpNSlCKI35uj8YHipXR9OILJK1pcalMBpk4Phl+ Sqxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699613122; x=1700217922; 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=7KBMCJLQhBzsuuW/fMdrs68y4Z1BYs2piiTZhacY4+4=; b=HgFNwpJWPXrYxSKkB//raHRI92L9QMNjaCo9weZOOwg2yl4tu2+lWZfyRFoI+YMmA7 DTsp/HUbo4fQePrjACdvoyUNuAMAm6vM3atAHJTdnsJFB17aCBwp1O/b2lTbPv07dpSn Z2dkP91ws9P8x8kQMNVW0A7tcWAZlX9yUlmMxX+is+nkDxmyoQFi7PoIvHrw4bK8Wxz6 MU9dg92rD/aTmqibdc1fSOWeBelgeFeZl6CaAbVhCpdJhszf9lIWY2Ub30psAYMsyG3W wJcPaQe/wnwrqo8DTDXW5biik0dLjoiJR+PlKaQeBnyd/+tDatzgERDcqITvk1qqSK8T Gk7A== X-Gm-Message-State: AOJu0YzyW66VZ5ybf0+jZlFhUjEY1sy/8V92Kf+c9RBCsn+cs//N5qVl 6VssMVmEOAytqhu5RTdqWWDSYkNjA9robWXkscc= X-Google-Smtp-Source: AGHT+IHGomnOj28jca6IrjK8GAzA+xoxRzu1SL1UXEJiDT0vmWjwMpmBBVXU4lfHdN1VlI6R6RBKxA== X-Received: by 2002:a05:600c:19c8:b0:408:3c8a:65ec with SMTP id u8-20020a05600c19c800b004083c8a65ecmr7034306wmq.8.1699613122198; Fri, 10 Nov 2023 02:45:22 -0800 (PST) Received: from pi5-davidp.pitowers.org ([2a00:1098:3142:14:183e:6cc8:a436:a27c]) by smtp.gmail.com with ESMTPSA id h7-20020a05600c350700b004090ca6d785sm4813394wmq.2.2023.11.10.02.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 02:45:21 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Fri, 10 Nov 2023 10:45:20 +0000 Message-Id: <20231110104520.384229-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: rpi: agc: Fix bug where AeLocked was never getting set 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" The recent change where time-filtering is done before sorting out the digital gain means that the target exposure without digital gain is no longer set, breaking the 'AeLocked' calculation. We can use the regular (full) target exposure instead. Signed-off-by: David Plowman Fixes: 84b6327789fc ("ipa: rpi: agc: Filter exposures before dealing with digital gain") Reviewed-by: Naushir Patuck Acked-by: Kieran Bingham --- src/ipa/rpi/controller/rpi/agc_channel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp index 8d374b53..8116c6c1 100644 --- a/src/ipa/rpi/controller/rpi/agc_channel.cpp +++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp @@ -977,7 +977,7 @@ void AgcChannel::divideUpExposure() void AgcChannel::writeAndFinish(Metadata *imageMetadata, bool desaturate) { status_.totalExposureValue = filtered_.totalExposure; - status_.targetExposureValue = desaturate ? 0s : target_.totalExposureNoDG; + status_.targetExposureValue = desaturate ? 0s : target_.totalExposure; status_.shutterTime = filtered_.shutter; status_.analogueGain = filtered_.analogueGain; /*