Show a patch.

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

{
    "id": 12668,
    "url": "https://patchwork.libcamera.org/api/patches/12668/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12668/",
    "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": "<20210621145947.53909-1-heiko@sntech.de>",
    "date": "2021-06-21T14:59:47",
    "name": "[libcamera-devel] ipa: rkisp1: Add support for V12 isp blocks",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "32485c4dc84d9b1612da37637b5782be4679956b",
    "submitter": {
        "id": 83,
        "url": "https://patchwork.libcamera.org/api/people/83/?format=api",
        "name": "Heiko Stübner",
        "email": "heiko@sntech.de"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12668/mbox/",
    "series": [
        {
            "id": 2161,
            "url": "https://patchwork.libcamera.org/api/series/2161/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2161",
            "date": "2021-06-21T14:59:47",
            "name": "[libcamera-devel] ipa: rkisp1: Add support for V12 isp blocks",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2161/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12668/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12668/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 33A2EBE58C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Jun 2021 14:59:54 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9194568935;\n\tMon, 21 Jun 2021 16:59:53 +0200 (CEST)",
            "from gloria.sntech.de (gloria.sntech.de [185.11.138.130])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A44A860295\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jun 2021 16:59:52 +0200 (CEST)",
            "from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74]\n\thelo=phil.lan) by gloria.sntech.de with esmtpsa\n\t(TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n\t(Exim 4.92) (envelope-from <heiko@sntech.de>)\n\tid 1lvLOw-0001PG-N3; Mon, 21 Jun 2021 16:59:50 +0200"
        ],
        "From": "Heiko Stuebner <heiko@sntech.de>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 21 Jun 2021 16:59:47 +0200",
        "Message-Id": "<20210621145947.53909-1-heiko@sntech.de>",
        "X-Mailer": "git-send-email 2.29.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] ipa: rkisp1: Add support for V12 isp\n\tblocks",
        "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>",
        "Cc": "Heiko Stuebner <heiko.stuebner@theobroma-systems.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n\nSome values for array sizes differ between v10 and v12, so set them\nin init() and adjust the auto exposure algorithm to the ae value\nfrom there.\n\nSigned-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 23 +++++++++++++++++++++--\n 1 file changed, 21 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex b47ea324..5f529334 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -66,12 +66,31 @@ private:\n \tuint32_t gain_;\n \tuint32_t minGain_;\n \tuint32_t maxGain_;\n+\n+\t/* revision-specific data */\n+\tint hwAeMeanMax_;\n+\tint hwHistBinNMax_;\n+\tint hwGammaOutMaxSamples_;\n+\tint hwHistogramWeightGridsSize_;\n };\n \n int IPARkISP1::init(unsigned int hwRevision)\n {\n \t/* \\todo Add support for other revisions */\n-\tif (hwRevision != RKISP1_V10) {\n+\tswitch (hwRevision) {\n+\tcase RKISP1_V10:\n+\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10;\n+\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10;\n+\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10;\n+\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10;\n+\t\tbreak;\n+\tcase RKISP1_V12:\n+\t\thwAeMeanMax_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12;\n+\t\thwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12;\n+\t\thwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12;\n+\t\thwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12;\n+\t\tbreak;\n+\tdefault:\n \t\tLOG(IPARkISP1, Error)\n \t\t\t<< \"Hardware revision \" << hwRevision\n \t\t\t<< \" is currently not supported\";\n@@ -236,7 +255,7 @@ void IPARkISP1::updateStatistics(unsigned int frame,\n \n \t\tunsigned int value = 0;\n \t\tunsigned int num = 0;\n-\t\tfor (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++) {\n+\t\tfor (int i = 0; i < hwAeMeanMax_; i++) {\n \t\t\tif (ae->exp_mean[i] <= 15)\n \t\t\t\tcontinue;\n \n",
    "prefixes": [
        "libcamera-devel"
    ]
}