Show a patch.

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

{
    "id": 21338,
    "url": "https://patchwork.libcamera.org/api/patches/21338/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21338/",
    "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": "<20240924071341.24424-1-umang.jain@ideasonboard.com>",
    "date": "2024-09-24T07:13:41",
    "name": "libcamera: rkisp1: Eliminate hard-coded resizer limits",
    "commit_ref": "e85c7ddd38ce8456ab01c2a73baf9e788f6a462e",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "94ddbbc2aa71a6dee2afcc3c37f20bdf6197aed8",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21338/mbox/",
    "series": [
        {
            "id": 4616,
            "url": "https://patchwork.libcamera.org/api/series/4616/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4616",
            "date": "2024-09-24T07:13:41",
            "name": "libcamera: rkisp1: Eliminate hard-coded resizer limits",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4616/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21338/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21338/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 A598AC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Sep 2024 07:13:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE5C06350C;\n\tTue, 24 Sep 2024 09:13:50 +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 5631B634F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Sep 2024 09:13:48 +0200 (CEST)",
            "from umang.jain (unknown\n\t[IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3D7503DC;\n\tTue, 24 Sep 2024 09:12:21 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"wm7POvy9\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727161941;\n\tbh=8PsoLi8MI/fYoNMhJ85zIAhdrWLLJ5k2J1egWwHlz1o=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=wm7POvy9X0XZeZvLWO0dQvnON7MiGRGcOyqDMiYWf1YSsbL3/WVtJFeNKJ+d4KQD8\n\ttEdVHSLgUsxxRw6v0D6Dz2QrjHCtbnKLEpNjgY4EWMUQ01cAlamRbeaoV82Qsihrx2\n\tJrR3e+EjfE5pkIvBLfWRsxfmcIS4UhjQ3Y2aXaSQ=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Umang Jain <umang.jain@ideasonboard.com>",
        "Subject": "[PATCH] libcamera: rkisp1: Eliminate hard-coded resizer limits",
        "Date": "Tue, 24 Sep 2024 12:43:41 +0530",
        "Message-ID": "<20240924071341.24424-1-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The resizer limits are dynamically queried in populateFormats() and\nassigned to minResolution_ and maxResolution_. Therefore, initializing\nthese values in the constructor is unnecessary.\n\nThis change allows us to remove the hard-coded max/min resolution limits\nfrom RkISP1Path, simplifying its constructor further.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 21 ++++++-------------\n src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  3 +--\n 2 files changed, 7 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\nindex c49017d1..8015c58c 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n@@ -54,11 +54,8 @@ const std::map<PixelFormat, uint32_t> formatToMediaBus = {\n \n } /* namespace */\n \n-RkISP1Path::RkISP1Path(const char *name, const Span<const PixelFormat> &formats,\n-\t\t       const Size &minResolution, const Size &maxResolution)\n-\t: name_(name), running_(false), formats_(formats),\n-\t  minResolution_(minResolution), maxResolution_(maxResolution),\n-\t  link_(nullptr)\n+RkISP1Path::RkISP1Path(const char *name, const Span<const PixelFormat> &formats)\n+\t: name_(name), running_(false), formats_(formats), link_(nullptr)\n {\n }\n \n@@ -435,12 +432,10 @@ void RkISP1Path::stop()\n }\n \n /*\n- * \\todo Remove the hardcoded resolutions and formats once all users will have\n- * migrated to a recent enough kernel.\n+ * \\todo Remove the hardcoded formats once all users will have migrated to a\n+ * recent enough kernel.\n  */\n namespace {\n-constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 };\n-constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 };\n constexpr std::array<PixelFormat, 18> RKISP1_RSZ_MP_FORMATS{\n \tformats::YUYV,\n \tformats::NV16,\n@@ -462,8 +457,6 @@ constexpr std::array<PixelFormat, 18> RKISP1_RSZ_MP_FORMATS{\n \tformats::SRGGB12,\n };\n \n-constexpr Size RKISP1_RSZ_SP_SRC_MIN{ 32, 16 };\n-constexpr Size RKISP1_RSZ_SP_SRC_MAX{ 1920, 1920 };\n constexpr std::array<PixelFormat, 8> RKISP1_RSZ_SP_FORMATS{\n \tformats::YUYV,\n \tformats::NV16,\n@@ -477,14 +470,12 @@ constexpr std::array<PixelFormat, 8> RKISP1_RSZ_SP_FORMATS{\n } /* namespace */\n \n RkISP1MainPath::RkISP1MainPath()\n-\t: RkISP1Path(\"main\", RKISP1_RSZ_MP_FORMATS,\n-\t\t     RKISP1_RSZ_MP_SRC_MIN, RKISP1_RSZ_MP_SRC_MAX)\n+\t: RkISP1Path(\"main\", RKISP1_RSZ_MP_FORMATS)\n {\n }\n \n RkISP1SelfPath::RkISP1SelfPath()\n-\t: RkISP1Path(\"self\", RKISP1_RSZ_SP_FORMATS,\n-\t\t     RKISP1_RSZ_SP_SRC_MIN, RKISP1_RSZ_SP_SRC_MAX)\n+\t: RkISP1Path(\"self\", RKISP1_RSZ_SP_FORMATS)\n {\n }\n \ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 08edefec..d33471e4 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -32,8 +32,7 @@ struct V4L2SubdeviceFormat;\n class RkISP1Path\n {\n public:\n-\tRkISP1Path(const char *name, const Span<const PixelFormat> &formats,\n-\t\t   const Size &minResolution, const Size &maxResolution);\n+\tRkISP1Path(const char *name, const Span<const PixelFormat> &formats);\n \n \tbool init(MediaDevice *media);\n \n",
    "prefixes": []
}