Patch Detail
Show a patch.
GET /api/1.1/patches/25472/?format=api
{ "id": 25472, "url": "https://patchwork.libcamera.org/api/1.1/patches/25472/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25472/", "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": "<20251210164055.17856-8-david.plowman@raspberrypi.com>", "date": "2025-12-10T16:15:22", "name": "[07/11] pipeline: rpi: Allow generation of raw input configurations", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f523c08c978467ffbddafb167cccea04c470ea14", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25472/mbox/", "series": [ { "id": 5650, "url": "https://patchwork.libcamera.org/api/1.1/series/5650/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5650", "date": "2025-12-10T16:15:15", "name": "Bayer re-processing", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5650/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25472/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25472/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 32CBDC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 16:41:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F1CA61509;\n\tWed, 10 Dec 2025 17:41:11 +0100 (CET)", "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 054226149B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 17:41:05 +0100 (CET)", "by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-47796a837c7so68495e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 08:41:05 -0800 (PST)", "from davidp-pi5.pitowers.org\n\t([2a00:1098:3142:1f:88ea:c658:5b20:5e46])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47a88371e13sm1270415e9.11.2025.12.10.08.41.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 10 Dec 2025 08:41:03 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Swvy/CW7\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1765384864; x=1765989664;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=WP1VupwtxAszKVcn9Ser24SVpYpOcJsqWi7KlZMCpE8=;\n\tb=Swvy/CW7gin8LXWHuvplE/JbYo/SqApIXS7WXyr0hp0D/omA/PEHAyhmqaDqJiLV2G\n\tC3kGkbS+j6JtNOraMe2/8rv7GlIgIL4TMh/O7aIdJjap3cxFx0RyMJ7rjvPDQEXGqy6f\n\tzCHfnxUDjAd8ZobS674++A9f9Cq9+YZub+CokS4zoN4T6VFgqAPwFmfEGpzXeE0k1HkS\n\ttSZaFPmf1vU9XeI56XaLHxvYJQJOigaeU1MFFB3R1GN/pfcgudO91aQ10cs8imIZ5mta\n\ts+4vlKIrowFwE9M6IHNHIh0RSugTeefU0LyukLzwQsv1PVfIy2VyWabDcLCBtEXux5b+\n\tTrDA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765384864; x=1765989664;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=WP1VupwtxAszKVcn9Ser24SVpYpOcJsqWi7KlZMCpE8=;\n\tb=w/5ZIc4ARcUhQUTJUjm223Wkio5UMeN6oI6SBXY9xWg9Zk9srMfps9Sn/yM3mWF9LD\n\tFRiESg4piUhV6JLhH09kfOyEtoWjV5Ozx8Fuh2QgCxIJXWYgTwIOm49xgeHBd39+6xwj\n\tZz0Kc59vhR73u9xy5tdNpN/B57Y2iBCWiimvn5qtoIa34o6qrguGjw3hsFsXC2xV9zs9\n\t0VMAu+Et4mfJn70mq3TsFxO6ijHovmSAYnQAKu42ivapm3KaV8u7wZJqd3zF5MZCIB2Q\n\tIs3ImMQ99bDHfKfXe5IQPYzdOCX3ZflpxAARfGBk3r1PgDoDQ+ESe2zvroz4s/AffSt7\n\tesXw==", "X-Gm-Message-State": "AOJu0YyRAeEtfCNQnbmkbjHFCCKb4ZelF4bSqXn2NZM5zBWG4KcfZ4YA\n\tL4vm14x3tUWhzMbAq8VCu4LA4C7lV+mFNeN3qJefU36/s7fHIBcgVepaFfWRyAhpRC6KHmI1mBp\n\te2CCR", "X-Gm-Gg": "ASbGncvorlZW/hWfF0eRugQFlmwxdebFv6K6h7Zbb8GAkUkYTTwHkLtUiUZCuLGgmR3\n\trkYWoiaivKgzoftvlNDqJXYUbQBbH7VJwpYjXc32iKABcr3rJ9WA/xm5tzBjpwPPZBDgERt0adS\n\tqpGADoT2KoW6QqmUdQBbvOmXuxjgxcq9B8yjEw2srEhNDOTYnjG0nChsDj4Yih4MjrvvM+UCLIh\n\togaELhIKNx90hFLS0emURux+vp76CVZb5E+ZmLsudlwVdZ9pDKtuqfvdyPzo7d6VgJfX4Ki25Wz\n\tg2BGMABoHBsY4HJHa5WJ+MWlYoqPXsTqBcJGh+ioWcEtJx6UZPoqeJfaZ32GwxLHOuI9up81gE6\n\tMyWOMjc/o8/eMaqm37M3V3fYPUvtvkl/3Dz80PI9IyWHUtubzEqWl1SO74x6LZNIRSekh5fPn5x\n\thu92hxYl1xLGOx2196U8/23hgegwnn8QRMNiG674mjOy2UsnQgI7kfepR0OMhAuaRyd4wo4NWIq\n\t0UMuuTZNr+nCMs0IrrBfzkY+sKVAA==", "X-Google-Smtp-Source": "AGHT+IFJUQ+YnA3RrO7tWmKeEtcYivHfEGyWN+CNNgsv7zAkdeb0cv8U2QVPDYs2z+JtiN+rFJK6MA==", "X-Received": "by 2002:a05:600c:190f:b0:47a:8154:33e3 with SMTP id\n\t5b1f17b1804b1-47a83810f33mr30398065e9.28.1765384864172; \n\tWed, 10 Dec 2025 08:41:04 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "David Plowman <david.plowman@raspberrypi.com>", "Subject": "[PATCH 07/11] pipeline: rpi: Allow generation of raw input\n\tconfigurations", "Date": "Wed, 10 Dec 2025 16:15:22 +0000", "Message-ID": "<20251210164055.17856-8-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20251210164055.17856-1-david.plowman@raspberrypi.com>", "References": "<20251210164055.17856-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Support the RawInput stream role, which makes a raw stream that is\nmarked as an input (for example, for Bayer re-processing).\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n .../pipeline/rpi/common/pipeline_base.cpp | 23 ++++++++++++++++++-\n 1 file changed, 22 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 6878bdee..76bcb2a4 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -436,12 +436,23 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n \tV4L2VideoDevice::Formats fmts;\n \tSize size;\n \tstd::optional<ColorSpace> colorSpace;\n+\tStreamDirection direction;\n \n \tif (roles.empty())\n \t\treturn config;\n \n-\tSize sensorSize = data->sensor_->resolution();\n+\t/*\n+\t * When running memory to memory, without an actual sensor, we can't ask for its size.\n+\t * We'll make a CameraSensorMemory, to match the raw input stream configuration in due\n+\t * course, but for now use a placeholder size in this case.\n+\t */\n+\tSize sensorSize = Size(640, 480);\n+\tif (data->sensor_)\n+\t\tsensorSize = data->sensor_->resolution();\n+\n \tfor (const StreamRole role : roles) {\n+\t\tdirection = StreamDirection::Output;\n+\n \t\tswitch (role) {\n \t\tcase StreamRole::Raw:\n \t\t\tsize = sensorSize;\n@@ -453,6 +464,15 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n \t\t\tbufferCount = 2;\n \t\t\tbreak;\n \n+\t\tcase StreamRole::RawInput:\n+\t\t\tsize = sensorSize;\n+\t\t\t/* Placeholder value to prevent warnings, the application should override. */\n+\t\t\tpixelFormat = formats::SBGGR12;\n+\t\t\tcolorSpace = ColorSpace::Raw;\n+\t\t\tbufferCount = 2;\n+\t\t\tdirection = StreamDirection::Input;\n+\t\t\tbreak;\n+\n \t\tcase StreamRole::StillCapture:\n \t\t\tfmts = data->ispFormats();\n \t\t\tpixelFormat = formats::YUV420;\n@@ -538,6 +558,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n \t\tcfg.pixelFormat = pixelFormat;\n \t\tcfg.colorSpace = colorSpace;\n \t\tcfg.bufferCount = bufferCount;\n+\t\tcfg.direction = direction;\n \t\tconfig->addConfiguration(cfg);\n \t}\n \n", "prefixes": [ "07/11" ] }