{"id":10326,"url":"https://patchwork.libcamera.org/api/1.1/patches/10326/?format=json","web_url":"https://patchwork.libcamera.org/patch/10326/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201103155025.5948-6-laurent.pinchart@ideasonboard.com>","date":"2020-11-03T15:50:23","name":"[libcamera-devel,5/7] qcam: viewfinder_gl: Rename yuvData_ to data_","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"87aa42c1530fa314a1bb71fdfc6a9286516f260f","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10326/mbox/","series":[{"id":1441,"url":"https://patchwork.libcamera.org/api/1.1/series/1441/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1441","date":"2020-11-03T15:50:18","name":"qcam: Miscellaneous shaders cleanups and RGB support","version":1,"mbox":"https://patchwork.libcamera.org/series/1441/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10326/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10326/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 38A61BDB89\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Nov 2020 15:51:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 029CA62C21;\n\tTue,  3 Nov 2020 16:51:24 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC9CF62B7E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Nov 2020 16:51:20 +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 6387EFD7;\n\tTue,  3 Nov 2020 16:51:20 +0100 (CET)"],"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=\"p7pfWFsf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1604418680;\n\tbh=dtUczAT7F7o8yCx6EumqzN+fGsVqXYtRn+lW6caUHfE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=p7pfWFsfLsvQerZt6NtQHuXBZ8yMFBtCsrxXK6Ubd4zTaNYh/8fl2MH7Zfis4pG5e\n\tjcOGTvoQyKjoMC4Q8PzR72LjBouDrLLeTxGNSnqTEfpmB7ENM5pORVVRu5EuECPZhM\n\t2Uzz3SMaUdQ+DsiSqe8oIK1l8UfialGdiSJKOQ/8=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue,  3 Nov 2020 17:50:23 +0200","Message-Id":"<20201103155025.5948-6-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20201103155025.5948-1-laurent.pinchart@ideasonboard.com>","References":"<20201103155025.5948-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 5/7] qcam: viewfinder_gl: Rename yuvData_\n\tto data_","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"In preparation for RGB formats support, rename the pointer to image data\nfrom yuvData_ to data_.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/viewfinder_gl.cpp | 24 ++++++++++++------------\n src/qcam/viewfinder_gl.h   |  2 +-\n 2 files changed, 13 insertions(+), 13 deletions(-)","diff":"diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\nindex 110f0fa673df..e6625cac9795 100644\n--- a/src/qcam/viewfinder_gl.cpp\n+++ b/src/qcam/viewfinder_gl.cpp\n@@ -32,7 +32,7 @@ static const QList<libcamera::PixelFormat> supportedFormats{\n };\n \n ViewFinderGL::ViewFinderGL(QWidget *parent)\n-\t: QOpenGLWidget(parent), buffer_(nullptr), yuvData_(nullptr),\n+\t: QOpenGLWidget(parent), buffer_(nullptr), data_(nullptr),\n \t  vertexBuffer_(QOpenGLBuffer::VertexBuffer),\n \t  textureU_(QOpenGLTexture::Target2D),\n \t  textureV_(QOpenGLTexture::Target2D),\n@@ -101,7 +101,7 @@ void ViewFinderGL::render(libcamera::FrameBuffer *buffer, MappedBuffer *map)\n \tif (buffer_)\n \t\trenderComplete(buffer_);\n \n-\tyuvData_ = static_cast<unsigned char *>(map->memory);\n+\tdata_ = static_cast<unsigned char *>(map->memory);\n \tupdate();\n \tbuffer_ = buffer;\n }\n@@ -346,7 +346,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_);\n+\t\t\t     data_);\n \t\tshaderProgram_.setUniformValue(textureUniformY_, 0);\n \n \t\t/* Activate texture UV/VU */\n@@ -360,7 +360,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RG,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_ + size_.width() * size_.height());\n+\t\t\t     data_ + size_.width() * size_.height());\n \t\tshaderProgram_.setUniformValue(textureUniformU_, 1);\n \t\tbreak;\n \n@@ -376,7 +376,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_);\n+\t\t\t     data_);\n \t\tshaderProgram_.setUniformValue(textureUniformY_, 0);\n \n \t\t/* Activate texture U */\n@@ -390,7 +390,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_ + size_.width() * size_.height());\n+\t\t\t     data_ + size_.width() * size_.height());\n \t\tshaderProgram_.setUniformValue(textureUniformU_, 1);\n \n \t\t/* Activate texture V */\n@@ -404,7 +404,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_ + size_.width() * size_.height() * 5 / 4);\n+\t\t\t     data_ + size_.width() * size_.height() * 5 / 4);\n \t\tshaderProgram_.setUniformValue(textureUniformV_, 2);\n \t\tbreak;\n \n@@ -420,7 +420,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_);\n+\t\t\t     data_);\n \t\tshaderProgram_.setUniformValue(textureUniformY_, 0);\n \n \t\t/* Activate texture V */\n@@ -434,7 +434,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_ + size_.width() * size_.height());\n+\t\t\t     data_ + size_.width() * size_.height());\n \t\tshaderProgram_.setUniformValue(textureUniformV_, 2);\n \n \t\t/* Activate texture U */\n@@ -448,7 +448,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RED,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_ + size_.width() * size_.height() * 5 / 4);\n+\t\t\t     data_ + size_.width() * size_.height() * 5 / 4);\n \t\tshaderProgram_.setUniformValue(textureUniformU_, 1);\n \t\tbreak;\n \n@@ -471,7 +471,7 @@ void ViewFinderGL::doRender()\n \t\t\t     0,\n \t\t\t     GL_RGBA,\n \t\t\t     GL_UNSIGNED_BYTE,\n-\t\t\t     yuvData_);\n+\t\t\t     data_);\n \t\tshaderProgram_.setUniformValue(textureUniformY_, 0);\n \n \t\t/*\n@@ -497,7 +497,7 @@ void ViewFinderGL::paintGL()\n \t\t\t\t   << \"create fragment shader failed.\";\n \t\t}\n \n-\tif (yuvData_) {\n+\tif (data_) {\n \t\tglClearColor(0.0, 0.0, 0.0, 1.0);\n \t\tglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n \ndiff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\nindex 40c04dc5f877..b3e36514d3d4 100644\n--- a/src/qcam/viewfinder_gl.h\n+++ b/src/qcam/viewfinder_gl.h\n@@ -65,7 +65,7 @@ private:\n \tlibcamera::FrameBuffer *buffer_;\n \tlibcamera::PixelFormat format_;\n \tQSize size_;\n-\tunsigned char *yuvData_;\n+\tunsigned char *data_;\n \n \t/* Shaders */\n \tQOpenGLShaderProgram shaderProgram_;\n","prefixes":["libcamera-devel","5/7"]}