From patchwork Tue Mar 15 13:34:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15448 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 456F8BDE17 for ; Tue, 15 Mar 2022 13:34:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6FF1B604E9; Tue, 15 Mar 2022 14:34:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647351273; bh=t/JbdkFTXorpiSOFz/PXU2UFTUTB9SNVA0hz53+Smro=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Xhsg1DxH4u50xGnjJiwFEuhKCWMeXlVEJkz/H26OGNMMwxr5TEvW6LOG1zwxM02oV JQjr4AOXJor/f+koWQw0xuI/TRj4zfAtELx/1m5q84lQ/mpgw7Ad7A25/wvcmnVyTo LZYn4qtr32xIEN/HMYQ1EZ8FnuwIiaRxdnvyW2pVbPN8ezi5lVuk6MZjgkdVyv/r/Q I39ZvvtVm8wXx0VaZx1Jv1rDxpJEPnLke3Lfx2pi3pbepvLO9+ScTC4cAZs/GPbF/Z KvIQNeX8mDS3xtaVTndHyc4tDSRqyL3mX50yjFc6/QS9PM3Hl7C0R49vXLKdeAyAx/ u0eLJoBdRUzmw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1EF15604DA for ; Tue, 15 Mar 2022 14:34:32 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BpH36zLJ"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A06FF1BBB for ; Tue, 15 Mar 2022 14:34:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1647351271; bh=t/JbdkFTXorpiSOFz/PXU2UFTUTB9SNVA0hz53+Smro=; h=From:To:Subject:Date:From; b=BpH36zLJa7owqxx61vk7TAdDOfPQpM/e2/+5z0lza76na/C0Qo63xj/3thiceNv+R CpKq7gX8YfOKw3BMp/iIkIb+3N7qBaTY0hrPaHEFsCm+7NQ70mj/XGI5udnv33vdPT Ca14+5fyHceraBZFlXn7ofOu3brGuypkmLI8gUqA= To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Mar 2022 15:34:06 +0200 Message-Id: <20220315133407.32348-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: ipu3: agc: Reset frame count when configuring 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The frame count is used to skip the gain and exposure filtering when starting. It thus needs to be reset when configuring the algorithm, to avoid slower convergence when stopping and restarting. Signed-off-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois Reviewed-by: Umang Jain --- src/ipa/ipu3/algorithms/agc.cpp | 1 + 1 file changed, 1 insertion(+) base-commit: e41854a4e6fde2dd9e2a2a7290670943235776cd diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index 1eb1bcef2f02..70cff3fed43c 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -102,6 +102,7 @@ int Agc::configure(IPAContext &context, frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain); frameContext.agc.exposure = 10ms / configuration.sensor.lineDuration; + frameCount_ = 0; return 0; }