Show a patch.

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

{
    "id": 16708,
    "url": "https://patchwork.libcamera.org/api/patches/16708/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16708/",
    "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": "<20220720154221.50937-4-fsylvestre@baylibre.com>",
    "date": "2022-07-20T15:42:20",
    "name": "[libcamera-devel,v2,3/4] ipa: rkisp1: Add support of Demosaicing control",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "868033b9e1b5b9a551eb83480e4fca152ea4e57d",
    "submitter": {
        "id": 123,
        "url": "https://patchwork.libcamera.org/api/people/123/?format=api",
        "name": "Florian Sylvestre",
        "email": "fsylvestre@baylibre.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16708/mbox/",
    "series": [
        {
            "id": 3310,
            "url": "https://patchwork.libcamera.org/api/series/3310/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3310",
            "date": "2022-07-20T15:42:17",
            "name": "Add Demosaicing and Color Processing control for rkisp1",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3310/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16708/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16708/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 6E163BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Jul 2022 15:42:37 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 295BA6331E;\n\tWed, 20 Jul 2022 17:42:37 +0200 (CEST)",
            "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5B23E6331A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Jul 2022 17:42:34 +0200 (CEST)",
            "by mail-wm1-x335.google.com with SMTP id\n\th14-20020a1ccc0e000000b0039eff745c53so1523355wmb.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Jul 2022 08:42:34 -0700 (PDT)",
            "from BL087.. ([2a01:e34:eea9:e630:516d:f303:6345:b768])\n\tby smtp.gmail.com with ESMTPSA id\n\td2-20020adffbc2000000b0021e489ec78bsm2159294wrs.21.2022.07.20.08.42.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 20 Jul 2022 08:42:33 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658331757;\n\tbh=N6m86BYNr3brvqxQw+DsuRHS9vY8zBPseaNyrwh0rDI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=LeM7gN6OETFkizADm7cg7U+jGU3xwV6VHpsfpktBMFkhUIi5nriJ6Fanvv2IdMRgh\n\tXWG5UA9Eu7XLP/nz+cEdba7jgvnDcPoCVbXBkA0RXUBmYZIlNRloB+/2hMTLDdt7xC\n\tGw8VfijvuHveYJvWqBRw10B0wk316C6nQ0KNOOInoswlVGy1IpBAFfn4Jo4gY9L963\n\tx7QdJXvt1O+On/k1ifu3wFYkTZo1HFtUory8gD5d0YhnlfN4Lx1a3ylBOGvyorMiEC\n\tQQHW9igWorBFEu/pdLVxWR9XYUP+pIGzfiX4joAOLE9FL3jtK9Xt7gSkHmCDi3NwfP\n\tXj2V6wGm4A+SQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Cuvyk6OqGESFgQnoygLrvmtHcgBgxWfAz3NtCXSLi5M=;\n\tb=2v2QEDqovw3EWg5hoZ/UKx55Db4dcvTAE0JCfDeOdA/uLl7XvSrOIjurlT5YS02aih\n\t+5F9JAOvnb0AGLDCGYHiGHSz02zol/c42BnCU0a0ROFOx0smQXKXKXYYcBMcAAhr3Coe\n\t2b2h6b8/j2OApXsAQ0heqOr8jZLC43DF6qCdP1VMpp+F/XPabDA0NJphuLVceX+rfUIy\n\tzAmZDse2nK2qJfH3SAcTKiMo2irYvc8/cSDhayvruKzQVK0HO6h/7hamwe1ynAFQsaWH\n\tabrDW/VbknnBvCCQn0My4tGDj0yPLZurB9yo1k1RbvNDB/sEZC1nbcW0CuTOvQHr1OVo\n\tSvjA=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"2v2QEDqo\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=Cuvyk6OqGESFgQnoygLrvmtHcgBgxWfAz3NtCXSLi5M=;\n\tb=EqaYpOWk1TmkIJY+eUB5VcbMk12G98ZOEj0IU1A3+hBw1Ter0fKM/u7YWPq/sKAAMl\n\taaBcbT5DVQrMRAmTZtYFIVBWa4o4+mBjiDN+PuVtHQ6CoYhz4Jk+QVIVbWYtbKcrZQ0c\n\tOS4p8q74ppv40iZHAonb5O43YaXgbg6FxB77q37afLPEI0LRZRQpxGdiem71wgPYmazn\n\tJy1G11vykSq+jTrRyy2D17aeTvuLUSFkfEzqv46Up+qo03tOOToEj4AiByPLigzvEZKc\n\t/J8yWJf4LRxenar8hdP6Zzp5zAsSLidzIqZGP3MPd/kDoNUXInM7dH2JnXiW6Bv2BnoV\n\tziMw==",
        "X-Gm-Message-State": "AJIora/UoiFI4uj/Y7a1WHQ8TDnRbVRfbfFbLiUpe7YqBleaiIbslud4\n\ta67+TYynSkA4eOSggvoBm3I5twNS1kP1pUp1",
        "X-Google-Smtp-Source": "AGRyM1v78lIsbkP/XfqlfhJGvpAjtDmbx9uiWq6QP+7z+9ADY31nb+utLCyQd0i7RO2Rx3zTBX8A5w==",
        "X-Received": "by 2002:a05:600c:4e88:b0:3a3:1bdc:cb72 with SMTP id\n\tf8-20020a05600c4e8800b003a31bdccb72mr4502989wmq.59.1658331753459; \n\tWed, 20 Jul 2022 08:42:33 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 20 Jul 2022 17:42:20 +0200",
        "Message-Id": "<20220720154221.50937-4-fsylvestre@baylibre.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220720154221.50937-1-fsylvestre@baylibre.com>",
        "References": "<20220720154221.50937-1-fsylvestre@baylibre.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 3/4] ipa: rkisp1: Add support of\n\tDemosaicing control",
        "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": "Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Florian Sylvestre <fsylvestre@baylibre.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "During the demosaicing step, rkisp1 ISP is processing denoising and sharpness\ncontrol.\nAdd demosaicing algorithm with denoise and sharpness values based on user\ncontrols.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\n---\n src/ipa/rkisp1/algorithms/demosaicing.cpp | 197 ++++++++++++++++++++++\n src/ipa/rkisp1/algorithms/demosaicing.h   |  30 ++++\n src/ipa/rkisp1/algorithms/meson.build     |   1 +\n src/ipa/rkisp1/data/ov5640.yaml           |   1 +\n src/ipa/rkisp1/ipa_context.h              |   6 +\n src/ipa/rkisp1/rkisp1.cpp                 |   1 +\n src/libcamera/pipeline/rkisp1/rkisp1.cpp  |   8 +\n 7 files changed, 244 insertions(+)\n create mode 100644 src/ipa/rkisp1/algorithms/demosaicing.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/demosaicing.h",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/demosaicing.cpp b/src/ipa/rkisp1/algorithms/demosaicing.cpp\nnew file mode 100644\nindex 00000000..7d55eaab\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/demosaicing.cpp\n@@ -0,0 +1,197 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021-2022, Ideas On Board\n+ *\n+ * demosaicing.cpp - RkISP1 Demosaicing control\n+ */\n+\n+#include \"demosaicing.h\"\n+\n+#include <libcamera/base/log.h>\n+\n+#include <libcamera/control_ids.h>\n+\n+#include \"libcamera/internal/yaml_parser.h\"\n+\n+/**\n+ * \\file demosaicing.h\n+ */\n+\n+static constexpr uint32_t kFiltLumWeightDefault = 0x00022040;\n+static constexpr uint32_t kFiltModeDefault = 0x000004f2;\n+\n+namespace libcamera {\n+\n+namespace ipa::rkisp1::algorithms {\n+\n+/**\n+ * \\class Demosaicing\n+ * \\brief RkISP1 Demosaicing control\n+ *\n+ * The Demosaicing algorithm is responsible for reconstructing a full color\n+ * image from the sensor raw data. During the demosaicing step, The RKISP1\n+ * will additionally process denoise and sharpness controls.\n+ *\n+ * /todo In current version the denoise and sharpness control is based on user\n+ * controls. In a future version it should be controlled automatically by the\n+ * algorithm.\n+ */\n+\n+LOG_DEFINE_CATEGORY(RkISP1Demosaicing)\n+\n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::queueRequest\n+ */\n+void Demosaicing::queueRequest([[maybe_unused]] IPAContext &context,\n+\t\t\t       [[maybe_unused]] const uint32_t frame,\n+\t\t\t       const ControlList &controls)\n+{\n+\tconst auto &sharpness = controls.get(controls::Sharpness);\n+\tif (sharpness) {\n+\t\tcontext.frameContext.demosaicing.sharpness = std::clamp(int(*sharpness), 0, 10);\n+\t\tcontext.frameContext.demosaicing.updateParams = true;\n+\n+\t\tLOG(RkISP1Demosaicing, Debug) << \"Set sharpness to \" << *sharpness;\n+\t}\n+\n+\tconst auto &denoise = controls.get(controls::draft::NoiseReductionMode);\n+\tif (denoise) {\n+\t\tLOG(RkISP1Demosaicing, Debug) << \"Set denoise to \" << *denoise;\n+\n+\t\tswitch (*denoise) {\n+\t\tcase controls::draft::NoiseReductionModeOff:\n+\t\t\tcontext.frameContext.demosaicing.denoise = 0;\n+\t\t\tcontext.frameContext.demosaicing.updateParams = true;\n+\t\t\tbreak;\n+\t\tcase controls::draft::NoiseReductionModeMinimal:\n+\t\t\tcontext.frameContext.demosaicing.denoise = 1;\n+\t\t\tcontext.frameContext.demosaicing.updateParams = true;\n+\t\t\tbreak;\n+\t\tcase controls::draft::NoiseReductionModeHighQuality:\n+\t\tcase controls::draft::NoiseReductionModeFast:\n+\t\t\tcontext.frameContext.demosaicing.denoise = 3;\n+\t\t\tcontext.frameContext.demosaicing.updateParams = true;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tLOG(RkISP1Demosaicing, Error)\n+\t\t\t\t<< \"Unsupported denoise value \"\n+\t\t\t\t<< *denoise;\n+\t\t}\n+\t}\n+}\n+\n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::prepare\n+ */\n+void Demosaicing::prepare([[maybe_unused]] IPAContext &context,\n+\t\t\t  rkisp1_params_cfg *params)\n+{\n+\t/* Check if the algorithm configuration has been updated. */\n+\tif (!context.frameContext.demosaicing.updateParams)\n+\t\treturn;\n+\n+\tcontext.frameContext.demosaicing.updateParams = false;\n+\n+\tstatic constexpr uint16_t filt_fac_sh0[] = {\n+\t\t0x04, 0x07, 0x0A, 0x0C, 0x10, 0x14, 0x1A, 0x1E, 0x24, 0x2A, 0x30\n+\t};\n+\n+\tstatic constexpr uint16_t filt_fac_sh1[] = {\n+\t\t0x04, 0x08, 0x0C, 0x10, 0x16, 0x1B, 0x20, 0x26, 0x2C, 0x30, 0x3F\n+\t};\n+\n+\tstatic constexpr uint16_t filt_fac_mid[] = {\n+\t\t0x04, 0x06, 0x08, 0x0A, 0x0C, 0x10, 0x13, 0x17, 0x1D, 0x22, 0x28\n+\t};\n+\n+\tstatic constexpr uint16_t filt_fac_bl0[] = {\n+\t\t0x02, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x10, 0x15, 0x1A, 0x24\n+\t};\n+\n+\tstatic constexpr uint16_t filt_fac_bl1[] = {\n+\t\t0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x06, 0x08, 0x0D, 0x14, 0x20\n+\t};\n+\n+\tstatic constexpr uint16_t filt_thresh_sh0[] = {\n+\t\t0, 18, 26, 36, 41, 75, 90, 120, 170, 250, 1023\n+\t};\n+\n+\tstatic constexpr uint16_t filt_thresh_sh1[] = {\n+\t\t0, 33, 44, 51, 67, 100, 120, 150, 200, 300, 1023\n+\t};\n+\n+\tstatic constexpr uint16_t filt_thresh_bl0[] = {\n+\t\t0, 8, 13, 23, 26, 50, 60, 80, 140, 180, 1023\n+\t};\n+\n+\tstatic constexpr uint16_t filt_thresh_bl1[] = {\n+\t\t0, 2, 5, 10, 15, 20, 26, 51, 100, 150, 1023\n+\t};\n+\n+\tstatic constexpr uint16_t stage1_select[] = {\n+\t\t6, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2\n+\t};\n+\n+\tstatic constexpr uint16_t filt_chr_v_mode[] = {\n+\t\t1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3\n+\t};\n+\n+\tstatic constexpr uint16_t filt_chr_h_mode[] = {\n+\t\t0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3\n+\t};\n+\n+\tuint8_t denoise = context.frameContext.demosaicing.denoise;\n+\tuint8_t sharpness = context.frameContext.demosaicing.sharpness;\n+\n+\tparams->others.flt_config.fac_sh0 = filt_fac_sh0[sharpness];\n+\tparams->others.flt_config.fac_sh1 = filt_fac_sh1[sharpness];\n+\tparams->others.flt_config.fac_mid = filt_fac_mid[sharpness];\n+\tparams->others.flt_config.fac_bl0 = filt_fac_bl0[sharpness];\n+\tparams->others.flt_config.fac_bl1 = filt_fac_bl1[sharpness];\n+\n+\tparams->others.flt_config.lum_weight = kFiltLumWeightDefault;\n+\tparams->others.flt_config.mode = kFiltModeDefault;\n+\tparams->others.flt_config.thresh_sh0 = filt_thresh_sh0[denoise];\n+\tparams->others.flt_config.thresh_sh1 = filt_thresh_sh1[denoise];\n+\tparams->others.flt_config.thresh_bl0 = filt_thresh_bl0[denoise];\n+\tparams->others.flt_config.thresh_bl1 = filt_thresh_bl1[denoise];\n+\tparams->others.flt_config.grn_stage1 = stage1_select[denoise];\n+\tparams->others.flt_config.chr_v_mode = filt_chr_v_mode[denoise];\n+\tparams->others.flt_config.chr_h_mode = filt_chr_h_mode[denoise];\n+\n+\tif (denoise == 9) {\n+\t\tif (sharpness > 3)\n+\t\t\tparams->others.flt_config.grn_stage1 = 2;\n+\t\telse\n+\t\t\tparams->others.flt_config.grn_stage1 = 1;\n+\t} else if (denoise == 10) {\n+\t\tif (sharpness > 5)\n+\t\t\tparams->others.flt_config.grn_stage1 = 2;\n+\t\telse if (sharpness > 3)\n+\t\t\tparams->others.flt_config.grn_stage1 = 1;\n+\t\telse\n+\t\t\tparams->others.flt_config.grn_stage1 = 0;\n+\t} else if (denoise > 7) {\n+\t\tif (sharpness > 7) {\n+\t\t\tparams->others.flt_config.fac_bl0 =\n+\t\t\t\tparams->others.flt_config.fac_bl0 / 2;\n+\t\t\tparams->others.flt_config.fac_bl1 =\n+\t\t\t\tparams->others.flt_config.fac_bl1 / 4;\n+\t\t} else if (sharpness > 4) {\n+\t\t\tparams->others.flt_config.fac_bl0 =\n+\t\t\t\tparams->others.flt_config.fac_bl0 * 3 / 4;\n+\t\t\tparams->others.flt_config.fac_bl1 =\n+\t\t\t\tparams->others.flt_config.fac_bl1 / 2;\n+\t\t}\n+\t}\n+\n+\tparams->module_en_update |= RKISP1_CIF_ISP_MODULE_FLT;\n+\tparams->module_ens |= RKISP1_CIF_ISP_MODULE_FLT;\n+\tparams->module_cfg_update |= RKISP1_CIF_ISP_MODULE_FLT;\n+}\n+\n+REGISTER_IPA_ALGORITHM(Demosaicing, \"Demosaicing\")\n+\n+} /* namespace ipa::rkisp1::algorithms */\n+\n+} /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/demosaicing.h b/src/ipa/rkisp1/algorithms/demosaicing.h\nnew file mode 100644\nindex 00000000..0d0f778f\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/demosaicing.h\n@@ -0,0 +1,30 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021-2022, Ideas On Board\n+ *\n+ * demosaicing.h - RkISP1 Demosaicing control\n+ */\n+\n+#pragma once\n+\n+#include <sys/types.h>\n+\n+#include \"algorithm.h\"\n+\n+namespace libcamera {\n+\n+namespace ipa::rkisp1::algorithms {\n+\n+class Demosaicing : public Algorithm\n+{\n+public:\n+\tDemosaicing() = default;\n+\t~Demosaicing() = default;\n+\n+\tvoid queueRequest(IPAContext &context, const uint32_t frame,\n+\t\t\t  const ControlList &controls) override;\n+\tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n+};\n+\n+} /* namespace ipa::rkisp1::algorithms */\n+} /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/meson.build b/src/ipa/rkisp1/algorithms/meson.build\nindex 87007493..7e078b0d 100644\n--- a/src/ipa/rkisp1/algorithms/meson.build\n+++ b/src/ipa/rkisp1/algorithms/meson.build\n@@ -4,6 +4,7 @@ rkisp1_ipa_algorithms = files([\n     'agc.cpp',\n     'awb.cpp',\n     'blc.cpp',\n+    'demosaicing.cpp',\n     'dpcc.cpp',\n     'gsl.cpp',\n     'lsc.cpp',\ndiff --git a/src/ipa/rkisp1/data/ov5640.yaml b/src/ipa/rkisp1/data/ov5640.yaml\nindex 51228218..4ae0ffc0 100644\n--- a/src/ipa/rkisp1/data/ov5640.yaml\n+++ b/src/ipa/rkisp1/data/ov5640.yaml\n@@ -157,4 +157,5 @@ algorithms:\n           rnd-offsets:\n             green: 2\n             red-blue: 2\n+  - Demosaicing:\n ...\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex f387cace..241a4d04 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -56,6 +56,12 @@ struct IPAFrameContext {\n \t\tdouble temperatureK;\n \t} awb;\n \n+\tstruct {\n+\t\tuint8_t denoise;\n+\t\tuint8_t sharpness;\n+\t\tbool updateParams;\n+\t} demosaicing;\n+\n \tstruct {\n \t\tuint32_t exposure;\n \t\tdouble gain;\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 34034526..aeec8f50 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -31,6 +31,7 @@\n #include \"algorithms/algorithm.h\"\n #include \"algorithms/awb.h\"\n #include \"algorithms/blc.h\"\n+#include \"algorithms/demosaicing.h\"\n #include \"algorithms/dpcc.h\"\n #include \"algorithms/gsl.h\"\n #include \"algorithms/lsc.h\"\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 99eecd44..4e000d31 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -968,6 +968,14 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \t\t\t\t\t\t   hasSelfPath_ ? &selfPath_ : nullptr);\n \n \tControlInfoMap::Map ctrls;\n+\tctrls.emplace(std::piecewise_construct,\n+\t\t      std::forward_as_tuple(&controls::Sharpness),\n+\t\t      std::forward_as_tuple(0.0f, 10.0f, 1.0f));\n+\n+\tctrls.emplace(std::piecewise_construct,\n+\t\t      std::forward_as_tuple(&controls::draft::NoiseReductionMode),\n+\t\t      std::forward_as_tuple(controls::draft::NoiseReductionModeValues));\n+\n \tctrls.emplace(std::piecewise_construct,\n \t\t      std::forward_as_tuple(&controls::AeEnable),\n \t\t      std::forward_as_tuple(false, true));\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/4"
    ]
}