Patch Detail
Show a patch.
GET /api/1.1/patches/10545/?format=api
{ "id": 10545, "url": "https://patchwork.libcamera.org/api/1.1/patches/10545/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10545/", "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": "<20201202115253.14705-5-david.plowman@raspberrypi.com>", "date": "2020-12-02T11:52:52", "name": "[libcamera-devel,4/5] src: ipa: raspberrypi: Move initial frame drop decision to AGC", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5ada0ea80b7b95c6c53f81248529430949dadada", "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/10545/mbox/", "series": [ { "id": 1500, "url": "https://patchwork.libcamera.org/api/1.1/series/1500/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1500", "date": "2020-12-02T11:52:48", "name": "Raspberry Pi AGC: initial frame drop count", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1500/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10545/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10545/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 0E282BE177\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 2 Dec 2020 11:53:04 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CED17635B3;\n\tWed, 2 Dec 2020 12:53:03 +0100 (CET)", "from mail-wr1-x441.google.com (mail-wr1-x441.google.com\n\t[IPv6:2a00:1450:4864:20::441])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1AA5E635AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 2 Dec 2020 12:53:02 +0100 (CET)", "by mail-wr1-x441.google.com with SMTP id u12so3593229wrt.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 02 Dec 2020 03:53:02 -0800 (PST)", "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tn189sm1739215wmf.20.2020.12.02.03.53.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 02 Dec 2020 03:53:00 -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=\"TpHGzGwG\"; 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=a8CEGHnRSlkm553eVUvpub/RWAwm0vCjsHV2IRyer0k=;\n\tb=TpHGzGwGndEwTowvI0z/KCDUKWDf4atPN9NVb1Iv71ka74n7QQ9C7GRqhjX+H3XSdZ\n\t5b0TU8wH6W7FPKAdZkqyBjS5AUZBNAEbqwMml032v6hsCDtX9DyjQXMSJuRNHaITFzod\n\tTkrYenrnQD5xMSw08R5b/x6I5BJYZ+ozHPtpqU6xmpDDWvbErh2gSg/23Adism1PJ/a/\n\tjAgZN5RBlh+is9TSFZ5eEMIQPuNFQhnr8NzwBonHgEaX0uMRHOfJl6pIvuDaQb2n2zeb\n\tSIpELUKF6SAXeVv6ByCF9Ti5f0lYSdL2WKYmDkMNG+up7RxE3t4Z5lXnCOyqE/Lt6Nx7\n\tAagg==", "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=a8CEGHnRSlkm553eVUvpub/RWAwm0vCjsHV2IRyer0k=;\n\tb=QbwJJyjfkiKawwb6RuEZLSo03NDRdrXALLYVDRAxQ81pKcyGSyawZgIj1ku1EOJFca\n\tVLKzV5JqZ853Yjk4Jjs83qAf8uDIpMXY0Kfo7hyys4sIIxseEnZkjgTA3M/ejix6zK8W\n\taKOtv3Y7CPyAINK13EtZ6RavbbIY+vozN6p35WW1Ke2O77ntMGYwBQiDahJ06s/a6KCq\n\tp8qQMieDPWuHQwKy7ZryM1/pFAmLnZYBcJaVaSwCo89A03gQlmY1lFTILgIlFahUMK+l\n\tEgbo/daMqQDZezWQ5v6v/WJTPjnmsjVTsmfK82YDiA/vpLTxjjzAY2UsD0u0+3NYmpXB\n\tXWnQ==", "X-Gm-Message-State": "AOAM532ItTRCe2kEAQK+B8Krhw5MiPJOCRbkdEgTYshmB/6HJYedeyT2\n\tTKFGqPGhULGMY3FcJdlYQaq7btGzMVMLoX0v", "X-Google-Smtp-Source": "ABdhPJyR17/r8sBDKJ9MEwCGSoZ2QdkcK7BkHPPoDUk6yR8fADbWS4HfwQLmZJm2U4OcFhwVuLChmA==", "X-Received": "by 2002:adf:bd84:: with SMTP id l4mr3065040wrh.41.1606909981612; \n\tWed, 02 Dec 2020 03:53:01 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 2 Dec 2020 11:52:52 +0000", "Message-Id": "<20201202115253.14705-5-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20201202115253.14705-1-david.plowman@raspberrypi.com>", "References": "<20201202115253.14705-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 4/5] src: ipa: raspberrypi: Move initial\n\tframe drop decision to AGC", "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": "Previously the CamHelper was returning the number of frames to drop\n(on account of AGC converging). This wasn't really appropriate, it's\nbetter for the AGC to do it, which now also knows when exposure and\ngain have been explicitly set and therefore fewer (or no) frame drops\nare necessary at all.\n\nThe CamHelper::HideFramesStartup method should now just be returning\nthe number of frames to hide because they're bad/invalid in some way,\nnot worrying about the AGC. For many sensors, the correct value for\nthis is zero.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/cam_helper.cpp | 6 +++---\n src/ipa/raspberrypi/raspberrypi.cpp | 8 ++++++++\n 2 files changed, 11 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp\nindex c8ac3232..6efa0d7f 100644\n--- a/src/ipa/raspberrypi/cam_helper.cpp\n+++ b/src/ipa/raspberrypi/cam_helper.cpp\n@@ -82,10 +82,10 @@ bool CamHelper::SensorEmbeddedDataPresent() const\n unsigned int CamHelper::HideFramesStartup() const\n {\n \t/*\n-\t * By default, hide 6 frames completely at start-up while AGC etc. sort\n-\t * themselves out (converge).\n+\t * The number of frames when a camera first starts that shouldn't be\n+\t * displayed as they are invalid in some way.\n \t */\n-\treturn 6;\n+\treturn 0;\n }\n \n unsigned int CamHelper::HideFramesModeSwitch() const\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 0300b8d9..ddabdb31 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -192,6 +192,14 @@ int IPARPi::start(const IPAOperationData &ipaConfig, IPAOperationData *result)\n \tunsigned int dropFrame = 0;\n \tif (firstStart_) {\n \t\tdropFrame = helper_->HideFramesStartup();\n+\n+\t\t/* The AGC algorithm may want us to drop more frames. */\n+\t\tRPiController::AgcAlgorithm *agc = dynamic_cast<RPiController::AgcAlgorithm *>(\n+\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n+\t\tif (agc)\n+\t\t\tdropFrame = std::max(dropFrame, agc->GetDropFrames());\n+\t\tLOG(IPARPI, Debug) << \"Drop \" << dropFrame << \" frames on startup\";\n+\n \t\tmistrustCount_ = helper_->MistrustFramesStartup();\n \t} else {\n \t\tdropFrame = helper_->HideFramesModeSwitch();\n", "prefixes": [ "libcamera-devel", "4/5" ] }