Show a patch.

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

{
    "id": 13180,
    "url": "https://patchwork.libcamera.org/api/patches/13180/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13180/",
    "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": "<20210803133205.6599-4-umang.jain@ideasonboard.com>",
    "date": "2021-08-03T13:32:04",
    "name": "[libcamera-devel,3/4] ipu3: cio2: Change sensor size selection policy",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3e235dceeea9a58990c2196d8a6eb5809533dc61",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/13180/mbox/",
    "series": [
        {
            "id": 2296,
            "url": "https://patchwork.libcamera.org/api/series/2296/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2296",
            "date": "2021-08-03T13:32:01",
            "name": "ipu3: Change sensor size selection policy",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2296/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13180/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13180/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 BCD2BC3235\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Aug 2021 13:32:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7BA7D687EB;\n\tTue,  3 Aug 2021 15:32:32 +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 E2DBF687CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Aug 2021 15:32:31 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.238.109.12])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B8C1B3F0;\n\tTue,  3 Aug 2021 15:32:30 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"wbgFbsiY\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627997551;\n\tbh=rlDFcRXJQC8DrRziJUYhUuPYmCzT2LxvxNcrBDMTuQ0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=wbgFbsiYo0+H94MmJ0SsSbV0NADbiEtTCu8Sw/urRgECOcg1SnYnUJEFRlNpCr97e\n\tfjD3h3NFY4aqVyFGFSG6tP5bF1bfA7zs/bfzoOnu47Up7PVkn1eLuPOF9h5EBTuLlK\n\tO3zOOy3ms7QN+gSvngNReZjTxjPA12L+6IPT3kH8=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  3 Aug 2021 19:02:04 +0530",
        "Message-Id": "<20210803133205.6599-4-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210803133205.6599-1-umang.jain@ideasonboard.com>",
        "References": "<20210803133205.6599-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/4] ipu3: cio2: Change sensor size\n\tselection policy",
        "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": "From: Jacopo Mondi <jacopo@jmondi.org>\n\nThe current implementation of getSensorFormat() prioritizes sensor\nsizes that match the output size FOV ratio.\n\nModify the frame size selection procedure to prioritize resolutions\nwith the same FOV as the sensor's native one, to avoid cropping in the\nsensor pixel array.\n\nIn example, with the current implementation :\n\n- on a Soraka device equipped with ov13858 as back sensor, with a\n  native resolution of 4224x3136 (4:3), when requested to select the\n  sensor output size to produce 1080p (16:9) a frame size of 2112x1188\n  (16:9) is selected causing the ImgU configuration procedure to fail.\n  If a resolution with the same FOV as the sensor's native size, such\n  as 2112x1568 (4:3), is selected the pipeline works correctly.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/cio2.cpp | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp\nindex be063613..9980b8bd 100644\n--- a/src/libcamera/pipeline/ipu3/cio2.cpp\n+++ b/src/libcamera/pipeline/ipu3/cio2.cpp\n@@ -239,8 +239,8 @@ StreamConfiguration CIO2Device::generateConfiguration(Size size) const\n  *\n  * - The desired \\a size shall fit in the sensor output size to avoid the need\n  *   to up-scale.\n- * - The sensor output size shall match the desired aspect ratio to avoid the\n- *   need to crop the field of view.\n+ * - The aspect ratio of sensor output size shall be as close as possible to\n+ *   the sensor's native resolution field of view.\n  * - The sensor output size shall be as small as possible to lower the required\n  *   bandwidth.\n  * - The desired \\a size shall be supported by one of the media bus code listed\n@@ -264,7 +264,9 @@ V4L2SubdeviceFormat CIO2Device::getSensorFormat(const std::vector<unsigned int>\n {\n \tunsigned int desiredArea = size.width * size.height;\n \tunsigned int bestArea = UINT_MAX;\n-\tfloat desiredRatio = static_cast<float>(size.width) / size.height;\n+\tconst Size &resolution = sensor_->resolution();\n+\tfloat desiredRatio = static_cast<float>(resolution.width) /\n+\t\t\t     resolution.height;\n \tfloat bestRatio = FLT_MAX;\n \tSize bestSize;\n \tuint32_t bestCode = 0;\n",
    "prefixes": [
        "libcamera-devel",
        "3/4"
    ]
}