Patch Detail
Show a patch.
GET /api/1.1/patches/16804/?format=api
{ "id": 16804, "url": "https://patchwork.libcamera.org/api/1.1/patches/16804/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16804/", "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": "<20220726182500.425182-4-hanlinchen@chromium.org>", "date": "2022-07-26T18:24:57", "name": "[libcamera-devel,3/6] libcamera: ipu3: returning partial results", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c7d99b6e1219fbadc1af2aa48419b8a50b90da72", "submitter": { "id": 98, "url": "https://patchwork.libcamera.org/api/1.1/people/98/?format=api", "name": "Hanlin Chen", "email": "hanlinchen@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16804/mbox/", "series": [ { "id": 3329, "url": "https://patchwork.libcamera.org/api/1.1/series/3329/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3329", "date": "2022-07-26T18:24:54", "name": "Implement Android Partial Result Featrue", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3329/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16804/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16804/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 3863EBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jul 2022 18:25:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E8C8A63311;\n\tTue, 26 Jul 2022 20:25:34 +0200 (CEST)", "from mail-pg1-x535.google.com (mail-pg1-x535.google.com\n\t[IPv6:2607:f8b0:4864:20::535])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B7BA260487\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 20:25:32 +0200 (CEST)", "by mail-pg1-x535.google.com with SMTP id s206so13842001pgs.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 11:25:32 -0700 (PDT)", "from localhost ([2401:fa00:1:17:739:6574:4032:5911])\n\tby smtp.gmail.com with UTF8SMTPSA id\n\tf17-20020a17090ace1100b001f0f132da9fsm11230722pju.5.2022.07.26.11.25.30\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tTue, 26 Jul 2022 11:25:31 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658859934;\n\tbh=R9uHT+BvZkLOJpSdkQmcQIOOfX+SstO0o9lsIOOuDww=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=YIMdY+piOA+JVVFH1eYcZLvCxYyL6n0LEfiv+WmlTt9sLiOhE+Uu5HDrNRhcQwjgB\n\tQPgCryria2syzucOE7mrLZXVYzBSZHRzS0wp2umzlfnB+a7gSOve79KF90aNweJNg/\n\tw11z9ayjmu3FSlYbyk/bBBHXBWyvJpcdDmxnEdktu7cISsw4S8PQYSML0YpCqYi5MT\n\t22t4Qw2WUozO2HgsAk25mBK3DfqzfVwjA6r/F8wYCGeJkAf7x46x6NoasFPWzaftl9\n\tVGhYrv075+PaS2jtYm4PC4ScuhVHi7jSyM+jWjN3X+GM+5sQGaa4obChliABSFUuyY\n\t6DRFZh7sHNLhg==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=T5PVKcclvqX2gU0lr0MrsXleBfpUJTOUsV+0PEKgZTM=;\n\tb=abjCqlL1l/5uWSGuz7Mbr/0BjpgthMODm6RLCTE/U12iseeLl9vzvhClh3rJ5o0GKI\n\tgrEUNyUwuPzaPI9cuHSUPYxMvwq/Z+4BA6JF6RzBtH5AJ4Py2YaauD06TV/Jx8gfAg+8\n\txOV5Xfn08AYGLIYKAk3Xqq+hUI6WA39YphI1I=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"abjCqlL1\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=T5PVKcclvqX2gU0lr0MrsXleBfpUJTOUsV+0PEKgZTM=;\n\tb=U1nUHmNQ/5WRmiFT1QTCjR+mNeoTEH2PQtbZ6RhGSfDgyhYqHGKQl+JaMdHO7vr+Vb\n\t6IZYAbHJtYWkE5rDUwDCIonnyo+LD0n4zkhiu1/VYJzyD2covw/iD7D3CxpEIWMXvAb4\n\tt0mmlfloPuEMuj+vXUZ05L9yF5Y3YAkMBwrT30TXYt7rirVIwJ/Y0G2y+MWRs5L56sym\n\tDFNXwNT4J/L6+9U0SyfkrQjC200KrYYYFXrhDDE4iTNlZ78ziA8oL6DR8C7EbN2KaTBv\n\tazj3M3vWu/XGH5GjFaqb+/OhE7iw5XXRio8TA+RKvudvwvLFSG8NNlArcqOwuR+s9cwZ\n\trVcw==", "X-Gm-Message-State": "AJIora9H7OdVAwPCbPuEMjV4/TEeVWc1H93DwEuw/K/ZJBidlBdxe7gZ\n\to9ebac9rkPU8ioyziTdFrV7Qs2cYC168gA==", "X-Google-Smtp-Source": "AGRyM1uFfZ3ZQtulOHbsxYDymmtiODqJfWvc9k9bZE+GsqBhtY0OeJ5Ud1eReUQ41jgNVpqoYmINZQ==", "X-Received": "by 2002:a63:d209:0:b0:41a:19a5:f8c0 with SMTP id\n\ta9-20020a63d209000000b0041a19a5f8c0mr15298388pgg.565.1658859931204; \n\tTue, 26 Jul 2022 11:25:31 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 27 Jul 2022 02:24:57 +0800", "Message-Id": "<20220726182500.425182-4-hanlinchen@chromium.org>", "X-Mailer": "git-send-email 2.37.1.359.gd136c6c3e2-goog", "In-Reply-To": "<20220726182500.425182-1-hanlinchen@chromium.org>", "References": "<20220726182500.425182-1-hanlinchen@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/6] libcamera: ipu3: returning partial\n\tresults", "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>", "From": "Han-Lin Chen via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Han-Lin Chen <hanlinchen@chromium.org>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Return metadata at earlier stage.\n\nSigned-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 46 +++++++++++++++-------------\n 1 file changed, 25 insertions(+), 21 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 4fe52f74..75231156 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1300,7 +1300,7 @@ void IPU3CameraData::metadataReady(unsigned int id, const ControlList &metadata)\n \t\treturn;\n \n \tRequest *request = info->request;\n-\trequest->metadata().merge(metadata);\n+\tpipe()->completeMetadata(request, metadata);\n \n \tinfo->metadataProcessed = true;\n \tif (frameInfos_.tryComplete(info))\n@@ -1324,16 +1324,8 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)\n \t\treturn;\n \n \tRequest *request = info->request;\n-\n \tpipe()->completeBuffer(request, buffer);\n \n-\trequest->metadata().set(controls::draft::PipelineDepth, 3);\n-\t/* \\todo Actually apply the scaler crop region to the ImgU. */\n-\tconst auto &scalerCrop = request->controls().get(controls::ScalerCrop);\n-\tif (scalerCrop)\n-\t\tcropRegion_ = *scalerCrop;\n-\trequest->metadata().set(controls::ScalerCrop, cropRegion_);\n-\n \tif (frameInfos_.tryComplete(info))\n \t\tpipe()->completeRequest(request);\n }\n@@ -1372,13 +1364,24 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \t * \\todo The sensor timestamp should be better estimated by connecting\n \t * to the V4L2Device::frameStart signal.\n \t */\n-\trequest->metadata().set(controls::SensorTimestamp,\n-\t\t\t\tbuffer->metadata().timestamp);\n \n \tinfo->effectiveSensorControls = delayedCtrls_->get(buffer->metadata().sequence);\n \n-\tif (request->findBuffer(&rawStream_))\n+\tControlList metadata;\n+\tmetadata.set(controls::draft::PipelineDepth, 3);\n+\tmetadata.set(controls::SensorTimestamp, buffer->metadata().timestamp);\n+\n+\t/* \\todo Actually apply the scaler crop region to the ImgU. */\n+\tconst auto &scalerCrop = request->controls().get(controls::ScalerCrop);\n+\tif (scalerCrop)\n+\t\tcropRegion_ = *scalerCrop;\n+\tmetadata.set(controls::ScalerCrop, cropRegion_);\n+\n+\tpipe()->completeMetadata(request, metadata);\n+\n+\tif (request->findBuffer(&rawStream_)) {\n \t\tpipe()->completeBuffer(request, buffer);\n+\t}\n \n \tipa_->fillParamsBuffer(info->id, info->paramBuffer->cookie());\n }\n@@ -1455,20 +1458,21 @@ void IPU3CameraData::frameStart(uint32_t sequence)\n \tRequest *request = processingRequests_.front();\n \tprocessingRequests_.pop();\n \n-\tconst auto &testPatternMode = request->controls().get(controls::draft::TestPatternMode);\n-\tif (!testPatternMode)\n-\t\treturn;\n+\tint32_t testPatternMode = controls::draft::TestPatternModeOff;\n+\tconst auto &testPatternControl = request->controls().get(controls::draft::TestPatternMode);\n+\tif (testPatternControl)\n+\t\ttestPatternMode = *testPatternControl;\n \n \tint ret = cio2_.sensor()->setTestPatternMode(\n-\t\tstatic_cast<controls::draft::TestPatternModeEnum>(*testPatternMode));\n+\t\tstatic_cast<controls::draft::TestPatternModeEnum>(testPatternMode));\n \tif (ret) {\n-\t\tLOG(IPU3, Error) << \"Failed to set test pattern mode: \"\n-\t\t\t\t << ret;\n-\t\treturn;\n+\t\tLOG(IPU3, Error) << \"Failed to set test pattern mode: \" << ret;\n+\t\ttestPatternMode = controls::draft::TestPatternModeOff;\n \t}\n \n-\trequest->metadata().set(controls::draft::TestPatternMode,\n-\t\t\t\t*testPatternMode);\n+\tControlList metadata;\n+\tmetadata.set(controls::draft::TestPatternMode, testPatternMode);\n+\tpipe()->completeMetadata(request, metadata);\n }\n \n REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3)\n", "prefixes": [ "libcamera-devel", "3/6" ] }