Show a patch.

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

{
    "id": 13206,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13206/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13206/",
    "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": "<20210805132805.824754-1-hiroh@chromium.org>",
    "date": "2021-08-05T13:28:05",
    "name": "[libcamera-devel] android: yuv: Fix wrong access of source buffer",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "f3f2d42c273f271e1800a27a1ddba330c2d0e866",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13206/mbox/",
    "series": [
        {
            "id": 2306,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2306/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2306",
            "date": "2021-08-05T13:28:05",
            "name": "[libcamera-devel] android: yuv: Fix wrong access of source buffer",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2306/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13206/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13206/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 A193BC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Aug 2021 13:28:19 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 160C368811;\n\tThu,  5 Aug 2021 15:28:19 +0200 (CEST)",
            "from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com\n\t[IPv6:2607:f8b0:4864:20::102d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C17A6026D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Aug 2021 15:28:18 +0200 (CEST)",
            "by mail-pj1-x102d.google.com with SMTP id\n\tm10-20020a17090a34cab0290176b52c60ddso9373524pjf.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 05 Aug 2021 06:28:18 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:490b:61c8:a52a:e6eb])\n\tby smtp.gmail.com with ESMTPSA id\n\tz18sm2590442pfn.88.2021.08.05.06.28.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 05 Aug 2021 06:28:15 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"b/JQaN39\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=zEbWiI382lmibgIWTF7PpOMVaD87Eq0+Mkl0oYoTX1A=;\n\tb=b/JQaN39yNWkoeB8PJ2QDW/26TDHeiQErAOLACh590qqgvKU5b3q+HA3k37hwq7icu\n\te/B3kViD1fXAzur3Sc/fPFGnlTRtA23rdRxJwa3JV5m4c79cMvMS3jX5Kw9Ya944tkzg\n\tQ9BDBiP9FqjZ0oXh+WVawTczGD1Z43dXKdxts=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=zEbWiI382lmibgIWTF7PpOMVaD87Eq0+Mkl0oYoTX1A=;\n\tb=hVcmYmOb0UXs2EXoqYfNKyC/kswUgw48PIbMmLTRw1eyNArUHVqffvFISp62hy0Hu0\n\tiT8yazZCv/XEqWaVt/fUEWsjBPSKBcJT6lNfAoD1V/olv4lMG/wjvBMzMcz2VxfhbLf1\n\tHaKN54l+y1Z89rPKrOc35dHjjwszl5n8jupbUqki3xheOvUc7dn6fv2Y6RWzvKCBXHIn\n\t46YAYmTLJhWYEsxd1zNNYPo2jvr0NuZ5FCmVczzvqnO4Y0il0zpsGbZareaIlTLYD5Nw\n\tPuYD70USvWaWpZPtW5BPNX3Vooj0jNXwOsfUhbpeXEfn0MeknVGh5WC1Lc+zvbcY9n5M\n\tNi4A==",
        "X-Gm-Message-State": "AOAM530id/LyxR/+RYvN3Owg25cwLBqr7KgVfN1qWFSWCEM+EsoBvMMf\n\tcZ+se19V1KQlsHSVvPhvobDuzu8mTJwNhQ==",
        "X-Google-Smtp-Source": "ABdhPJzDUoJFWaVQFTfZnBmh+7XIf3dmLa93IWM6IPF5ln3Q8oLmMrETtM5FGBUXflu8fe1e4W709w==",
        "X-Received": "by 2002:a17:90b:3556:: with SMTP id\n\tlt22mr15647277pjb.174.1628170096400; \n\tThu, 05 Aug 2021 06:28:16 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  5 Aug 2021 22:28:05 +0900",
        "Message-Id": "<20210805132805.824754-1-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.32.0.554.ge1b32706d8-goog",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] android: yuv: Fix wrong access of source\n\tbuffer",
        "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": "File descriptors of FrameBuffer given in PostProcessor::process()\nfor all the planes point the same buffer. To access the beginning\nof the second or later plane, it is necessary to add offsets to\nthe beginning of the buffer.\nFix the wrong access to the second plane of NV12 in\nPostProcessorYuv.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/yuv/post_processor_yuv.cpp | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\nindex 772e805b..3b801e96 100644\n--- a/src/android/yuv/post_processor_yuv.cpp\n+++ b/src/android/yuv/post_processor_yuv.cpp\n@@ -62,9 +62,12 @@ int PostProcessorYuv::process(const FrameBuffer &source,\n \t\treturn -EINVAL;\n \t}\n \n-\tint ret = libyuv::NV12Scale(sourceMapped.maps()[0].data(),\n+\tconst uint8_t *sourceY = sourceMapped.maps()[0].data();\n+\tconst uint8_t *sourceUV = sourceY + sourceStride_[0] * sourceSize_.height;\n+\n+\tint ret = libyuv::NV12Scale(sourceY,\n \t\t\t\t    sourceStride_[0],\n-\t\t\t\t    sourceMapped.maps()[1].data(),\n+\t\t\t\t    sourceUV,\n \t\t\t\t    sourceStride_[1],\n \t\t\t\t    sourceSize_.width, sourceSize_.height,\n \t\t\t\t    destination->plane(0).data(),\n",
    "prefixes": [
        "libcamera-devel"
    ]
}