Patch Detail
Show a patch.
GET /api/patches/9106/?format=api
{ "id": 9106, "url": "https://patchwork.libcamera.org/api/patches/9106/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9106/", "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": "<20200731153320.58107-9-jacopo@jmondi.org>", "date": "2020-07-31T15:33:09", "name": "[libcamera-devel,v5,08/19] libcamera: ipu3: Report StreamFormats", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "6b28c1cfb5be735e51a1fbe65c317246e7cc0151", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9106/mbox/", "series": [ { "id": 1171, "url": "https://patchwork.libcamera.org/api/series/1171/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1171", "date": "2020-07-31T15:33:01", "name": "[libcamera-devel,v5,01/19] libcamera: ipu3: Rename mbusCodesToInfo", "version": 5, "mbox": "https://patchwork.libcamera.org/series/1171/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9106/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9106/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 67231BD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 Jul 2020 15:29:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B8F0061F21;\n\tFri, 31 Jul 2020 17:29:58 +0200 (CEST)", "from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6CA27611A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Jul 2020 17:29:57 +0200 (CEST)", "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 88A7E240012;\n\tFri, 31 Jul 2020 15:29:56 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 31 Jul 2020 17:33:09 +0200", "Message-Id": "<20200731153320.58107-9-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200731153320.58107-1-jacopo@jmondi.org>", "References": "<20200731153320.58107-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 08/19] libcamera: ipu3: Report\n\tStreamFormats", "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=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Report StreamFormats associated to each StreamConfiguration generated\nby the IPU3 pipeline handler.\n\nThe StreamFormats are generated differently for RAW and processed\nstreams, with the former using the sensor enumerated resolutions and\nthe latter using a continuous range of sizes constructed by matching the\nsensor capabilities with the platform constraints.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 45 +++++++++++++++++++---------\n 1 file changed, 31 insertions(+), 14 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex b998c0722edc..bc834f89f030 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -313,7 +313,10 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \n \tSize sensorResolution = data->cio2_.sensor()->resolution();\n \tfor (const StreamRole role : roles) {\n-\t\tStreamConfiguration cfg = {};\n+\t\tstd::map<PixelFormat, std::vector<SizeRange>> streamFormats;\n+\t\tunsigned int bufferCount;\n+\t\tPixelFormat pixelFormat;\n+\t\tSize size;\n \n \t\tswitch (role) {\n \t\tcase StreamRole::StillCapture:\n@@ -323,18 +326,26 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \t\t\t * to the ImgU maximum output size) and aligned down to\n \t\t\t * the required frame margin.\n \t\t\t */\n-\t\t\tcfg.size = sensorResolution.boundedTo(IMGU_OUTPUT_MAX_SIZE);\n-\t\t\tcfg.size.width = utils::alignDown(cfg.size.width - 1,\n-\t\t\t\t\t\t\t IMGU_OUTPUT_WIDTH_MARGIN);\n-\t\t\tcfg.size.height = utils::alignDown(cfg.size.height - 1,\n-\t\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_MARGIN);\n-\t\t\tcfg.pixelFormat = formats::NV12;\n-\t\t\tcfg.bufferCount = IPU3_BUFFER_COUNT;\n+\t\t\tsize = sensorResolution.boundedTo(IMGU_OUTPUT_MAX_SIZE);\n+\t\t\tsize.width = utils::alignDown(size.width - 1,\n+\t\t\t\t\t\t IMGU_OUTPUT_WIDTH_MARGIN);\n+\t\t\tsize.height = utils::alignDown(size.height - 1,\n+\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_MARGIN);\n+\t\t\tpixelFormat = formats::NV12;\n+\t\t\tbufferCount = IPU3_BUFFER_COUNT;\n+\t\t\tstreamFormats[pixelFormat] = { { IMGU_OUTPUT_MIN_SIZE, size } };\n \n \t\t\tbreak;\n \n \t\tcase StreamRole::StillCaptureRaw: {\n-\t\t\tcfg = data->cio2_.generateConfiguration(sensorResolution);\n+\t\t\tStreamConfiguration cio2Config =\n+\t\t\t\tdata->cio2_.generateConfiguration(sensorResolution);\n+\t\t\tpixelFormat = cio2Config.pixelFormat;\n+\t\t\tsize = cio2Config.size;\n+\t\t\tbufferCount = cio2Config.bufferCount;\n+\n+\t\t\tfor (const PixelFormat &format : data->cio2_.formats())\n+\t\t\t\tstreamFormats[format] = data->cio2_.sizes();\n \n \t\t\tbreak;\n \t\t}\n@@ -346,11 +357,12 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \t\t\t * capped to the maximum sensor resolution and aligned\n \t\t\t * to the ImgU output constraints.\n \t\t\t */\n-\t\t\tcfg.size = sensorResolution.boundedTo({ 1280, 720 })\n-\t\t\t\t\t\t .alignedDownTo(IMGU_OUTPUT_WIDTH_ALIGN,\n-\t\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_ALIGN);\n-\t\t\tcfg.pixelFormat = formats::NV12;\n-\t\t\tcfg.bufferCount = IPU3_BUFFER_COUNT;\n+\t\t\tsize = sensorResolution.boundedTo({ 1280, 720 })\n+\t\t\t\t\t .alignedDownTo(IMGU_OUTPUT_WIDTH_ALIGN,\n+\t\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_ALIGN);\n+\t\t\tpixelFormat = formats::NV12;\n+\t\t\tbufferCount = IPU3_BUFFER_COUNT;\n+\t\t\tstreamFormats[pixelFormat] = { { IMGU_OUTPUT_MIN_SIZE, size } };\n \n \t\t\tbreak;\n \t\t}\n@@ -362,6 +374,11 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \t\t\treturn nullptr;\n \t\t}\n \n+\t\tStreamFormats formats(streamFormats);\n+\t\tStreamConfiguration cfg(formats);\n+\t\tcfg.size = size;\n+\t\tcfg.pixelFormat = pixelFormat;\n+\t\tcfg.bufferCount = bufferCount;\n \t\tconfig->addConfiguration(cfg);\n \t}\n \n", "prefixes": [ "libcamera-devel", "v5", "08/19" ] }