Show a patch.

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

{
    "id": 17334,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17334/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17334/",
    "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": "<20220908014200.28728-26-laurent.pinchart@ideasonboard.com>",
    "date": "2022-09-08T01:41:53",
    "name": "[libcamera-devel,v4,25/32] ipa: rkisp1: awb: Use frame context to fix gains calculations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "07faccda8b81ed7e9649b32cd6e985048d388475",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17334/mbox/",
    "series": [
        {
            "id": 3476,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3476/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3476",
            "date": "2022-09-08T01:41:28",
            "name": "ipa: Frame context queue, IPU3 & RkISP consolidation, and RkISP1 improvements",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/3476/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17334/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17334/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 9B3D8C327E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Sep 2022 01:42:54 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 463E9620FD;\n\tThu,  8 Sep 2022 03:42:54 +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 D6827620F1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Sep 2022 03:42:52 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 63BC2888\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Sep 2022 03:42:52 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662601374;\n\tbh=q0RfxFnDYGcvT+madUJOOXtY91wIaKNuVkh+9HZ6tYE=;\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=AvMM1/ulGwJ74qoBk3TDT2PPUn59HvsmiKozy4vivVyepO9GSVQlEsge8yx5ZifEk\n\tAY9mzwjThLIQ5L6FFHpvjsIoYQTAhAQ/UvtWI4eyafoP2VZ8Ao7GiVt8p454umMgji\n\tutxHykvTl/FTvACrgg2EsZhV/bw+aUqQuZPkcHA2zkAlbuk5kb3Ol2YS/lWXkxfvdE\n\tShBbA9Q9kYaue9wYtyZ7uuPqy2ornvlfxuOLZ+sirMEfz7XRINRSY4PGvjJvWMmjt9\n\tX8OATSEmiL8PhF91JO8VrzvmhULidNhuEPxfiV9YszctVwbPg90JGK+W1YvMEl4ttp\n\tCNqHwFJ8ZSeyQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662601372;\n\tbh=q0RfxFnDYGcvT+madUJOOXtY91wIaKNuVkh+9HZ6tYE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ItjpbF9xKKLgJYFlwSyJOAW4OaP2Guv1vVuUemGIGcdT8jmpVuCqB3tCEU5zGcmqG\n\tjDvVX43BflpDmwfCZKPHulVfvp4CQHYFepFp5ok3nb6+Eq57xrl+1xkbacWifpWqau\n\t4XntrpMelRMTVCkBHzOh7UR11LinmhzQtgQ2wE98="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ItjpbF9x\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  8 Sep 2022 04:41:53 +0300",
        "Message-Id": "<20220908014200.28728-26-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 25/32] ipa: rkisp1: awb: Use frame\n\tcontext to fix gains calculations",
        "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The AWB statistics are computed after the ISP applies the colour gains.\nThis means that the red, green and blue means do not match the data\ncoming directly from the sensor, but are multiplied by the colour gains\nthat were used for the frame on which the statistics have been computed.\nThe AWB algorithm needs to take this into account when calculating the\ncolour gains for the next frame. Do so by dividing the means by the\ngains that were applied to the frame, retrieved from the frame context.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/awb.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex bb0f6c27fc7d..b711e93b73ba 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -207,6 +207,15 @@ void Awb::process(IPAContext &context,\n \tdouble greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n \tdouble blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n \n+\t/*\n+\t * The ISP computes the AWB means after applying the colour gains,\n+\t * divide by the gains that were used to get the raw means from the\n+\t * sensor.\n+\t */\n+\tredMean /= frameContext.awb.gains.red;\n+\tgreenMean /= frameContext.awb.gains.green;\n+\tblueMean /= frameContext.awb.gains.blue;\n+\n \tframeContext.awb.temperatureK = estimateCCT(redMean, greenMean, blueMean);\n \n \t/* Estimate the red and blue gains to apply in a grey world. */\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "25/32"
    ]
}