{"id":10495,"url":"https://patchwork.libcamera.org/api/1.1/patches/10495/?format=json","web_url":"https://patchwork.libcamera.org/patch/10495/","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":"<20201125113640.20246-2-david.plowman@raspberrypi.com>","date":"2020-11-25T11:36:38","name":"[libcamera-devel,1/3] src: ipa: raspberrypi: Avoid AGC filtering when both gain and shutter specified","commit_ref":null,"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/10495/mbox/","series":[{"id":1481,"url":"https://patchwork.libcamera.org/api/1.1/series/1481/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1481","date":"2020-11-25T11:36:37","name":"Raspberry Pi AGC improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/1481/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10495/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10495/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 39AF7BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Nov 2020 11:36:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 127C56340E;\n\tWed, 25 Nov 2020 12:36:46 +0100 (CET)","from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BED31633E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Nov 2020 12:36:44 +0100 (CET)","by mail-wm1-x333.google.com with SMTP id p22so1709580wmg.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Nov 2020 03:36:44 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tb14sm4232371wrq.47.2020.11.25.03.36.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 25 Nov 2020 03:36:43 -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=\"GUygUYkn\"; 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=1xhsu7HrWSngEnUv4/MVRgNPdbfcwpnU4q9jZTtkWVE=;\n\tb=GUygUYkngH3ght4L5X4deW+lpzQMRwfcEUG3UBwc4CrFHysYYWU2MqHNJ8BmDO/YeN\n\t5Yc6xgF4ppy9Zj3HaKb94RCpOUDquoaw63SqRi9izQfcPDScCvDUZ/Ecx2rnE69lIlE6\n\tBoRvhf/tXh6BFOeKaFOwvPrYsezPARCzrd8LbhbeIRXBl2rXuYSJbXaAfK3aDxad58pb\n\tS645xz3kxcaTt0Y44+Q2LG6pYIsU6PDWqtRcMHcgek4kz3re4+fl213EGePMc1lxaYYk\n\trNev9JzD79qVJZiDT0nKPkup+6QZZFZya7S6KSpkdq0E5naDsQGFQq4phgagxk3ZMbU0\n\tZ6sA==","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=1xhsu7HrWSngEnUv4/MVRgNPdbfcwpnU4q9jZTtkWVE=;\n\tb=GDs8wDBP5yPITCLqaZi7VbVfa5MuXOBn5pFY3aVcN93rQsBofpzOC3yD7TvNYm42J/\n\txxqwI9+JbrvEkELeWRIEyeGmIGO64THAUuCqtO+8xBrjlovVGAqZb+0oV+muXKF7J2VT\n\tU7DUGkEGRaFqHYPlohpCp76WbL7mq9+IgSLhoM8QjbuFwxdGm1GIQU0jQvR4H2vXTSN4\n\tyQzA2ftjMt22FSrk3d+zcgeczMGziCCmDLe9MlJ7nUHGYyo9Hcgt28JE/78KFMpY+7CR\n\tQwuZFHhu1ayDjCX8q8f8LasmiI/nagcoPfqqYi9NoVcc3xM2+btSRh3NEGxEN0anwZy9\n\tA00g==","X-Gm-Message-State":"AOAM532Y2I2iJsud2PDFGL2PUrOHfNwv5mbe8GAYZBMJ89v78Ix/tq2C\n\tn5B9QhBWdZiaLDJN8xPlsHwEs141/jJyTgDo","X-Google-Smtp-Source":"ABdhPJweoT2od3sUHar8wPqOc+Yfv9xhUVIO2Ia3pLWwIm8KfN5mxiZOa/K4jbxLYbxrkDEgLKufWQ==","X-Received":"by 2002:a1c:2b05:: with SMTP id r5mr3350705wmr.179.1606304204270;\n\tWed, 25 Nov 2020 03:36:44 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 25 Nov 2020 11:36:38 +0000","Message-Id":"<20201125113640.20246-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20201125113640.20246-1-david.plowman@raspberrypi.com>","References":"<20201125113640.20246-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 1/3] 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>\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","1/3"]}