Show a patch.

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

{
    "id": 15534,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15534/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15534/",
    "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": "<20220324130506.27360-1-laurent.pinchart@ideasonboard.com>",
    "date": "2022-03-24T13:05:06",
    "name": "[libcamera-devel] pipeline: rkisp1: Match sensor aspect ratio when generating configurations",
    "commit_ref": "074fa98ac4ea903049ba9d7386cdb2f050ea3b48",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4115704d653a428868ac233343014d25b71cbd41",
    "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/15534/mbox/",
    "series": [
        {
            "id": 2995,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2995/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2995",
            "date": "2022-03-24T13:05:06",
            "name": "[libcamera-devel] pipeline: rkisp1: Match sensor aspect ratio when generating configurations",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2995/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15534/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15534/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 1EC30C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Mar 2022 13:05:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 757EE604D5;\n\tThu, 24 Mar 2022 14:05:13 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1982460397\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Mar 2022 14:05:12 +0100 (CET)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 80C111844; \n\tThu, 24 Mar 2022 14:05:11 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648127113;\n\tbh=jWkImnThPsUAomkcPCl5BD8ZfRBdbhCUnm0ZI4x+DBg=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=c9BZyKxrupE6icvb45nFUHLu8dp4X8iC8K0V9bC4OUH/+XR4ZWibqERjJUFeDytxB\n\thKr9TNPIDjadY0i1bf+t35klV04QlndQ+MeA76hY+eCMdAJF6hBUXEacN3K+YbT2qz\n\taKKA1gCFV1m0IjS7MI7l5jqOssolfyVkDcs6Fbng5Bjn5jcfNllULwJLCz8Vtl1vDs\n\tApDZukDjv9KEl+i3Y5nZ3HQXTmxmEpZEk3UJDesbr8S8PR0ZtgRHW+4gLeD5zwujcM\n\to/mcLSj70auq29qy9G574aN2l+WLU996IuCAAX5R8P0udqji4/rk7IaRrj4P1o2Jdf\n\traKbzXkbNDteA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648127111;\n\tbh=jWkImnThPsUAomkcPCl5BD8ZfRBdbhCUnm0ZI4x+DBg=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=WzWT63SM5Vc68HLo4vNubYIQQeHl9ORs3e4d9PH/IQvQrVaOxLxLR87sxlHyVHNYV\n\t3xdIO5cB6p8PhHJZikkGuTa7iCtdtI6/lznGOpngAlGtwkCqggMCy2+tsmGaHukFtS\n\tLQDe8cf7JdMIWDdVWpietZ92Y8Ng73baOQ+s258M="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"WzWT63SM\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Mar 2022 15:05:06 +0200",
        "Message-Id": "<20220324130506.27360-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] pipeline: rkisp1: Match sensor aspect\n\tratio when generating configurations",
        "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 RkISP1Path::generateConfiguration() function limits the maximum\nresolution to the sensor resolution, to avoid upscaling. It however\ndoesn't take the sensor aspect ratio into account, which leads to a\nmaximum (and default) resolution of 1920x1920 when using the self path\nwith a sensor that has a higher resolution.\n\nFix it by constraining the minimum and maximum resolutions to match the\nsensor's aspect ratio.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\nindex f8d471204d2e..f195f91ead1f 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n@@ -50,12 +50,13 @@ bool RkISP1Path::init(MediaDevice *media)\n \n StreamConfiguration RkISP1Path::generateConfiguration(const Size &resolution)\n {\n-\tSize maxResolution = resolution;\n-\tmaxResolution.boundTo(maxResolution_);\n+\tSize maxResolution = maxResolution_.boundedToAspectRatio(resolution)\n+\t\t\t\t\t   .boundedTo(resolution);\n+\tSize minResolution = minResolution_.expandedToAspectRatio(resolution);\n \n \tstd::map<PixelFormat, std::vector<SizeRange>> streamFormats;\n \tfor (const PixelFormat &format : formats_)\n-\t\tstreamFormats[format] = { { minResolution_, maxResolution } };\n+\t\tstreamFormats[format] = { { minResolution, maxResolution } };\n \n \tStreamFormats formats(streamFormats);\n \tStreamConfiguration cfg(formats);\n",
    "prefixes": [
        "libcamera-devel"
    ]
}