Show a patch.

GET /api/1.1/patches/19329/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 19329,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19329/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19329/",
    "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": "<ZXt3I+osSMeuhXMr@duo.ucw.cz>",
    "date": "2023-12-14T21:44:03",
    "name": "[libcamera-devel] swisp performance notes was Re: [RFC] Add 8-bit bayer support.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8ff45729e8a13f08c2e379a16aec564b164387a8",
    "submitter": {
        "id": 49,
        "url": "https://patchwork.libcamera.org/api/1.1/people/49/?format=api",
        "name": "Pavel Machek",
        "email": "pavel@ucw.cz"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19329/mbox/",
    "series": [
        {
            "id": 4120,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4120/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4120",
            "date": "2023-12-14T21:44:03",
            "name": "[libcamera-devel] swisp performance notes was Re: [RFC] Add 8-bit bayer support.",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4120/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19329/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19329/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 9005DC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 21:44:06 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 01B6C62B33;\n\tThu, 14 Dec 2023 22:44:06 +0100 (CET)",
            "from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AD79262B2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 22:44:04 +0100 (CET)",
            "by jabberwock.ucw.cz (Postfix, from userid 1017)\n\tid 6BC671C006F; Thu, 14 Dec 2023 22:44:04 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702590246;\n\tbh=FSTKHY0MpRYh7uxhKCX1jkAIPhqUlWILUtdbayQzAqc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=EYdbNHWEc2FHz905KVkSIps7R8V295gTcnNMbIQ12eDIBqH1yES4/TzOBel2jcOnk\n\ti1X7G/q4WEjFCeNitfMbU5AbdZU0OfxLmlj3rVqX0SI4R5HxyXx7O8f+RZNYlYKgCO\n\tZ/m8zYCONyxTR+yQtjPGzex4fJOq2jl7YqMhlq2wjUGWn7cbjrkNZyS9EjYJEgD5Eu\n\t4VXZ+O02Z0Kye3hgfhCv5f06OJ0GtckDuEJm7t0JUGenXAar/EbqjWW5vnXTOe4wzR\n\t74isie3pzvzBdQ7wLALr5qBOFIpYUsL5jKLIbicABoHAiRbdb3bdUwVDxif9XutCjf\n\tF9A+3M0wb2noA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1;\n\tt=1702590244;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=nuhJDBE+W9kIUHejbUaJVGkzakdeuq2jjjmDYtW8FT4=;\n\tb=L65vHTnqLC/91YHLPKkgqxjujqj1rIhTeSPoYSWpJrsOZrrSFa9+nzsSMxmhBPjY7HxN5Y\n\t/vdRnE9WPhmdsJjLbAEtdqLL5ethLaQM9J9Q+VHW2xr44IDNA0Rhyls0w012oG0aeQTpCS\n\tu/43TKJQHe+2/wAFnzwna01odi6MQP0="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ucw.cz header.i=@ucw.cz\n\theader.b=\"L65vHTnq\"; dkim-atps=neutral",
        "Date": "Thu, 14 Dec 2023 22:44:03 +0100",
        "To": "hdegoede@redhat.com, libcamera-devel@lists.libcamera.org",
        "Message-ID": "<ZXt3I+osSMeuhXMr@duo.ucw.cz>",
        "References": "<ZXt1mDW1SpMyLrbT@duo.ucw.cz>",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"YPciYlXmG4sq5PId\"",
        "Content-Disposition": "inline",
        "In-Reply-To": "<ZXt1mDW1SpMyLrbT@duo.ucw.cz>",
        "Subject": "[libcamera-devel] swisp performance notes was Re: [RFC] Add 8-bit\n\tbayer support.",
        "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": "Pavel Machek via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Pavel Machek <pavel@ucw.cz>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Hi!\n\nSo... For some reason latest version uses full sensor resolution. That\ngave me 0.1 fps. If I copy image to cached memory (like below), I get\n~1 fps with -O0, and ~4 fps with optimalizations. (On pinephone).\n\n[9:26:04.598819548] [22455]  INFO Camera camera.cpp:1183 configuring streams: (0) 2584x1940-RGB888\ncam0: Capture until user interrupts by SIGINT\ncopy...5038848\nprocess...\ncopy...5038848\n33967.480079 (0.00 fps) cam0-stream0 seq: 000000 bytesused: 15038880\nprocess...\ncopy...5038848\n33967.652354 (5.80 fps) cam0-stream0 seq: 000001 bytesused: 15038880\nprocess...\ncopy...5038848\n33968.685997 (0.97 fps) cam0-stream0 seq: 000007 bytesused: 15038880\n\nYou may want to check if caching works for you. (Adjust that 7000.. number.)\n\nBest regards,\n\t\t\t\t\t\t\t\tPavel\n\ncommit 190d351eb3158c7d5f1eddd81b0a2aeedffaef9c\nAuthor: Pavel Machek <pavel@ucw.cz>\nDate:   Thu Dec 14 21:58:26 2023 +0100\n\n    Copy image to cached memory. This gives me more than 10x performance\n    improvement.",
    "diff": "diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 52910a03..0b4bf7ff 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -483,10 +483,27 @@ void DebayerCpu::process(FrameBuffer *input, FrameBuffer *output, DebayerParams\n \t\treturn;\n \t}\n \n+       const uint8_t *uncached_src = in.planes()[0].data();\n+       static uint8_t src[7000000];\n+       unsigned long size = in.planes()[0].size();\n+ \tif (size%8)\n+        \t printf(\"very bad size!\\n\");\n+\n+       printf(\"copy...%ld\\n\", size);\n+       (void) uncached_src;\n+\tif (1) {      \n+\t       unsigned int i;\n+\t       for (i=0; i<size/8; i++) {\n+\t               ((uint64_t *) src)[i] = ((uint64_t *) uncached_src)[i];\n+\t       }\n+\t}\n+       printf(\"process...\\n\");\n+       // debayer is \"free\" compared to the memcpy.\n+\n \tif (inputConfig_.patternSize.height == 2)\n-\t\tprocess2(in.planes()[0].data(), out.planes()[0].data());\n+\t\tprocess2(src, out.planes()[0].data());\n \telse\n-\t\tprocess4(in.planes()[0].data(), out.planes()[0].data());\n+\t\tprocess4(src, out.planes()[0].data());\n \n \tmetadata.planes()[0].bytesused = out.planes()[0].size();\n \n",
    "prefixes": [
        "libcamera-devel"
    ]
}