Patch Detail
Show a patch.
GET /api/patches/16433/?format=api
{ "id": 16433, "url": "https://patchwork.libcamera.org/api/patches/16433/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16433/", "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": "<20220629103018.4025635-8-chenghaoyang@google.com>", "date": "2022-06-29T10:30:16", "name": "[libcamera-devel,v3,7/9] ipu3: Assign |outCaptureStream| to StillCapture configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "64254e205cc5c738944395388085e2005d0b4d17", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": { "id": 12, "url": "https://patchwork.libcamera.org/api/users/12/?format=api", "username": "uajain", "first_name": "Umang", "last_name": "Jain", "email": "umang.jain@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/16433/mbox/", "series": [ { "id": 3232, "url": "https://patchwork.libcamera.org/api/series/3232/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3232", "date": "2022-06-29T10:30:09", "name": "Use two imgus in ipu3 pipeline handler", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3232/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16433/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16433/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 26D33BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jun 2022 10:30:39 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF84F6564F;\n\tWed, 29 Jun 2022 12:30:38 +0200 (CEST)", "from mail-pf1-x431.google.com (mail-pf1-x431.google.com\n\t[IPv6:2607:f8b0:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2AB2565635\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 12:30:33 +0200 (CEST)", "by mail-pf1-x431.google.com with SMTP id k9so5470397pfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 03:30:33 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(208.158.221.35.bc.googleusercontent.com. [35.221.158.208])\n\tby smtp.gmail.com with ESMTPSA id\n\tjb4-20020a170903258400b00169071538a0sm10946059plb.267.2022.06.29.03.30.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 29 Jun 2022 03:30:30 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656498638;\n\tbh=7KqNgvMj8FSraVhSOVEy66P80+zobT6EsrmjhpASRWM=;\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:Cc:\n\tFrom;\n\tb=FPlfBELtbwKp7MaRNAQeaIdzFQoTTUYirUjuzlsj+forNUCkLUSkdHde+APSlTaw0\n\t9+RkxNj0aNrCYlLQdKOdFetOfqbzMiiF91pJFDcCjlseBV5reuFajm0uJh9hTW1Pyb\n\tDmUsXjNsSNOj2IhD/fxPsiG4dcE9BRPNn2okL8hZWrnNFRzQs8ibGbYJCOAGKE8ZWg\n\tX7+sq+N68xnUMiN9ZlomBfLkmiCKQC91J+yiJZc+LWDnLolUiI3kKXsu3hTXBwF3L1\n\tvvKKN+kvZkvtG7Go1gCE0CdfCWFoR4fUTID7JDXjhkkizheio/p8EejlzaYnLswTBC\n\tZ+2tncWHINTnw==", "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=w8WHyL8X8fhfTwZq5npRafRg2jbSksvdOtNL7mzbwao=;\n\tb=B4R3dTX26CHtDR5Xa/DGfx199aNyvuG4yspDHzjhql43P2+qaoJkuCr9mqrmbbp+jd\n\tiMYyjNxO1riqpeMm9Mp1ZzQ58Sw8FCNYJzBee6G7EgJQPVbOva6VnbdQuUPOzsDefGuA\n\tqlaRd41Jv3AMD7xB5pbWVUcWrsY26elqULcF8=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"B4R3dTX2\"; \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=w8WHyL8X8fhfTwZq5npRafRg2jbSksvdOtNL7mzbwao=;\n\tb=7i3w8UXGvnsjpiZE4U9HBQm7cNwlFazHPtDXnLQCsoJWoVvAReuK5fn7RXRTW3NehD\n\tjg39NNmf9+25DnjYuPrs/rW8OiU7lH+x6/9WH0hD70rFx1yaS1F/quJ+4roqnHkGzz0T\n\tr91WByaVGT5dkXjPJ2t1NeJVMGwTfPXOxnSDJ+z+69Fr5JO40g9eU9kYT/LhJd5J6oQD\n\t95evwRVVMrWoHTP21NFK6FlzwdZMhf7zmUDT4JesSN71nywpdWRXpTHp7g7tni2VenBn\n\twn8uQVprZpLGgc+IWYL91674ARroiI6AZhKGCXWQmS7UfZTVxyPBMxPmE55BtJ//C6dK\n\tEmtA==", "X-Gm-Message-State": "AJIora9JJh9a+e/GeKETZAc6QdraD6Ru470jAG2/dRZMyRnTfruVc9f8\n\t2nk+JNHM/2D5biYe5GTMcvGW9X+M8q53w3a0", "X-Google-Smtp-Source": "AGRyM1v26BGDV8+U4CZDaH4znjvOMv9ScM/Uv7W98WJxNLWJf+pCIm0mxpYIZtThvE9JIEx7uLVU3Q==", "X-Received": "by 2002:a63:924f:0:b0:40c:f2d4:27e8 with SMTP id\n\ts15-20020a63924f000000b0040cf2d427e8mr2479173pgn.255.1656498631271; \n\tWed, 29 Jun 2022 03:30:31 -0700 (PDT)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 29 Jun 2022 10:30:16 +0000", "Message-Id": "<20220629103018.4025635-8-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.37.0.rc0.161.g10f37bed90-goog", "In-Reply-To": "<20220629103018.4025635-1-chenghaoyang@google.com>", "References": "<20220629103018.4025635-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 7/9] ipu3: Assign |outCaptureStream| to\n\tStillCapture configuration", "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": "Harvey Yang via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Harvey Yang <chenghaoyang@chromium.org>", "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "When StillCapture and other non-raw configurations are requested,\nassigns |outCaptureStream| instead of |outStream| to the StillCapture\nconfiguration.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 50 +++++++++++++++++++++++-----\n 1 file changed, 42 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex ec9d14d1..e26c2736 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -254,8 +254,10 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t * \\todo Clarify the IF and BDS margins requirements.\n \t */\n \tunsigned int rawCount = 0;\n-\tunsigned int yuvCount = 0;\n+\tunsigned int videoCount = 0;\n+\tunsigned int stillCount = 0;\n \tSize maxYuvSize;\n+\tSize maxVideoSize;\n \tSize rawSize;\n \n \tfor (const StreamConfiguration &cfg : config_) {\n@@ -264,16 +266,29 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\tif (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW) {\n \t\t\trawCount++;\n \t\t\trawSize.expandTo(cfg.size);\n+\t\t} else if (cfg.streamRole == StreamRole::StillCapture) {\n+\t\t\tif (stillCount != 0)\n+\t\t\t\treturn Invalid;\n+\n+\t\t\tstillCount++;\n+\t\t\tmaxYuvSize.expandTo(cfg.size);\n \t\t} else {\n-\t\t\tyuvCount++;\n+\t\t\tvideoCount++;\n \t\t\tmaxYuvSize.expandTo(cfg.size);\n+\t\t\tmaxVideoSize.expandTo(cfg.size);\n \t\t}\n \t}\n \n-\tif (rawCount > 1 || yuvCount > 2) {\n+\tif (videoCount == 0 && stillCount == 1) {\n+\t\tstillCount = 0;\n+\t\tvideoCount = 1;\n+\t\tmaxVideoSize.expandTo(maxYuvSize);\n+\t}\n+\n+\tif (rawCount > 1 || videoCount > 2) {\n \t\tLOG(IPU3, Debug) << \"Camera configuration not supported\";\n \t\treturn Invalid;\n-\t} else if (rawCount && !yuvCount) {\n+\t} else if (rawCount && !stillCount && !videoCount) {\n \t\t/*\n \t\t * Disallow raw-only camera configuration. Currently, ImgU does\n \t\t * not get configured for raw-only streams and has early return\n@@ -316,6 +331,9 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \tImgUDevice::Pipe pipe{};\n \tpipe.input = cio2Configuration_.size;\n \n+\tImgUDevice::Pipe pipe1{};\n+\tpipe1.input = cio2Configuration_.size;\n+\n \t/*\n \t * Adjust the configurations if needed and assign streams while\n \t * iterating them.\n@@ -380,18 +398,34 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\t\tcfg->stride = info.stride(cfg->size.width, 0, 1);\n \t\t\tcfg->frameSize = info.frameSize(cfg->size, 1);\n \n+\t\t\tif (stillCount == 1 && cfg->streamRole == StreamRole::StillCapture) {\n+\t\t\t\tLOG(IPU3, Debug) << \"Assigned \"\n+\t\t\t\t\t\t << cfg->toString()\n+\t\t\t\t\t\t << \" to the imgu1 main output\";\n+\t\t\t\tcfg->setStream(const_cast<Stream *>(&data_->outCaptureStream_));\n+\n+\t\t\t\tpipe1.main = cfg->size;\n+\t\t\t\tpipe1.viewfinder = pipe1.main;\n+\n+\t\t\t\tpipeConfig1_ = data_->imgu1_->calculatePipeConfig(&pipe1);\n+\t\t\t\tif (pipeConfig1_.isNull()) {\n+\t\t\t\t\tLOG(IPU3, Error) << \"Failed to calculate pipe configuration: \"\n+\t\t\t\t\t\t\t << \"unsupported resolutions.\";\n+\t\t\t\t\treturn Invalid;\n+\t\t\t\t}\n \t\t\t/*\n \t\t\t * Use the main output stream in case only one stream is\n \t\t\t * requested or if the current configuration is the one\n \t\t\t * with the maximum YUV output size.\n \t\t\t */\n-\t\t\tif (mainOutputAvailable &&\n-\t\t\t (originalCfg.size == maxYuvSize || yuvCount == 1)) {\n+\t\t\t} else if (mainOutputAvailable &&\n+\t\t\t\t (originalCfg.size == maxVideoSize ||\n+\t\t\t\t videoCount == 1)) {\n \t\t\t\tcfg->setStream(const_cast<Stream *>(&data_->outStream_));\n \t\t\t\tmainOutputAvailable = false;\n \n \t\t\t\tpipe.main = cfg->size;\n-\t\t\t\tif (yuvCount == 1)\n+\t\t\t\tif (videoCount == 1)\n \t\t\t\t\tpipe.viewfinder = pipe.main;\n \n \t\t\t\tLOG(IPU3, Debug) << \"Assigned \" << cfg->toString()\n@@ -415,7 +449,7 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t}\n \n \t/* Only compute the ImgU configuration if a YUV stream has been requested. */\n-\tif (yuvCount) {\n+\tif (videoCount) {\n \t\tpipeConfig0_ = data_->imgu0_->calculatePipeConfig(&pipe);\n \t\tif (pipeConfig0_.isNull()) {\n \t\t\tLOG(IPU3, Error) << \"Failed to calculate pipe configuration: \"\n", "prefixes": [ "libcamera-devel", "v3", "7/9" ] }