Patch Detail
Show a patch.
GET /api/patches/10508/?format=api
{ "id": 10508, "url": "https://patchwork.libcamera.org/api/patches/10508/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10508/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20201126142321.5563-3-david.plowman@raspberrypi.com>", "date": "2020-11-26T14:23:19", "name": "[libcamera-devel,v3,2/4] src: ipa: raspberrypi: agc: Make AGC handle Pause/Resume for itself", "commit_ref": "4db11b57258a1ea3a0e58f1e05d1854de0510d67", "pull_url": null, "state": "accepted", "archived": false, "hash": "8d91521aaf077b5fd5f785dd26d0ee7a02c81ca4", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10508/mbox/", "series": [ { "id": 1484, "url": "https://patchwork.libcamera.org/api/series/1484/?format=api", "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/10508/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10508/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 4C251BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 14:23:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C7C5763470;\n\tThu, 26 Nov 2020 15:23:28 +0100 (CET)", "from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com\n\t[IPv6:2a00:1450:4864:20::62c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B19D6346B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 15:23:27 +0100 (CET)", "by mail-ej1-x62c.google.com with SMTP id a16so3188080ejj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 06:23:27 -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.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Nov 2020 06:23:25 -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=\"CAGV+q2i\"; 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=oSLgktFCKL+BD4JC3I/jRKa0iCz7TO1buKMoSeXAMkQ=;\n\tb=CAGV+q2iwlRvNpiEziER/ZDZs2wG5g1hpcfn/t7JbKI1EHaZplRKFc2k93mUOwP0Sn\n\tQS5zlR4TCWAZDtwMkMChK6BUGTN39cEe3nXp2obHWQ6UtdELdeZHfTn+gU3fTOX7+eBX\n\t1QBGKkP2jUHEfIRUdgswCBU9xPvD6l28UlvyjYI89SUX00yxhse5jdi8XDH9S3Ho4dqF\n\tJ84vpM14qxWq9KQTBMbD5j39h1kmTkR5vR/giQP0P8CSze3+ulwDmJ4qvXi+rdL0ASIk\n\tu3I5jX/wS7tdWn3oAtmjjkztFopKjq2sNSXyVjuVupV0Ywk3B5CZLTydPp1aujfChH94\n\t/5sw==", "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=oSLgktFCKL+BD4JC3I/jRKa0iCz7TO1buKMoSeXAMkQ=;\n\tb=ekrEyY9ucxXIudi8wx/JBOgWlXPrN6lJhJnwKjauMJDEg5sWXmvEqzrZIgZbDuiCRD\n\tGdT2phd13yczrOY2gh4JIs7eQAYqPchDk9hBY6KD3juSfT4ZE9eSeUMYzYR8hOpGUX0D\n\toa/NQ2SFBUf4BYDR2nDoFBAqeQQcDtVeKFxMI1AIryqsy/Gbq2VGiKhpsEQRKGyazYS3\n\tW8lwz4DyO6GFiVJRycBbvadUFUm19WtdSVEdfAwFxk8IJJV29Q/dU1w/Gz1vbCcF0QpR\n\tl+Xrr9qP+viOkZcBgJncf6mHFGCrkE2PzqBStpPFr9FOd9hWEanFlc4ECzvebW7xFeRh\n\tlG7A==", "X-Gm-Message-State": "AOAM530UDzYSr5O7VNLFMC/fXLq31AiYSPWtxv7Rwm/37ZaBpDLUWhnJ\n\tC8l6jDTOBb4QDv/1NEGJCRpf2vMvX83XFWbL", "X-Google-Smtp-Source": "ABdhPJzxafgF6I0RfUTSIlpm1uDXZ5p3L5aDOur4KBm7kgX5VesN/2wC1xOWwwwqleDRQ/13NyGQWw==", "X-Received": "by 2002:a17:906:d92c:: with SMTP id\n\trn12mr2874757ejb.472.1606400606434; \n\tThu, 26 Nov 2020 06:23:26 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 26 Nov 2020 14:23:19 +0000", "Message-Id": "<20201126142321.5563-3-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 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 | 4 ++++\n 2 files changed, 28 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..95db1812 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n@@ -70,6 +70,10 @@ 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 override;\n+\tvoid Pause() override;\n+\tvoid Resume() 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", "v3", "2/4" ] }