Patch Detail
Show a patch.
GET /api/1.1/patches/15903/?format=api
{ "id": 15903, "url": "https://patchwork.libcamera.org/api/1.1/patches/15903/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15903/", "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": "<20220512103258.324339-8-chenghaoyang@google.com>", "date": "2022-05-12T10:32:57", "name": "[libcamera-devel,7/8] Assign |outCaptureStream| to StillCapture configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d53578020012dca000b5dcc8704b514058fd0335", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/1.1/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15903/mbox/", "series": [ { "id": 3111, "url": "https://patchwork.libcamera.org/api/1.1/series/3111/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3111", "date": "2022-05-12T10:32:50", "name": "Use two imgus in ipu3 pipeline handler", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3111/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15903/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15903/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 D54B0C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 May 2022 10:33:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78BEA65657;\n\tThu, 12 May 2022 12:33:18 +0200 (CEST)", "from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com\n\t[IPv6:2607:f8b0:4864:20::52f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DE2CF65656\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 May 2022 12:33:16 +0200 (CEST)", "by mail-pg1-x52f.google.com with SMTP id 31so4206527pgp.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 May 2022 03:33:16 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(174.71.80.34.bc.googleusercontent.com. [34.80.71.174])\n\tby smtp.gmail.com with ESMTPSA id\n\tt19-20020a62d153000000b005087c23ad8dsm3402219pfl.0.2022.05.12.03.33.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 12 May 2022 03:33:14 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652351598;\n\tbh=gCQstSjvJGwHXaHOtpruSN974DmXKSWgDVgsIcbWObM=;\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=QJkaXTUlmnhT7pJQ9MQBQAa5JEhY9JAxWOydprmN6elcW/Pt0r42dktTj+/8b1z6Y\n\tP3gk02HRhMBeJLUHf9tWfZXMuAyuGmjDMDZGSIx9JJRBIaEly2c4MbVJCdgJqQKuO4\n\tRzFcbgSA0zBMfk6Q2d/E/dwyx7T0z6Y+0w+W0UfLT2CR0bFdQ9qIRUvSPw+XL6c4F9\n\tX0DEx64pNlVt13JdMDE5OcDWtDSLq8CPjmAXi9GfIRA+TSz25gUa2/LhDJ6xG8oXeB\n\tVYNjK5aI9S23NvgxoteAH34U2r8nlaT9y8FQpeRA4Tvi/FdHQhR/kDnw7cwVUluGEY\n\tIksFIKlwm2SeA==", "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=xiU6As+WxCHaLY/jIx5QcwNyTIeEOCwcYi0xBHtZjc8=;\n\tb=Z6iwdeDj4LGvMxWwAwAdatiBlkL/Tkh8AWtHfkzxHfxYcNyVid4jJvCnB3467RAXYp\n\tb6wvDm5a8jJokQQRshX+/bRggU/pdsxZ8NVacHHI8uoFwvKMuz/Vs2ojqyVDaHfUGAyI\n\tcliuW2RDyhB1Xo3e5Tb6ga3QgKsEL1v3GzJP0=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"Z6iwdeDj\"; \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=xiU6As+WxCHaLY/jIx5QcwNyTIeEOCwcYi0xBHtZjc8=;\n\tb=pM5J4vpby9nkqRrnDYO54mYPxdRlHRn//euXznY4+wvhVyVqc3LwB5SpX/SqRpKZm4\n\tYF+Pto4V3o604iHtxIvVCCVHg++XLz1cEgwm5d+z1EgWpl3B9A6P/bQECOBqjHIrOoe5\n\tO/UWs/chs8obf3fkSeFW7Jguy+UWU+J3hvWESBE9mL/XwnsjDbbX+3UT/Z/YTmyQOaCx\n\tKTqoRKoBpTiZnucJOVFmUFY0SKolZ4R0uDa73OZH6YHrkDaBCFEMLSdYuvYnSWZpYT6s\n\tqy9UmeWjfRJXGVCTyy84A+rueHWPZ/cBgxcGrDP227288JqcCnbvtZM+4IFOs+Sx8RdC\n\tMbUw==", "X-Gm-Message-State": "AOAM5329GSbEZOwkFbuyKyy+QuVi8uVIj77/nUMJ7DaSoABZRTMAij51\n\tYH2yCl3KJzZOgrcgY1Mu925Ke2yLpoHbD87S", "X-Google-Smtp-Source": "ABdhPJy2ShlBnvl7e4feG4KJLkasRLVIV3Vlt+L6FWqrLiV+3SkSTgObLq5NGAHH5hG2C2G2x7IO8g==", "X-Received": "by 2002:a63:dc42:0:b0:3c5:e187:572 with SMTP id\n\tf2-20020a63dc42000000b003c5e1870572mr24829895pgj.82.1652351595016; \n\tThu, 12 May 2022 03:33:15 -0700 (PDT)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 12 May 2022 10:32:57 +0000", "Message-Id": "<20220512103258.324339-8-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.36.0.512.ge40c2bad7a-goog", "In-Reply-To": "<20220512103258.324339-1-chenghaoyang@google.com>", "References": "<20220512103258.324339-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 7/8] 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 | 51 +++++++++++++++++++++++-----\n 1 file changed, 43 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 9498b1b0..94aeebf3 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -257,8 +257,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@@ -267,16 +269,30 @@ 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\tonlyStillCapture_ = true;\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@@ -319,6 +335,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@@ -383,18 +402,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@@ -418,7 +453,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", "7/8" ] }