Show a patch.

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

{
    "id": 12573,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12573/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12573/",
    "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": "<20210611162726.824789-2-andrey.konovalov@linaro.org>",
    "date": "2021-06-11T16:27:23",
    "name": "[libcamera-devel,v3,1/4] qcam: viewfinder_gl: change uniform float tex_stepx to vec2 tex_step",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6c3654377fc5dccf7b2189c61be5de913dbd2834",
    "submitter": {
        "id": 25,
        "url": "https://patchwork.libcamera.org/api/1.1/people/25/?format=api",
        "name": "Andrey Konovalov",
        "email": "andrey.konovalov@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12573/mbox/",
    "series": [
        {
            "id": 2124,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2124/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2124",
            "date": "2021-06-11T16:27:22",
            "name": "qcam: viewfinder_gl: add RAW8, RAW10P and RAW12P formats",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2124/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12573/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12573/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 B4AAEC320B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 11 Jun 2021 16:27:44 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74AFF6892B;\n\tFri, 11 Jun 2021 18:27:44 +0200 (CEST)",
            "from mail-lf1-x132.google.com (mail-lf1-x132.google.com\n\t[IPv6:2a00:1450:4864:20::132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 90A346029E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 18:27:42 +0200 (CEST)",
            "by mail-lf1-x132.google.com with SMTP id k40so9391536lfv.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 09:27:42 -0700 (PDT)",
            "from localhost.localdomain ([85.249.44.185])\n\tby smtp.googlemail.com with ESMTPSA id\n\tl2sm777773lji.70.2021.06.11.09.27.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 11 Jun 2021 09:27:41 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"ZoXwmaoX\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=mv2rnIZBXYiZJVAJqcAZOvGmMppMCyKTu4OnVWYQArQ=;\n\tb=ZoXwmaoXJkGWewFylxgg/7CBUyLiE2pp8ZGpBtQymJWcvMgLfyzm7hcAsNMG7dA1Qi\n\t/Yiw/nq3j+x9Tapk6xOr5AVbW7xkvdUd2iwXe724u6Ck5XcUaQML3dBdSfz4vCLZFC93\n\tX8rVB4V6gEsVGjfwXLdNuh4m6Uw9wjU4bR7gcjYtC0420movYWy+DhTIvGQp/UL8fmXI\n\tY7qFIe2Zg+JTXUEGim4MAF/FxlwUCvb2AhxIbqIRlDm0qNqOvdoa22So7QTC3nFuo9iD\n\tyd/QPVsyYkjPcoRJ8y1/hebrGvNSUjKysAx/Zl4WIeuNGcd1SAJhDjBykDSEb2HRTmP6\n\txQEA==",
        "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:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=mv2rnIZBXYiZJVAJqcAZOvGmMppMCyKTu4OnVWYQArQ=;\n\tb=LTYutRQvAMsM2ZzhKn1MIhbSXirS1ZKCPC1I5Ac4OLaGmMbPNjYhVDytSqiSKt8VVX\n\todYxBTLvjBOGR9Sf2IteC1sanqhY5B490qNLeVa3/Rl4xGoalboQ/t+wAe/2FPtmqsD7\n\tz+nBxY86gZ3yYGu+4JF1NCVjtxNRhSbPEX1J/jUmyKp/erOoD0YccoyE5AQB7Jxesf3b\n\tqt5Jmhw/YWeGschQQJV9Eu76mSFY409OF1kCckVSsED6HDfNHgJMaSwEJ8DcdCfSXF7C\n\tPgBQBmmFzd1SxVHg4u3dezWIT3FkRxy8XoPdSN2mtZ+a9CkCCDfnqmZaLE5fYo9cEKOE\n\tcnuw==",
        "X-Gm-Message-State": "AOAM5305sRLHFzvX9dYkxxkwkB1n948931VfpmAa0lZg5YDfFGwtGdXE\n\t5q6dThydSwatp6zRd2IN5uE6yeyBhuUSPQ==",
        "X-Google-Smtp-Source": "ABdhPJwet9CBnhvKAjuWLdrYkB6HPBBL8ZD2TkthBQIOyR3tbssx2X2wDRIccT0xDnX/ErlDJiJ9zQ==",
        "X-Received": "by 2002:a19:c347:: with SMTP id\n\tt68mr3100033lff.653.1623428862060; \n\tFri, 11 Jun 2021 09:27:42 -0700 (PDT)",
        "From": "Andrey Konovalov <andrey.konovalov@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org,\n\tlaurent.pinchart@ideasonboard.com",
        "Date": "Fri, 11 Jun 2021 19:27:23 +0300",
        "Message-Id": "<20210611162726.824789-2-andrey.konovalov@linaro.org>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210611162726.824789-1-andrey.konovalov@linaro.org>",
        "References": "<20210611162726.824789-1-andrey.konovalov@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 1/4] qcam: viewfinder_gl: change\n\tuniform float tex_stepx to vec2 tex_step",
        "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>",
        "Cc": "morgan@casual-effects.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "In preparation to extend the supported formats, extend the tex_stepx\nuniform to cover the steps between texels in both horizontal and\nvertical directions.\n\nSigned-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/assets/shader/YUV_packed.frag | 8 ++++----\n src/qcam/viewfinder_gl.cpp             | 7 ++++---\n src/qcam/viewfinder_gl.h               | 2 +-\n 3 files changed, 9 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/qcam/assets/shader/YUV_packed.frag b/src/qcam/assets/shader/YUV_packed.frag\nindex 224dfafe..d6efd4ce 100644\n--- a/src/qcam/assets/shader/YUV_packed.frag\n+++ b/src/qcam/assets/shader/YUV_packed.frag\n@@ -12,7 +12,7 @@ precision mediump float;\n varying vec2 textureOut;\n \n uniform sampler2D tex_y;\n-uniform float tex_stepx;\n+uniform vec2 tex_step;\n \n void main(void)\n {\n@@ -49,10 +49,10 @@ void main(void)\n \t * a = fract(x) * 2 - 1\t\t\tif fract(x) >= 0.5\n \t */\n \tvec2 pos = textureOut;\n-\tfloat f_x = fract(pos.x / tex_stepx);\n+\tfloat f_x = fract(pos.x / tex_step.x);\n \n-\tvec4 left = texture2D(tex_y, vec2(pos.x - f_x * tex_stepx, pos.y));\n-\tvec4 right = texture2D(tex_y, vec2(pos.x + (1.0 - f_x) * tex_stepx , pos.y));\n+\tvec4 left = texture2D(tex_y, vec2(pos.x - f_x * tex_step.x, pos.y));\n+\tvec4 right = texture2D(tex_y, vec2(pos.x + (1.0 - f_x) * tex_step.x , pos.y));\n \n #if defined(YUV_PATTERN_UYVY)\n \tfloat y_left = mix(left.g, left.a, f_x * 2.0);\ndiff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\nindex 5d9b442e..ff719418 100644\n--- a/src/qcam/viewfinder_gl.cpp\n+++ b/src/qcam/viewfinder_gl.cpp\n@@ -289,7 +289,7 @@ bool ViewFinderGL::createFragmentShader()\n \ttextureUniformY_ = shaderProgram_.uniformLocation(\"tex_y\");\n \ttextureUniformU_ = shaderProgram_.uniformLocation(\"tex_u\");\n \ttextureUniformV_ = shaderProgram_.uniformLocation(\"tex_v\");\n-\ttextureUniformStepX_ = shaderProgram_.uniformLocation(\"tex_stepx\");\n+\ttextureUniformStep_ = shaderProgram_.uniformLocation(\"tex_step\");\n \n \t/* Create the textures. */\n \tfor (std::unique_ptr<QOpenGLTexture> &texture : textures_) {\n@@ -508,8 +508,9 @@ void ViewFinderGL::doRender()\n \t\t * ([0, 1]). There are exactly width - 1 steps between the\n \t\t * leftmost and rightmost texels.\n \t\t */\n-\t\tshaderProgram_.setUniformValue(textureUniformStepX_,\n-\t\t\t\t\t       1.0f / (size_.width() / 2 - 1));\n+\t\tshaderProgram_.setUniformValue(textureUniformStep_,\n+\t\t\t\t\t       1.0f / (size_.width() / 2 - 1),\n+\t\t\t\t\t       1.0f /* not used */);\n \t\tbreak;\n \n \tcase libcamera::formats::ABGR8888:\ndiff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\nindex 150fa4ae..1b1faa91 100644\n--- a/src/qcam/viewfinder_gl.h\n+++ b/src/qcam/viewfinder_gl.h\n@@ -85,7 +85,7 @@ private:\n \tGLuint textureUniformU_;\n \tGLuint textureUniformV_;\n \tGLuint textureUniformY_;\n-\tGLuint textureUniformStepX_;\n+\tGLuint textureUniformStep_;\n \tunsigned int horzSubSample_;\n \tunsigned int vertSubSample_;\n \n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/4"
    ]
}