Show a patch.

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

{
    "id": 26797,
    "url": "https://patchwork.libcamera.org/api/patches/26797/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26797/",
    "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": "<20260522-swisp_12p-v1-1-e115c35387b7@ideasonboard.com>",
    "date": "2026-05-22T14:37:56",
    "name": "libcamera: software_isp: Support 12-bit CSI2 packed raw bayer formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0b377b7a15f6a4c2d4190de5641882dda03332c5",
    "submitter": {
        "id": 223,
        "url": "https://patchwork.libcamera.org/api/people/223/?format=api",
        "name": "Jai Luthra",
        "email": "jai.luthra@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26797/mbox/",
    "series": [
        {
            "id": 5961,
            "url": "https://patchwork.libcamera.org/api/series/5961/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5961",
            "date": "2026-05-22T14:37:56",
            "name": "libcamera: software_isp: Support 12-bit CSI2 packed raw bayer formats",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5961/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26797/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26797/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 14103BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 May 2026 14:39:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 757A562FEC;\n\tFri, 22 May 2026 16:39:34 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB0EE62DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 May 2026 16:39:32 +0200 (CEST)",
            "from mail.ideasonboard.com (unknown\n\t[IPv6:2a01:cb1d:8f2:800:ad48:920a:da6f:a034])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 29C60244;\n\tFri, 22 May 2026 16:39:17 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bQpBWEbY\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1779460757;\n\tbh=AaufH8LsxLwYYBszCyHm+I+WeV93Vdbv6vVxDEqJoZQ=;\n\th=From:Date:Subject:To:Cc:From;\n\tb=bQpBWEbYZZGqHWN4RxVWhb/q01dSKchIv8JWrHimtiLq+2TQOwXWLQ9J06yAnWlKX\n\t8RCpmI1QVlYFgf7hgocdGirQhGhgQ3gXQ9Wx7w3X0STMmNYvziumi3Z3H9I9hFX1bT\n\t9Q2YImb2byh7WrrFIRi8PpDEpCdfHaSfkMjkUix8=",
        "From": "Jai Luthra <jai.luthra@ideasonboard.com>",
        "Date": "Fri, 22 May 2026 16:37:56 +0200",
        "Subject": "[PATCH] libcamera: software_isp: Support 12-bit CSI2 packed raw\n\tbayer formats",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260522-swisp_12p-v1-1-e115c35387b7@ideasonboard.com>",
        "X-B4-Tracking": "v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n\tvPSU3UzU4B8JSMDIzMDUyMj3eLyzOKCeEOjAl2zxBQjo1STFAOLJAMloPqCotS0zAqwWdGxtbU\n\tAPurGZFsAAAA=",
        "X-Change-ID": "20260522-swisp_12p-6ad22e4d08b0",
        "To": "Hans de Goede <johannes.goede@oss.qualcomm.com>, \n\tMilan Zamazal <mzamazal@redhat.com>",
        "Cc": "libcamera-devel@lists.libcamera.org, \n\tJai Luthra <jai.luthra@ideasonboard.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=10647;\n\ti=jai.luthra@ideasonboard.com; h=from:subject:message-id;\n\tbh=AaufH8LsxLwYYBszCyHm+I+WeV93Vdbv6vVxDEqJoZQ=;\n\tb=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBqEGqbib0p/2tH0QfL1jr2vf2mzPPfKQ0UqNYFK\n\t+6he6c6CJ6JAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCahBqmwAKCRBD3pH5JJpx\n\tRapAEAChkVQwCf+U+cbDQ6Q/yRW14hzvQaULAAYAE021y7EgLrCp2uaPY3MiEdInMXYVQ7Dtj5i\n\tEiZKPb0Ssiwea8+VZJ4yWsNot1Zt0ytUyx3G/2uIoBOCc2eY4ArBRpPEr9z/VaGRlYe24xNf4dz\n\teM9BDBSRkCvMfeKtPDAlap20NzyhuvW8LpgCsxWWW3hlRn6nP2u/ZgM5jDK4YPLMgOl8MoKCG6f\n\tk/mQ3RhrKD5xdBrKw47C9V1AcPeyKnem8/0FLionncOq/BOlfjpH6rOTp1qCA3UIitsngfiOQ8n\n\tbn3d634q5GJ+8BJRi+EwIOItv1+UPnCcGMu/OF48CoUE2ayNlz8jNPyJrqltKbM1h1JXtqp01Jy\n\tRsug+U9zKvPFdLMqogAArKsjr3+PeIYNq2Lx9gtLikKCOg9MbZF7/6PC7DIe2s0wLDFxlWwKpx6\n\tuy9OaGBX3NA5l8wLbl62kfZoQO7FPR5crcbH/l1Kgmelxv8aQoOoY6yJeb7j6wQOJMDY3DF2Ga0\n\tnqtcHEQFH9KNm79XfHXjRrmZt+xWdvsm0BenKLJ1i03p9LHMpibr5cDSfCMdYN4M4duVahkn8o1\n\t0NJvOf9CDCZ/j5npHS/1b3OqrD1atFqOdfu0My6+yEJJNmTkyNVA1GFadJOiNNsa2KfjZp6388C\n\t9FJSO4+PLRXywkw==",
        "X-Developer-Key": "i=jai.luthra@ideasonboard.com; a=openpgp;\n\tfpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145",
        "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": "Add support for debayering 12-bit CSI2 packed raw bayer formats.\n\nAlso add support for the same in SwStats, skipping one 2x2 block\nhorizontally and skipping every 3rd and 4th line vertically, like done\nfor other raw bayer formats.\n\nGPUISP support was always present in the packed shaders (which already\nhandle skipping the pixel with LSBs), so enable it too.\n\nSigned-off-by: Jai Luthra <jai.luthra@ideasonboard.com>\n---\nThis is tested for RGGB12P using IMX678 on Arduino Uno Q. The sensor\ndoesn't change bayer layout on flips, so I couldn't verify other\nlayouts.\n---\n .../libcamera/internal/software_isp/swstats_cpu.h  |   3 +\n src/libcamera/software_isp/debayer_cpu.cpp         | 107 +++++++++++++++++++++\n src/libcamera/software_isp/debayer_cpu.h           |   9 ++\n src/libcamera/software_isp/debayer_egl.cpp         |  13 +++\n src/libcamera/software_isp/swstats_cpu.cpp         |  78 +++++++++++++++\n 5 files changed, 210 insertions(+)\n\n\n---\nbase-commit: 1f97c59d276922d387f7bfcfaa6d54b4084e43c1\nchange-id: 20260522-swisp_12p-6ad22e4d08b0\n\nBest regards,",
    "diff": "diff --git a/include/libcamera/internal/software_isp/swstats_cpu.h b/include/libcamera/internal/software_isp/swstats_cpu.h\nindex b5348c6f..13fa7582 100644\n--- a/include/libcamera/internal/software_isp/swstats_cpu.h\n+++ b/include/libcamera/internal/software_isp/swstats_cpu.h\n@@ -98,6 +98,9 @@ private:\n \t/* Bayer 10 bpp packed */\n \tvoid statsBGGR10PLine0(const uint8_t *src[], SwIspStats &stats);\n \tvoid statsGBRG10PLine0(const uint8_t *src[], SwIspStats &stats);\n+\t/* Bayer 12 bpp packed */\n+\tvoid statsBGGR12PLine0(const uint8_t *src[], SwIspStats &stats);\n+\tvoid statsGBRG12PLine0(const uint8_t *src[], SwIspStats &stats);\n \n \tvoid processBayerFrame2(MappedFrameBuffer &in);\n \ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 1f9b24da..2751dd30 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -351,6 +351,78 @@ void DebayerCpu::debayer10P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[])\n \t}\n }\n \n+template<bool addAlphaByte, bool ccmEnabled>\n+void DebayerCpu::debayer12P_BGBG_BGR888(uint8_t *dst, const uint8_t *src[])\n+{\n+\tconst int widthInBytes = window_.width * 3 / 2;\n+\tconst uint8_t *prev = src[0];\n+\tconst uint8_t *curr = src[1];\n+\tconst uint8_t *next = src[2];\n+\n+\tfor (int x = 0; x < widthInBytes;) {\n+\t\t/* Even pixel */\n+\t\tBGGR_BGR888(2, 1, 1)\n+\t\t/* Odd pixel RGGB -> GRBG */\n+\t\tGBRG_BGR888(1, 2, 1)\n+\t\t/* Skip 3rd src byte with 2 x 4 least-significant-bits */\n+\t\tx++;\n+\t}\n+}\n+\n+template<bool addAlphaByte, bool ccmEnabled>\n+void DebayerCpu::debayer12P_GRGR_BGR888(uint8_t *dst, const uint8_t *src[])\n+{\n+\tconst int widthInBytes = window_.width * 3 / 2;\n+\tconst uint8_t *prev = src[0];\n+\tconst uint8_t *curr = src[1];\n+\tconst uint8_t *next = src[2];\n+\n+\tfor (int x = 0; x < widthInBytes;) {\n+\t\t/* Even pixel */\n+\t\tGRBG_BGR888(2, 1, 1)\n+\t\t/* Odd pixel RGGB -> GRBG */\n+\t\tRGGB_BGR888(1, 2, 1)\n+\t\t/* Skip 3rd src byte with 2 x 4 least-significant-bits */\n+\t\tx++;\n+\t}\n+}\n+\n+template<bool addAlphaByte, bool ccmEnabled>\n+void DebayerCpu::debayer12P_GBGB_BGR888(uint8_t *dst, const uint8_t *src[])\n+{\n+\tconst int widthInBytes = window_.width * 3 / 2;\n+\tconst uint8_t *prev = src[0];\n+\tconst uint8_t *curr = src[1];\n+\tconst uint8_t *next = src[2];\n+\n+\tfor (int x = 0; x < widthInBytes;) {\n+\t\t/* Even pixel */\n+\t\tGBRG_BGR888(2, 1, 1)\n+\t\t/* Odd pixel RGGB -> GRBG */\n+\t\tBGGR_BGR888(1, 2, 1)\n+\t\t/* Skip 3rd src byte with 2 x 4 least-significant-bits */\n+\t\tx++;\n+\t}\n+}\n+\n+template<bool addAlphaByte, bool ccmEnabled>\n+void DebayerCpu::debayer12P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[])\n+{\n+\tconst int widthInBytes = window_.width * 3 / 2;\n+\tconst uint8_t *prev = src[0];\n+\tconst uint8_t *curr = src[1];\n+\tconst uint8_t *next = src[2];\n+\n+\tfor (int x = 0; x < widthInBytes;) {\n+\t\t/* Even pixel */\n+\t\tRGGB_BGR888(2, 1, 1)\n+\t\t/* Odd pixel RGGB -> GRBG */\n+\t\tGRBG_BGR888(1, 2, 1)\n+\t\t/* Skip 3rd src byte with 2 x 4 least-significant-bits */\n+\t\tx++;\n+\t}\n+}\n+\n /*\n  * Setup the Debayer object according to the passed in parameters.\n  * Return 0 on success, a negative errno value on failure\n@@ -391,6 +463,21 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n \t\treturn 0;\n \t}\n \n+\tif (bayerFormat.bitDepth == 12 &&\n+\t    bayerFormat.packing == BayerFormat::Packing::CSI2 &&\n+\t    isStandardBayerOrder(bayerFormat.order)) {\n+\t\tconfig.bpp = 12;\n+\t\tconfig.patternSize.width = 2; /* 3 bytes per *2* pixels */\n+\t\tconfig.patternSize.height = 2;\n+\t\tconfig.outputFormats = std::vector<PixelFormat>({ formats::RGB888,\n+\t\t\t\t\t\t\t\t  formats::XRGB8888,\n+\t\t\t\t\t\t\t\t  formats::ARGB8888,\n+\t\t\t\t\t\t\t\t  formats::BGR888,\n+\t\t\t\t\t\t\t\t  formats::XBGR8888,\n+\t\t\t\t\t\t\t\t  formats::ABGR8888 });\n+\t\treturn 0;\n+\t}\n+\n \tLOG(Debayer, Info)\n \t\t<< \"Unsupported input format \" << inputFormat.toString();\n \treturn -EINVAL;\n@@ -538,6 +625,26 @@ int DebayerCpu::setDebayerFunctions(PixelFormat inputFormat,\n \t\t}\n \t}\n \n+\tif (bayerFormat.bitDepth == 12 &&\n+\t    bayerFormat.packing == BayerFormat::Packing::CSI2) {\n+\t\tswitch (bayerFormat.order) {\n+\t\tcase BayerFormat::BGGR:\n+\t\t\tSET_DEBAYER_METHODS(debayer12P_BGBG_BGR888, debayer12P_GRGR_BGR888)\n+\t\t\treturn 0;\n+\t\tcase BayerFormat::GBRG:\n+\t\t\tSET_DEBAYER_METHODS(debayer12P_GBGB_BGR888, debayer12P_RGRG_BGR888)\n+\t\t\treturn 0;\n+\t\tcase BayerFormat::GRBG:\n+\t\t\tSET_DEBAYER_METHODS(debayer12P_GRGR_BGR888, debayer12P_BGBG_BGR888)\n+\t\t\treturn 0;\n+\t\tcase BayerFormat::RGGB:\n+\t\t\tSET_DEBAYER_METHODS(debayer12P_RGRG_BGR888, debayer12P_GBGB_BGR888)\n+\t\t\treturn 0;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n \treturn invalidFmt();\n }\n \ndiff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\nindex 68da9508..5281c65c 100644\n--- a/src/libcamera/software_isp/debayer_cpu.h\n+++ b/src/libcamera/software_isp/debayer_cpu.h\n@@ -110,6 +110,15 @@ private:\n \tvoid debayer10P_GBGB_BGR888(uint8_t *dst, const uint8_t *src[]);\n \ttemplate<bool addAlphaByte, bool ccmEnabled>\n \tvoid debayer10P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n+\t/* CSI-2 packed 12-bit raw bayer format (all the 4 orders) */\n+\ttemplate<bool addAlphaByte, bool ccmEnabled>\n+\tvoid debayer12P_BGBG_BGR888(uint8_t *dst, const uint8_t *src[]);\n+\ttemplate<bool addAlphaByte, bool ccmEnabled>\n+\tvoid debayer12P_GRGR_BGR888(uint8_t *dst, const uint8_t *src[]);\n+\ttemplate<bool addAlphaByte, bool ccmEnabled>\n+\tvoid debayer12P_GBGB_BGR888(uint8_t *dst, const uint8_t *src[]);\n+\ttemplate<bool addAlphaByte, bool ccmEnabled>\n+\tvoid debayer12P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n \n \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n \tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\ndiff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\nindex eae4c57f..53adbdce 100644\n--- a/src/libcamera/software_isp/debayer_egl.cpp\n+++ b/src/libcamera/software_isp/debayer_egl.cpp\n@@ -78,6 +78,19 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n \t\treturn 0;\n \t}\n \n+\tif (bayerFormat.bitDepth == 12 &&\n+\t    bayerFormat.packing == BayerFormat::Packing::CSI2 &&\n+\t    isStandardBayerOrder(bayerFormat.order)) {\n+\t\tconfig.bpp = 12;\n+\t\tconfig.patternSize.width = 2; /* 3 bytes per *2* pixels */\n+\t\tconfig.patternSize.height = 2;\n+\t\tconfig.outputFormats = std::vector<PixelFormat>({ formats::XRGB8888,\n+\t\t\t\t\t\t\t\t  formats::ARGB8888,\n+\t\t\t\t\t\t\t\t  formats::XBGR8888,\n+\t\t\t\t\t\t\t\t  formats::ABGR8888 });\n+\t\treturn 0;\n+\t}\n+\n \tLOG(Debayer, Error)\n \t\t<< \"Unsupported input format \" << inputFormat;\n \ndiff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp\nindex 0815ec9a..1deee942 100644\n--- a/src/libcamera/software_isp/swstats_cpu.cpp\n+++ b/src/libcamera/software_isp/swstats_cpu.cpp\n@@ -323,6 +323,58 @@ void SwStatsCpu::statsGBRG10PLine0(const uint8_t *src[], SwIspStats &stats)\n \tSWSTATS_FINISH_LINE_STATS()\n }\n \n+void SwStatsCpu::statsBGGR12PLine0(const uint8_t *src[], SwIspStats &stats)\n+{\n+\tconst uint8_t *src0 = src[1] + window_.x * 3 / 2;\n+\tconst uint8_t *src1 = src[2] + window_.x * 3 / 2;\n+\tconst unsigned int widthInBytes = window_.width * 3 / 2;\n+\n+\tSWSTATS_START_LINE_STATS(uint8_t)\n+\n+\tif (swapLines_)\n+\t\tstd::swap(src0, src1);\n+\n+\t/* x += 6 sample every other 2x2 block */\n+\tfor (unsigned int x = 0; x < widthInBytes; x += 6) {\n+\t\tb = src0[x];\n+\t\tg = src0[x + 1];\n+\t\tg2 = src1[x];\n+\t\tr = src1[x + 1];\n+\n+\t\tg = (g + g2) / 2;\n+\n+\t\tSWSTATS_ACCUMULATE_LINE_STATS(1)\n+\t}\n+\n+\tSWSTATS_FINISH_LINE_STATS()\n+}\n+\n+void SwStatsCpu::statsGBRG12PLine0(const uint8_t *src[], SwIspStats &stats)\n+{\n+\tconst uint8_t *src0 = src[1] + window_.x * 3 / 2;\n+\tconst uint8_t *src1 = src[2] + window_.x * 3 / 2;\n+\tconst unsigned int widthInBytes = window_.width * 3 / 2;\n+\n+\tSWSTATS_START_LINE_STATS(uint8_t)\n+\n+\tif (swapLines_)\n+\t\tstd::swap(src0, src1);\n+\n+\t/* x += 6 sample every other 2x2 block */\n+\tfor (unsigned int x = 0; x < widthInBytes; x += 6) {\n+\t\tg = src0[x];\n+\t\tb = src0[x + 1];\n+\t\tr = src1[x];\n+\t\tg2 = src1[x + 1];\n+\n+\t\tg = (g + g2) / 2;\n+\n+\t\tSWSTATS_ACCUMULATE_LINE_STATS(1)\n+\t}\n+\n+\tSWSTATS_FINISH_LINE_STATS()\n+}\n+\n /**\n  * \\brief Reset state to start statistics gathering for a new frame\n  * \\param[in] frame The frame number\n@@ -466,6 +518,32 @@ int SwStatsCpu::configure(const StreamConfiguration &inputCfg, unsigned int stat\n \t\t}\n \t}\n \n+\tif (bayerFormat.bitDepth == 12 &&\n+\t    bayerFormat.packing == BayerFormat::Packing::CSI2) {\n+\t\tpatternSize_.height = 2;\n+\t\tpatternSize_.width = 2; /* 3 bytes for *2* pixels */\n+\t\t/* Skip every 3th and 4th line, sample every other 2x2 block */\n+\t\tySkipMask_ = 0x02;\n+\t\txShift_ = 0;\n+\t\tsumShift_ = 0;\n+\t\tprocessFrame_ = &SwStatsCpu::processBayerFrame2;\n+\n+\t\tswitch (bayerFormat.order) {\n+\t\tcase BayerFormat::BGGR:\n+\t\tcase BayerFormat::GRBG:\n+\t\t\tstats0_ = &SwStatsCpu::statsBGGR12PLine0;\n+\t\t\tswapLines_ = bayerFormat.order == BayerFormat::GRBG;\n+\t\t\treturn 0;\n+\t\tcase BayerFormat::GBRG:\n+\t\tcase BayerFormat::RGGB:\n+\t\t\tstats0_ = &SwStatsCpu::statsGBRG12PLine0;\n+\t\t\tswapLines_ = bayerFormat.order == BayerFormat::RGGB;\n+\t\t\treturn 0;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n \tLOG(SwStatsCpu, Info)\n \t\t<< \"Unsupported input format \" << inputCfg.pixelFormat.toString();\n \treturn -EINVAL;\n",
    "prefixes": []
}