{"id":10507,"url":"https://patchwork.libcamera.org/api/1.1/patches/10507/?format=json","web_url":"https://patchwork.libcamera.org/patch/10507/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201126142321.5563-2-david.plowman@raspberrypi.com>","date":"2020-11-26T14:23:18","name":"[libcamera-devel,v3,1/4] src: ipa: raspberrypi: Avoid AGC filtering when both gain and shutter specified","commit_ref":"1b5001e92fbe9f4bbbbef89425dfd81a9e080ac9","pull_url":null,"state":"accepted","archived":false,"hash":"d947c9ee345fcee9d09960056386e8cd216dd4ef","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/1.1/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10507/mbox/","series":[{"id":1484,"url":"https://patchwork.libcamera.org/api/1.1/series/1484/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1484","date":"2020-11-26T14:23:17","name":"Raspberry Pi AGC improvements","version":3,"mbox":"https://patchwork.libcamera.org/series/1484/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10507/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10507/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4B491BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 14:23:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12C5863473;\n\tThu, 26 Nov 2020 15:23:28 +0100 (CET)","from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com\n\t[IPv6:2a00:1450:4864:20::52a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0BAF76346C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 15:23:26 +0100 (CET)","by mail-ed1-x52a.google.com with SMTP id n24so351284edb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 06:23:26 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tf24sm3237003edx.90.2020.11.26.06.23.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Nov 2020 06:23:24 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"MdDMEu6n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=/pSU3BOgrEJ51O03wWUnGTA4E3xeSmlleW7QcokDXz8=;\n\tb=MdDMEu6nq1CEFCwAROB3FId77xp/WxORviLGPv82RPZaWZoL2bs0BkxVy/KpuscrrZ\n\tzWEDAsOJnwdkTHanmg+3glafqnzcpbwgd0vEbuh9cF3LmW05VL3DnL+lbjZAStrDV+BL\n\tTtMrTkbc0uCtARaIo6QTAxMUsYePqEkKD8zlxU4ShFpvjnVsGbMRYoFbeJk38Ktxr7Iy\n\tNliT6wLe33xSE19csrrJhlcyA53Y5MAjO//BPr5SBSLk//fa5LE21X4HxL6hYX8ryFJU\n\tN3YieOq4yuwsl/6xvFf0VpMQLVFECQot5e5PeWBGKA7VgKghwREBAsEVotFxyQTmcg9V\n\t4bCQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=/pSU3BOgrEJ51O03wWUnGTA4E3xeSmlleW7QcokDXz8=;\n\tb=bl5gq7V05rze9zCG0cY8dGSYd8bA+13sAl+wHZ5hvxbdeVhdRLLgckGBzF8vrpI/Ug\n\tlasZob08AKR9NbDKxWHuthhuxIlEpwS29vLyjkOtN2UsBuaeCg0FVDo/HR+utl+P1ssB\n\tDtHNxlVl7SmdHKpxRWsCl40qnBFqhUosbkh9WgGI+iI5QxOWBdxMFCYlg0bhRqG81mxo\n\tVNs5CZZDBL8y3PS11oKEASvhUK/GmAJYGn47xMQ7wTRsm42unV0Q/Ix3bbvvZZ1HDhT6\n\tqjI2Py40mj6tJEotXBtO2oq+nvaWS26cbguYaC/C3WiOP2mhSQG02c06QA5WyYeGG9hm\n\tUpyA==","X-Gm-Message-State":"AOAM530FU9Shr8wX+silDlZQTDhCUhyXMYcYfkhd/J9t8ugm5Tsvzwdn\n\tc6+C4QSbRMrpWgZvAnJj3mXVvEaIkUkn5TkU","X-Google-Smtp-Source":"ABdhPJz8xTwG/hVevQb6Wt8ClDebMoQo6cQhJ7yJ2vHNHwGWLN4jYtWtj1tsR1oGuVGwFbAHM+WdwA==","X-Received":"by 2002:a05:6402:1508:: with SMTP id\n\tf8mr2936889edw.350.1606400605389; \n\tThu, 26 Nov 2020 06:23:25 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 26 Nov 2020 14:23:18 +0000","Message-Id":"<20201126142321.5563-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20201126142321.5563-1-david.plowman@raspberrypi.com>","References":"<20201126142321.5563-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v3 1/4] src: ipa: raspberrypi: Avoid AGC\n\tfiltering when both gain and shutter specified","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"When both gain and shutter have been directly specified, do not filter\nslowly towards those target values, but adopt them immediately. This\nshould match user expectations better.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 4c56bdc9..30a1c1c1 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -588,7 +588,12 @@ bool Agc::applyDigitalGain(double gain, double target_Y)\n \n void Agc::filterExposure(bool desaturate)\n {\n-\tdouble speed = frame_count_ <= config_.startup_frames ? 1.0 : config_.speed;\n+\tdouble speed = config_.speed;\n+\t// AGC adapts instantly if both shutter and gain are directly specified\n+\t// or we're in the startup phase.\n+\tif ((status_.fixed_shutter && status_.fixed_analogue_gain) ||\n+\t    frame_count_ <= config_.startup_frames)\n+\t\tspeed = 1.0;\n \tif (filtered_.total_exposure == 0.0) {\n \t\tfiltered_.total_exposure = target_.total_exposure;\n \t\tfiltered_.total_exposure_no_dg = target_.total_exposure_no_dg;\n","prefixes":["libcamera-devel","v3","1/4"]}