Show a cover letter.

GET /api/covers/26610/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26610,
    "url": "https://patchwork.libcamera.org/api/covers/26610/?format=api",
    "web_url": "https://patchwork.libcamera.org/cover/26610/",
    "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": "<20260504091623.3354474-1-maxbretschneider@protonmail.com>",
    "date": "2026-05-04T09:16:41",
    "name": "[RFC,v2,0/2] libcamera: pipeline: virtual: Add raw Bayer frame support",
    "submitter": {
        "id": 266,
        "url": "https://patchwork.libcamera.org/api/people/266/?format=api",
        "name": "Max Bretschneider",
        "email": "maxbretschneider@protonmail.com"
    },
    "mbox": "https://patchwork.libcamera.org/cover/26610/mbox/",
    "series": [
        {
            "id": 5901,
            "url": "https://patchwork.libcamera.org/api/series/5901/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5901",
            "date": "2026-05-04T09:16:41",
            "name": "libcamera: pipeline: virtual: Add raw Bayer frame support",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5901/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/covers/26610/comments/",
    "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 03B70BDCB5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 May 2026 09:16:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AF87D63024;\n\tMon,  4 May 2026 11:16:49 +0200 (CEST)",
            "from mail-4325.protonmail.ch (mail-4325.protonmail.ch\n\t[185.70.43.25])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E84CA62DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 11:16:47 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"No286Fht\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1777886207; x=1778145407;\n\tbh=wubbBnVLOSzVo5rdG17QaliLf57kLlIXTgS1XckNOAc=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=No286Fht2Sdl1t23gMuLbxm58+V9a5OidikaU1gtftL5WS7qK7jxbaZgAQkN0mPML\n\tVZb2ScoXayoFmfKtLBcGnJ6s1dSWtowdQFUVSrPFe6GuXZrxF5Ez3D9Jl521m4DaO8\n\t0qZE4GfGjx2ug6W7l2e4PkNVvbDK4gqNHEpBZnghvtqzE6lLPEMCKfLPMTLgLRFZRd\n\tYEmCCjKeaM4T2ERlIvw+NQE2jtxFuSxm1YFlV5MBE52J9e3CEz/1Z+SFGw9XaN0Jch\n\tK5pNjETK6uHhgNkDVZwEJV63h5riLuyqEdsw71FVeaUOAwvCCPp2VE9/O3P8sI7RR3\n\trmUmBybKnqEVA==",
        "Date": "Mon, 04 May 2026 09:16:41 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "maxbretschneider@protonmail.com",
        "Cc": "Max Bretschneider <maxbretschneider@protonmail.com>",
        "Subject": "[RFC PATCH v2 0/2] libcamera: pipeline: virtual: Add raw Bayer frame\n\tsupport",
        "Message-ID": "<20260504091623.3354474-1-maxbretschneider@protonmail.com>",
        "In-Reply-To": "<20260501105137.439519-1-maxbretschneider@protonmail.com>",
        "References": "<20260501105137.439519-1-maxbretschneider@protonmail.com>",
        "Feedback-ID": "122687743:user:proton",
        "X-Pm-Message-ID": "2214dfea6da114fb29dd57c23f21cde21759f398",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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": "From: Max Bretschneider <maxbretschneider@protonmail.com>\n\nChanges since v1: \n- Squashes config parser and Bayer format support into one commit in\n  order to maintain the bisectability. \n\nThe virtual pipeline handler currently only produces NV12 output, either\nfrom test patterns or JPEG files. This means that SoftISP, which\nprocesses raw Bayer data, cannot be tested without physical camera\nhardware. A first step to achieving this would be to support raw streams\nin the virtual pipeline handler. This series introduces a RawFrameGenerator\nthat reads binary raw Bayer files from disk and serves them through the virtual\npipeline. The introduced changes are opt-in through the YAML configuration. If\nvirtual cameras are configured with raw_frames, the new code path is\nchosen, paths for the existing test_patterns and frames are unaffected.\n\nThe SoftISP part of this patch's motivation is complemented by David Plowman's\nseries, which introduced the CameraSensorMemory class\n(https://patchwork.libcamera.org/patch/25468/), since SoftISP needs an\nactual CameraSensor for correct construction. The idea is that in the\nfuture it can be used together to serve Raw frames through the\nvirtual pipeline and process them with SoftISP, for example\nfor CI tests or more easily reproducible benchmarks.\n\nTesting: I have used `dd` to create zero filled raw frames to\ntest things such as format negotiation, buffer sizing, general frame\nflow, config parsing (both right/wrong, e.g. rejecting invalid input)\nand bit depth handling. I've written a small bash script to essentialy\nautomate this for all n : { 8, 10, 12, 14, 16 } and the four Bayer\nformats in accordance to `src/libcamera/formats.yaml`. I then used numpy to\ntest the generateFrame() functionality by generating a known frame with\ncontent, capturing it through the pipeline to disk with the cam application\nand then reading the output back again to verify that all the pixels match\nthe expected values.\n\nI noticed that the pipeline handler components currently have no\ndedicated test coverage, if I missed them or if there is some preferred\napproach for adding additional testing I'd be open to any suggestions.\nFor now I can also share my scripts if thats wanted.\n\nRan `git clang-format` as well as the `checkstyle.py`. I've run the\nMeson tests both with and without the changes and get the same:\nOk:                 51\nExpected Fail:      1\nFail:               1\nUnexpected Pass:    0\nSkipped:            29\nTimeout:            0\n\nOpen questions:\n- The sensor properties set in match() are currently hardcoded, and I've\n  left them with a \\todo. Especially since we've also discussed adding\n  controls such as Exposure and AnalogueGain in \"[RFC] Decouple\n  SoftwareISP from CameraSensor for virtual pipeline testing\": Should I\n  move these directly to the yaml as well or proceed differently?\n- I've written a lambda to derive the pixel format, but at this point it\n  has gotten quite large. Maybe this could also be a 2D lookup table or\n  something else that is cleaner. On that lambda also: all cases are\n  covered I think, but the default case is 16, I wasn't sure if 16\n  should also be made an explicit case and something more sensible\n  should be chosen for the default.\n- Between the raw_frames and the frames path, the file collection logic\n  is now also duplicated. Should I add a helper here to change this?\n- Currently every frame is read into framesDatas_ immediately at\n  startup. Depending on the number and the size of the raw files, this\n  could take up quite a lot of memory. For the use cases I thought of\n  (e.g. CI) this would be fine, since the number of files would probably\n  be comparatively small there. Still I wanted to bring it up.\n- We weren't sure if the SPDX license header is fine like this. For the\n  moment I've just placed my intern company mail, is this fine as is?\n\nDocumentation:\nI've added documentation according to the coding-style.rst,\nif my comments are not sufficient I'd be happy to add more of course.\n\nAI Disclosure:\nI've used DeepWiki to familiarize myself with the libcamera repository\nand to point me at reference implementations and patterns to use as orientation.\n\nThank you all for your time!\n\nMax Bretschneider (2):\n  libcamera: pipeline: virtual: Add RawFrameGenerator\n  libcamera: pipeline: virtual: Add raw_frames config and Bayer format\n    support\n\n .../pipeline/virtual/config_parser.cpp        | 100 ++++++++++++-\n src/libcamera/pipeline/virtual/meson.build    |   1 +\n .../pipeline/virtual/raw_frame_generator.cpp  | 131 ++++++++++++++++++\n .../pipeline/virtual/raw_frame_generator.h    |  47 +++++++\n src/libcamera/pipeline/virtual/virtual.cpp    | 123 +++++++++++++---\n src/libcamera/pipeline/virtual/virtual.h      |   3 +-\n 6 files changed, 382 insertions(+), 23 deletions(-)\n create mode 100644 src/libcamera/pipeline/virtual/raw_frame_generator.cpp\n create mode 100644 src/libcamera/pipeline/virtual/raw_frame_generator.h"
}