Show a patch.

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

{
    "id": 17470,
    "url": "https://patchwork.libcamera.org/api/patches/17470/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17470/",
    "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": "<20220929195318.13577-3-laurent.pinchart@ideasonboard.com>",
    "date": "2022-09-29T19:53:18",
    "name": "[libcamera-devel,2/2] utils: rkisp1: gen-csc-table: Perform simple rounding for inverted CSC",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "39e5fb95ca8131fff386293d98f98ac0ea641064",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17470/mbox/",
    "series": [
        {
            "id": 3515,
            "url": "https://patchwork.libcamera.org/api/series/3515/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3515",
            "date": "2022-09-29T19:53:16",
            "name": "utils: rkisp1: gen-csc-table: Miscellaneous fixes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3515/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17470/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17470/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 9DFA8BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Sep 2022 19:53:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6576262392;\n\tThu, 29 Sep 2022 21:53:27 +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 BDB8262384\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Sep 2022 21:53:23 +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 4FB1847C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Sep 2022 21:53:23 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664481207;\n\tbh=WnZ5HZVnMFyjAWNLklRCkQW6mdS/F6+N78aMDdoMO84=;\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=WDQzcwbA0NHgwmOPjNbDWDDBnK5b0cAyvyJNjTPCBiZ+yT/d3FMx5pOlrduF7n8tT\n\tQevWIlYZQ/+PgUf528/ZrzTd3I4WSLTyYuH+5qVQ9uoTea0RV67m3LL+2oD64PYVfc\n\tjLhV6npOMb9tWopDX/pgiJkOZLos6PtS1lgBdcY7MZiENQHTZdsn0o9cwW4Ooivts1\n\teRtXeyoFKqCiafiSuEVOa6jKcycTHm8hvI7qnU1HH0MfSVChfMOSBMUi2v0rmEt5j8\n\tBSBAXb+2agONbWKPdZTaim/cwHiTHjIiXzgHnUfUmHqVI2Nm6UXReVjIJn5Y870XVQ\n\tDH2JLAb0hXhVQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664481203;\n\tbh=WnZ5HZVnMFyjAWNLklRCkQW6mdS/F6+N78aMDdoMO84=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=fGtzfIAFh+bqRQ6pnT71SCjMjc1wLKm6krUby92sDHyTG5aOwCJXIA4DSBTtHZmfh\n\tX4hB0+OPO8JMzJlP5nW0MkMX+4fLQ9eE1JMUkX6WsN+i0a0oHqcF05YMzSI26T7xkP\n\tRw40W1VQ18dqZcjzPT8IxFqxURiY59gPzHZ/lGow="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"fGtzfIAF\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 29 Sep 2022 22:53:18 +0300",
        "Message-Id": "<20220929195318.13577-3-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220929195318.13577-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220929195318.13577-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/2] utils: rkisp1: gen-csc-table: Perform\n\tsimple rounding for inverted CSC",
        "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 CSC coefficients rounding keeps the sum of all coefficients in the\nline identical. This was implemented for the RGB to YUV matrix\ncalculation, where the sum of luma coefficients is 1.0 and the sum of\nchroma coefficients 0.0 (in full range), in order to avoid introducing\nbiases and overflow. This however doesn't make much sense for the YUV to\nRGB components. Use simple rounding in that case.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/rkisp1/gen-csc-table.py | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/utils/rkisp1/gen-csc-table.py b/utils/rkisp1/gen-csc-table.py\nindex 934ace377e17..aca21ded2c8e 100755\n--- a/utils/rkisp1/gen-csc-table.py\n+++ b/utils/rkisp1/gen-csc-table.py\n@@ -180,7 +180,10 @@ def main(argv):\n     rounded_coeffs = []\n     for line in scaled_coeffs:\n         line = [coeff * (1 << precision.fractional) for coeff in line]\n-        line = round_array(line)\n+        if args.invert:\n+            line = [round(coeff) for coeff in line]\n+        else:\n+            line = round_array(line)\n \n         # Convert coefficients to the number of bits selected by the precision.\n         # Negative values will be turned into positive integers using 2's\n",
    "prefixes": [
        "libcamera-devel",
        "2/2"
    ]
}