Patch Detail
Show a patch.
GET /api/1.1/patches/10503/?format=api
{ "id": 10503, "url": "https://patchwork.libcamera.org/api/1.1/patches/10503/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10503/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "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-3-david.plowman@raspberrypi.com>", "date": "2020-11-26T12:32:01", "name": "[libcamera-devel,v2,2/4] src: ipa: raspberrypi: agc: Make AGC handle Pause/Resume for itself", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "500eff2571b1698a5096ef1d008e8b6155d0e6c8", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10503/mbox/", "series": [ { "id": 1483, "url": "https://patchwork.libcamera.org/api/1.1/series/1483/?format=api", "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/10503/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10503/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 0BD21BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 12:32:15 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2FFB96345C;\n\tThu, 26 Nov 2020 13:32:14 +0100 (CET)", "from mail-ej1-x634.google.com (mail-ej1-x634.google.com\n\t[IPv6:2a00:1450:4864:20::634])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9150B63449\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 13:32:12 +0100 (CET)", "by mail-ej1-x634.google.com with SMTP id hb22so2455538ejb.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 04:32:12 -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.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Nov 2020 04:32:11 -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=\"Btkl4vDc\"; 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=9ktpT+D5PLVk79s3FjnYeYZukjakGS97umiZNbnJkx0=;\n\tb=Btkl4vDcI6JOks2CM6S3Qx1ZyT3QlAVFQcp6ULmSiJ4Ct1HiM1qOc7Yfa2pIZgjdBX\n\tm/AX3ajcJhV/BI1qZh+nQWTFFV+q2E5aBJOzIXRx6rixnpWypktbP3we1jj6aaV3MW+R\n\t9QyWD6Uc1eAsMEjUrwEcG71O8I9E6Mv1wSTJoEXJ2op5m6u7Dbjd7LSw1b88vQVwiNNa\n\thg29rLiazOZp3e7JxOeqrB0Z/BsPymhPGhLmv0rSHrfhh+aC/gYbT5iJeuqWghKezzK5\n\t8UgrNxUyjFAT7vXF2am6H1jkyB65qC6fphw9XBA+02GvlFBRuQjCIqn32FX1K5nHQHWU\n\tIZDw==", "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=9ktpT+D5PLVk79s3FjnYeYZukjakGS97umiZNbnJkx0=;\n\tb=lpHy2nN7h9r3hwYE+x3S9Z3EtRjlKPRAfMsyrck1zAdXyE1q1EAqslIjE2DdPgH6wk\n\tNCvrsoqJs8BETvnDMLTod5kNKn4GFqgd+ZOxu0OccqOpe9aAlJbnLtfrfS3tikxNwpMx\n\tqTbKcPmvdXND/e0TXqwvbf2XBmP8XPON6wkm1LGBZWcuEe3lq3XHrFpmzRlbUvMiMBxw\n\tQ18p0wasq8wrKAB0nmFpTYE0dQPUlxRRVm0uFc9zi6NpOQMNqtEnjutOlzRsi9a4tb/O\n\t//NW837p8itFL3fO5YAJWnWMOAB2aN/NI59kdhnd/uJbWSHB+hiBHXb4AwP0XCtVG2Am\n\t7B/Q==", "X-Gm-Message-State": "AOAM5300gW0X7wiBEc7romGqn22Uxoh/n7+3Jz9bpoMalBu9JaG3YT10\n\t+CsdZulNkWwns9ZNqlh1bZ+BoyB0rCb/zAqe", "X-Google-Smtp-Source": "ABdhPJzWA8rUT6x4cxsFrRQ8SpWaC0V0QzKMfUkoH0r4Jg1G3p7HXigk+e6s3AUaIu4urRpUPG8Ziw==", "X-Received": "by 2002:a17:906:170e:: with SMTP id\n\tc14mr2413082eje.117.1606393931960; \n\tThu, 26 Nov 2020 04:32:11 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 26 Nov 2020 12:32:01 +0000", "Message-Id": "<20201126123203.19105-3-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 2/4] src: ipa: raspberrypi: agc: Make\n\tAGC handle Pause/Resume for itself", "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": "AGC, when paused, sets the last exposure/gain it wrote to be its\n\"fixed\" values and will therefore continue to return them. When\nresumed, we clear them so that both will float again.\n\nThis approach is better because AGC can be paused and we can\nsubsequently change (for example) the exposure and the gain won't\nfloat again.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/rpi/agc.cpp | 24 ++++++++++++++++++++++\n src/ipa/raspberrypi/controller/rpi/agc.hpp | 5 +++++\n 2 files changed, 29 insertions(+)", "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 30a1c1c1..9da18c31 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -184,6 +184,26 @@ void Agc::Read(boost::property_tree::ptree const ¶ms)\n \texposure_mode_ = &config_.exposure_modes[exposure_mode_name_];\n \tconstraint_mode_name_ = config_.default_constraint_mode;\n \tconstraint_mode_ = &config_.constraint_modes[constraint_mode_name_];\n+\t// Set up the \"last shutter/gain\" values, in case AGC starts \"disabled\".\n+\tstatus_.shutter_time = config_.default_exposure_time;\n+\tstatus_.analogue_gain = config_.default_analogue_gain;\n+}\n+\n+bool Agc::IsPaused() const\n+{\n+\treturn false;\n+}\n+\n+void Agc::Pause()\n+{\n+\tfixed_shutter_ = status_.shutter_time;\n+\tfixed_analogue_gain_ = status_.analogue_gain;\n+}\n+\n+void Agc::Resume()\n+{\n+\tfixed_shutter_ = 0;\n+\tfixed_analogue_gain_ = 0;\n }\n \n void Agc::SetEv(double ev)\n@@ -199,11 +219,15 @@ void Agc::SetFlickerPeriod(double flicker_period)\n void Agc::SetFixedShutter(double fixed_shutter)\n {\n \tfixed_shutter_ = fixed_shutter;\n+\t// Set this in case someone calls Pause() straight after.\n+\tstatus_.shutter_time = fixed_shutter;\n }\n \n void Agc::SetFixedAnalogueGain(double fixed_analogue_gain)\n {\n \tfixed_analogue_gain_ = fixed_analogue_gain;\n+\t// Set this in case someone calls Pause() straight after.\n+\tstatus_.analogue_gain = fixed_analogue_gain;\n }\n \n void Agc::SetMeteringMode(std::string const &metering_mode_name)\ndiff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp\nindex 47ebb324..8a1a20e6 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n@@ -70,6 +70,11 @@ public:\n \tAgc(Controller *controller);\n \tchar const *Name() const override;\n \tvoid Read(boost::property_tree::ptree const ¶ms) override;\n+\t// AGC handles \"pausing\" for itself.\n+\tbool IsPaused() const;\n+\tvoid Pause();\n+\tvoid Resume();\n+\tunsigned int GetFrameDrops() const override;\n \tvoid SetEv(double ev) override;\n \tvoid SetFlickerPeriod(double flicker_period) override;\n \tvoid SetFixedShutter(double fixed_shutter) override; // microseconds\n", "prefixes": [ "libcamera-devel", "v2", "2/4" ] }