Show a patch.

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

{
    "id": 18335,
    "url": "https://patchwork.libcamera.org/api/patches/18335/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18335/",
    "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": "<20230302153852.63619-1-jacopo.mondi@ideasonboard.com>",
    "date": "2023-03-02T15:38:52",
    "name": "[libcamera-devel] ipa: rkisp1: lsc: Fix integer division error",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9fe8d08260ecf2a5bedafad9c4c85d5d17e1974d",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18335/mbox/",
    "series": [
        {
            "id": 3785,
            "url": "https://patchwork.libcamera.org/api/series/3785/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3785",
            "date": "2023-03-02T15:38:52",
            "name": "[libcamera-devel] ipa: rkisp1: lsc: Fix integer division error",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3785/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18335/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18335/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 4A0EDBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Mar 2023 15:39:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 89A7F6269C;\n\tThu,  2 Mar 2023 16:39:02 +0100 (CET)",
            "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 F0C7C6267E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  2 Mar 2023 16:39:00 +0100 (CET)",
            "from uno.homenet.telecomitalia.it\n\t(host-87-18-61-24.retail.telecomitalia.it [87.18.61.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4512156A;\n\tThu,  2 Mar 2023 16:39:00 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677771542;\n\tbh=9WDWFwLyGwdprabpgY4e6oLCte4YPBkypoeJLxilEW0=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=ov5w8rSXUavIpxhYN37uXxdzTrNe+ljEMiT0sGIInUe6ZqLezzSCwWeUjHA0kRFfc\n\tLnBm1X3LyCFXM2GiVUVFKhglTFyE7TkD2Zj42+jPbVO7K1XE3pPFrPPB52fk56GBO5\n\t5Mkvh6LMh8m519oORpQ8jiEvEcIXN+mUFHfYSbn7AELBcyftbY55DW8Oo9nattREyF\n\tdOPMrlJbQozK3E4TmAtJ8RiHm/gtkBRAtjhK5YyZrT+BXdDDKrr0b34U64X9Yw/1G4\n\tx8Ew6TWx3vwz4oXKz5CPKsQ+ASmOJ0GvI6HTbd7anl40UCrcJb2L2+PvreDOazFIkN\n\twOAItyNZZrIuQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677771540;\n\tbh=9WDWFwLyGwdprabpgY4e6oLCte4YPBkypoeJLxilEW0=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=iVqMAaqYB23hzih5okYku2/m3N349feHzb37/DCF5eitX0iI6vWPffbeEJ2UNHJck\n\tS0R2ISf3fqz4FodApG6Laz3rRvV0Q+lzLb9sdsRC0koeg6RT446+RXydNU0jmA112I\n\t7BJ7fSWbY/4FtnCC4FTsTUsPZbm/4AaIMMKjN2Hs="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iVqMAaqY\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  2 Mar 2023 16:38:52 +0100",
        "Message-Id": "<20230302153852.63619-1-jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.39.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] ipa: rkisp1: lsc: Fix integer division\n\terror",
        "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": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The RkISP1 implementation of the LensShadinCorrection algorithm has been\nmade adaptive to the scene color temperature in commit 14c869c00fdd (\"ipa:\nrkisp1: Take into account color temperature during LSC algorithm\").\n\nThe LSC algorithm interpolates the correction factors using the\ntable's reference color temperatures. When calculating the interpolation\ncoefficients, an unintended integer division makes both coefficient\nzeros resulting in a completely black image.\n\nFix this by type casting to double one of the division operands.\n\nFixes: 14c869c00fdd (\"ipa: rkisp1: Take into account color temperature during LSC algorithm\")\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/lsc.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\n--\n2.39.0",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex 3a443e776a53..a7ccedb1ed3b 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.cpp\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -216,8 +216,8 @@ void LensShadingCorrection::interpolateTable(rkisp1_cif_isp_lsc_config &config,\n \t\t\t\t\t     const Components &set1,\n \t\t\t\t\t     const uint32_t ct)\n {\n-\tdouble coeff0 = (set1.ct - ct) / (set1.ct - set0.ct);\n-\tdouble coeff1 = (ct - set0.ct) / (set1.ct - set0.ct);\n+\tdouble coeff0 = (set1.ct - ct) / static_cast<double>(set1.ct - set0.ct);\n+\tdouble coeff1 = (ct - set0.ct) / static_cast<double>(set1.ct - set0.ct);\n\n \tfor (unsigned int i = 0; i < RKISP1_CIF_ISP_LSC_SAMPLES_MAX; ++i) {\n \t\tfor (unsigned int j = 0; j < RKISP1_CIF_ISP_LSC_SAMPLES_MAX; ++j) {\n",
    "prefixes": [
        "libcamera-devel"
    ]
}