Patch Detail
Show a patch.
GET /api/patches/14491/?format=api
{ "id": 14491, "url": "https://patchwork.libcamera.org/api/patches/14491/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14491/", "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": "<20211108131350.130665-22-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-11-08T13:13:49", "name": "[libcamera-devel,21/22] ipa: ipu3: Move ExposureTime to IPA", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c42345edd5c028db27764f5c5995ceda5b44b454", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14491/mbox/", "series": [ { "id": 2696, "url": "https://patchwork.libcamera.org/api/series/2696/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2696", "date": "2021-11-08T13:13:28", "name": "IPA: IPU3: Introduce per-frame controls", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2696/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14491/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14491/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 8EB1FC3251\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 8 Nov 2021 13:14:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2C3446055D;\n\tMon, 8 Nov 2021 14:14:21 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A468F603C2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 8 Nov 2021 14:14:04 +0100 (CET)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:c2bb:76d0:68d7:a9a5])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 61C9718CE;\n\tMon, 8 Nov 2021 14:14:03 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"l0m5iakP\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1636377243;\n\tbh=sPnE4NLtex+I4cA5tW8E17QMPkawPxLcZABU/uhQoeQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=l0m5iakPqeB3XqlE/7E6zNqFt6PKmFseIKE1AG6yRRBsXSC7Wbz3paPgSIs5tzeKC\n\tvVWrfYby5kSIyzS2iwQfkR7z+s3a1DcnSCLtbhhOx2X1GYuKenLQvAJuPFzQp0XCd1\n\tRoKuvQy1hkK/1W+M4TaqmzTC0AFmeL+ontqG4MAQ=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 8 Nov 2021 14:13:49 +0100", "Message-Id": "<20211108131350.130665-22-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20211108131350.130665-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20211108131350.130665-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 21/22] ipa: ipu3: Move ExposureTime to IPA", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that we have the exposure time calculated, pass it to the\ncontrols::ExposureTime and don't use the pipeline handler for it\nanymore. While at it, use the same line duration value for ExposureTime\nand FrameDuration.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 9 +++++++--\n src/libcamera/pipeline/ipu3/ipu3.cpp | 2 --\n 2 files changed, 7 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex ca3f2417..24c77be8 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -691,12 +691,17 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n \n \tsetControls(frame);\n \n+\tdouble lineDuration = sensorInfo_.lineLength\n+\t\t\t / (sensorInfo_.pixelRate / 1e6);\n+\n \t/* \\todo Use VBlank value calculated from each frame exposure. */\n-\tint64_t frameDuration = sensorInfo_.lineLength * (defVBlank_ + sensorInfo_.outputSize.height) /\n-\t\t\t\t(sensorInfo_.pixelRate / 1e6);\n+\tint64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height)\n+\t\t\t * lineDuration;\n \tctrls.set(controls::FrameDuration, frameDuration);\n \n \tctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);\n+\tint32_t exposureTime = context_.frameContext->agc.exposure * lineDuration;\n+\tctrls.set(controls::ExposureTime, exposureTime);\n \n \t/*\n \t * \\todo We should be able to add 'anything' (with a Control) in here to\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 5d87f6e5..97003681 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1322,8 +1322,6 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)\n \tpipe()->completeBuffer(request, buffer);\n \n \trequest->metadata().set(controls::draft::PipelineDepth, 3);\n-\t/* \\todo Move the ExposureTime control to the IPA. */\n-\trequest->metadata().set(controls::ExposureTime, exposureTime_);\n \t/* \\todo Actually apply the scaler crop region to the ImgU. */\n \tif (request->controls().contains(controls::ScalerCrop))\n \t\tcropRegion_ = request->controls().get(controls::ScalerCrop);\n", "prefixes": [ "libcamera-devel", "21/22" ] }