{"id":10502,"url":"https://patchwork.libcamera.org/api/patches/10502/?format=json","web_url":"https://patchwork.libcamera.org/patch/10502/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20201126123203.19105-2-david.plowman@raspberrypi.com>","date":"2020-11-26T12:32:00","name":"[libcamera-devel,v2,1/4] 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/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10502/mbox/","series":[{"id":1483,"url":"https://patchwork.libcamera.org/api/series/1483/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1483","date":"2020-11-26T12:31:59","name":"Raspberry Pi AGC improvements","version":2,"mbox":"https://patchwork.libcamera.org/series/1483/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10502/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10502/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 E0BC4BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 12:32:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B055163461;\n\tThu, 26 Nov 2020 13:32:13 +0100 (CET)","from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com\n\t[IPv6:2a00:1450:4864:20::62b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B846063449\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 13:32:11 +0100 (CET)","by mail-ej1-x62b.google.com with SMTP id oq3so2679552ejb.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 04:32:11 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tu5sm3064354edp.5.2020.11.26.04.32.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Nov 2020 04:32:09 -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=\"qnpoYI0e\"; 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=qnpoYI0eU6GB23VHHSqjhGwmkO9CyUqH+bU9c3D4DCEMzJXkJATrIt5+a2tWVB2mqx\n\tNmz3xfg1clF/OlWqYNjkgNek5hq0Rc0bPrQekptMIZGN+4tVHQ6ZZAixC0urLyJIeXiV\n\t1kJp2qXFuqU5e/rSbKj5m8vKrPQJvu/EocQlBpfQpzHCJyfnVRJg+gjRK7A9VtOYXflS\n\tzG5u0gd4RmXPkg2Bdi6BWKTlQk6XV52kWXYybFOuN1FPpeJwwGnGFnK/7LMHMT1Ae0DC\n\tZD7DkN+nH4FH1LIdsPe4Nz6KuoJ74kAqqrt7Yn29S/NRp0/aALnsZHoTIu0xos0UDI1q\n\tqIrA==","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=HQPUIk5TCItOl4hUgEjWNWa31zpYDGHUumlqXJ6V2SiYJ5NmrDq8+Dt804fGtd9ZyB\n\tzacP3EosKZYLvEKzsW/regPJOhRFFA7sY4upIu+uIFD+RFPVtAwUx93goNJABAHoc04v\n\tmFX+fnElhto2+FYqvBSk40qWajkRaC+8nFKmx6tbAzYqajiHQ1sLq86ank6OfxO1mdtI\n\t8jIMbcYaFa8hDEjUtC5wbD/DZFATjYeRyfgWMzWUJsGsyW/wt0tw8bD3GvLT33p5Q6cC\n\t83IYGoX7l2i1qwRDSmYeqDCfJjzanod9Ko0UlhHCWucmF5IScoYHa2yMjxN8ltw8tDEZ\n\tIqJw==","X-Gm-Message-State":"AOAM532Xtx0q2H/SyKYaU6+Si+L4e7KrMdxJVB/axYqaUkmI/YDifAFQ\n\tfspMHacncIaOCexHvCkfhaiDYrcv1KF1fhNB","X-Google-Smtp-Source":"ABdhPJx2f/acB7vp9e99tVvxaFdQk+vFpVB35RiuxrgtjUMY8NbCLf3YO07atHf/Z78bUkxGlMJ7HA==","X-Received":"by 2002:a17:906:5243:: with SMTP id\n\ty3mr2466874ejm.273.1606393930277; \n\tThu, 26 Nov 2020 04:32:10 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 26 Nov 2020 12:32:00 +0000","Message-Id":"<20201126123203.19105-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20201126123203.19105-1-david.plowman@raspberrypi.com>","References":"<20201126123203.19105-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 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","v2","1/4"]}