[{"id":12336,"web_url":"https://patchwork.libcamera.org/comment/12336/","msgid":"<20200906162525.GB6047@pendragon.ideasonboard.com>","date":"2020-09-06T16:25:25","subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Show,\n\nThank you for the patches.\n\nOn Fri, Sep 04, 2020 at 04:43:11PM +0800, Show Liu wrote:\n> This is patch set v5 for qcam accelerated format conversion by OpenGL shader.\n> It's based on viewfinderGL(patch set v3), please skip the v4.\n> \n> In this version, I changed the original viewfinder hierarchy including created\n> viewfinder base and move the original viewfinder as default Qt rendering and\n> created new viewfinderGL to handle OpenGL stuff and also move the OpenGL shader\n> code as Qt resource. All the changes are according to the previous review comments.\n> \n> Known issue:\n> * It's running well at start time, but when the stop button is pressed and\n>   starts again, there is no more capture event being triggered.\n> \n> Todo:\n> * Show the No camera icon when the capture stops being pressed.\n\nNice work ! My head hurts with opengl now :-)\n\nPatches 1/4, 2/4 and 4/4 are mostly fine. I've sent more comments for\npatch 3/4, but nothing that should affect the architecture. If there are\nissue you're not sure how to address, please let me know. I can try to\nhelp with the integration, letting you focus on the GL part. For\ninstance I can have a look at the issues mentioned above, as well as the\nQT_NO_OPENGL conditional compilation. We also need to fall back to\nViewFinderQt when the format isn't supported by ViewFinderGL, and that's\nalso something I can handle.\n\n> Show Liu (4):\n>   qcam: add OpenGL shader code as Qt resource\n>   qcam: new viewfinder hierarchy\n>   qcam: add viewfinderGL class to accelerate the format convert\n>   qcam: add additional command line option to select the render type\n> \n>  src/qcam/assets/shader/NV_2_planes_UV_f.glsl  |  32 ++\n>  src/qcam/assets/shader/NV_2_planes_VU_f.glsl  |  32 ++\n>  src/qcam/assets/shader/NV_3_planes_UV_f.glsl  |  33 ++\n>  src/qcam/assets/shader/NV_3_planes_VU_f.glsl  |  33 ++\n>  src/qcam/assets/shader/NV_vertex_shader.glsl  |  16 +\n>  src/qcam/assets/shader/shaders.qrc            |  10 +\n>  src/qcam/main.cpp                             |   3 +\n>  src/qcam/main_window.cpp                      |  29 +-\n>  src/qcam/main_window.h                        |   6 +\n>  src/qcam/meson.build                          |   7 +-\n>  src/qcam/viewfinder.h                         |  60 +--\n>  src/qcam/viewfinder_gl.cpp                    | 441 ++++++++++++++++++\n>  src/qcam/viewfinder_gl.h                      |  97 ++++\n>  .../{viewfinder.cpp => viewfinder_qt.cpp}     |  24 +-\n>  src/qcam/viewfinder_qt.h                      |  67 +++\n>  15 files changed, 824 insertions(+), 66 deletions(-)\n>  create mode 100644 src/qcam/assets/shader/NV_2_planes_UV_f.glsl\n>  create mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl\n>  create mode 100644 src/qcam/assets/shader/NV_3_planes_UV_f.glsl\n>  create mode 100644 src/qcam/assets/shader/NV_3_planes_VU_f.glsl\n>  create mode 100644 src/qcam/assets/shader/NV_vertex_shader.glsl\n>  create mode 100644 src/qcam/assets/shader/shaders.qrc\n>  create mode 100644 src/qcam/viewfinder_gl.cpp\n>  create mode 100644 src/qcam/viewfinder_gl.h\n>  rename src/qcam/{viewfinder.cpp => viewfinder_qt.cpp} (86%)\n>  create mode 100644 src/qcam/viewfinder_qt.h","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 3CAE5BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  6 Sep 2020 16:25:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C81C3629B6;\n\tSun,  6 Sep 2020 18:25:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 150FC60370\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  6 Sep 2020 18:25:50 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 80DCE276;\n\tSun,  6 Sep 2020 18:25:49 +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=\"Vv9N3mS0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1599409549;\n\tbh=75vjCBS38I8344TQt4wQJd2UCby5WhhEMXNszeWmMfM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Vv9N3mS0qFO9CAGgZFArkV3fDt16QLQ3wgcbfFn4B/swMtXcH/nrJnYWnRDGwhmHR\n\tYgPMWardko8DPmDn/vJiz3MHBFugEdIkzz2bHkkO2q3ryozw9JsYWZQgHja7D5Ykd3\n\tbEyB+6ZZ6WABEmMUwNcGanIU+mrzbZxkMkE46nXM=","Date":"Sun, 6 Sep 2020 19:25:25 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Show Liu <show.liu@linaro.org>","Message-ID":"<20200906162525.GB6047@pendragon.ideasonboard.com>","References":"<20200904084316.7319-1-show.liu@linaro.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200904084316.7319-1-show.liu@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","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":"libcamera-devel@lists.libcamera.org","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>"}},{"id":12370,"web_url":"https://patchwork.libcamera.org/comment/12370/","msgid":"<CA+yuoHr8B7jZsP==MRjsN5fP7ervhhKBLzXPNyxYiq+6+bWucg@mail.gmail.com>","date":"2020-09-08T09:35:27","subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","submitter":{"id":24,"url":"https://patchwork.libcamera.org/api/people/24/","name":"Show Liu","email":"show.liu@linaro.org"},"content":"Hi Laurent,\n\n\n\nOn Mon, Sep 7, 2020 at 12:25 AM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Show,\n>\n> Thank you for the patches.\n>\n> On Fri, Sep 04, 2020 at 04:43:11PM +0800, Show Liu wrote:\n> > This is patch set v5 for qcam accelerated format conversion by OpenGL\n> shader.\n> > It's based on viewfinderGL(patch set v3), please skip the v4.\n> >\n> > In this version, I changed the original viewfinder hierarchy including\n> created\n> > viewfinder base and move the original viewfinder as default Qt rendering\n> and\n> > created new viewfinderGL to handle OpenGL stuff and also move the OpenGL\n> shader\n> > code as Qt resource. All the changes are according to the previous\n> review comments.\n> >\n> > Known issue:\n> > * It's running well at start time, but when the stop button is pressed\n> and\n> >   starts again, there is no more capture event being triggered.\n> >\n> > Todo:\n> > * Show the No camera icon when the capture stops being pressed.\n>\n> Nice work ! My head hurts with opengl now :-)\n>\n> Patches 1/4, 2/4 and 4/4 are mostly fine. I've sent more comments for\n> patch 3/4, but nothing that should affect the architecture.\n\n\nThanks for the review, I am trying to modify it according to your comments.\n\nIf there are\n> issue you're not sure how to address, please let me know. I can try to\n> help with the integration, letting you focus on the GL part. For\n> instance I can have a look at the issues mentioned above,\n\nIf so, that would be grateful!!  ...:-)\n\nas well as the\n> QT_NO_OPENGL conditional compilation. We also need to fall back to\n> ViewFinderQt when the format isn't supported by ViewFinderGL, and that's\n> also something I can handle.\n>\nActually I have thinks about this problem when I generating this series,\nbut the ViewFinderGL been generated before we got the format, currently\nI am just have warning message and suggest to use render qt if setFormat()\nis failed\n\n\n\nBest Regards,\nShow Liu\n\n>\n> > Show Liu (4):\n> >   qcam: add OpenGL shader code as Qt resource\n> >   qcam: new viewfinder hierarchy\n> >   qcam: add viewfinderGL class to accelerate the format convert\n> >   qcam: add additional command line option to select the render type\n> >\n> >  src/qcam/assets/shader/NV_2_planes_UV_f.glsl  |  32 ++\n> >  src/qcam/assets/shader/NV_2_planes_VU_f.glsl  |  32 ++\n> >  src/qcam/assets/shader/NV_3_planes_UV_f.glsl  |  33 ++\n> >  src/qcam/assets/shader/NV_3_planes_VU_f.glsl  |  33 ++\n> >  src/qcam/assets/shader/NV_vertex_shader.glsl  |  16 +\n> >  src/qcam/assets/shader/shaders.qrc            |  10 +\n> >  src/qcam/main.cpp                             |   3 +\n> >  src/qcam/main_window.cpp                      |  29 +-\n> >  src/qcam/main_window.h                        |   6 +\n> >  src/qcam/meson.build                          |   7 +-\n> >  src/qcam/viewfinder.h                         |  60 +--\n> >  src/qcam/viewfinder_gl.cpp                    | 441 ++++++++++++++++++\n> >  src/qcam/viewfinder_gl.h                      |  97 ++++\n> >  .../{viewfinder.cpp => viewfinder_qt.cpp}     |  24 +-\n> >  src/qcam/viewfinder_qt.h                      |  67 +++\n> >  15 files changed, 824 insertions(+), 66 deletions(-)\n> >  create mode 100644 src/qcam/assets/shader/NV_2_planes_UV_f.glsl\n> >  create mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl\n> >  create mode 100644 src/qcam/assets/shader/NV_3_planes_UV_f.glsl\n> >  create mode 100644 src/qcam/assets/shader/NV_3_planes_VU_f.glsl\n> >  create mode 100644 src/qcam/assets/shader/NV_vertex_shader.glsl\n> >  create mode 100644 src/qcam/assets/shader/shaders.qrc\n> >  create mode 100644 src/qcam/viewfinder_gl.cpp\n> >  create mode 100644 src/qcam/viewfinder_gl.h\n> >  rename src/qcam/{viewfinder.cpp => viewfinder_qt.cpp} (86%)\n> >  create mode 100644 src/qcam/viewfinder_qt.h\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 363E3BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  8 Sep 2020 09:35:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C092562931;\n\tTue,  8 Sep 2020 11:35:41 +0200 (CEST)","from mail-pf1-x443.google.com (mail-pf1-x443.google.com\n\t[IPv6:2607:f8b0:4864:20::443])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7995960534\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Sep 2020 11:35:40 +0200 (CEST)","by mail-pf1-x443.google.com with SMTP id o20so10479887pfp.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 08 Sep 2020 02:35:40 -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=\"jyXUMuBo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=7SBrUw3Kdrwhz6xCzeCdH1WlTnOH/jRshl0dyJDPek0=;\n\tb=jyXUMuBoIZwE2ignNf99aOK4SJ3FomOXk3H/nP+pCx97S30shtLG9ShegXWujCpnLN\n\tOMjuvypsYqXJJMYu4wBlYFLTm9q5Jt7j4joV8N4XhmsPgKRr/miNnSfJk9S2TjrYSDIx\n\tHpNGc58ada9SBz0BcBUhMyaD8RUMF8oDGbPLUB9euCLXnuhAlgufEGYljy5DjGkfQVQn\n\tkCiCRXWfAYWDkALm7J3IRzMgnW4Nqbz8XR9XJegOIs6bF2f7uWbRERREzwSMDK7CbzoI\n\tXeYn/X4tC6mus98EJNcDZMWTruwAuVQO6j2qKLBYSWH2jGjWA9ra8T7Arp/VG/7jZrti\n\tgjGQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=7SBrUw3Kdrwhz6xCzeCdH1WlTnOH/jRshl0dyJDPek0=;\n\tb=liu+E4Rep4oooPlnwbpeNg5gcaKbrcmcjZ05zPh3jYkPt56vO10Y9iDNiBUG8A0eQP\n\tiKwj0z09xsnlPFHqx0Wqx7AkqJ3EmK74DZ3qnA7DWEotU8TfpJ8DG7iRvYTiOmxEruFk\n\t3rOq5rZuK+kxSoPe4Z1HtNFQcL8Flovzzk61MiiYp/JFbnPhLLlTFcWZd2YK+GGBpOId\n\tRfXn1poGSBEFVnK1lVbu8MiuBB8FBUURkcoqar1N9PxRRON5oYKdwfMAjvi6+p82ZHl5\n\tGAeNeTvRpZ+wW3u+MHbnpCWDOw7zHrGOFslqPVxo37SRr6/bJ5CwuGEuz3k3p9Li1f40\n\tV6Mg==","X-Gm-Message-State":"AOAM533JZ6vfWROo37NvQ8NLg2TG2sGvgK5d+JTWL9t7pVSko10s9NiT\n\tEWOU63xLJBUU8cm4wZf7qYSrlGNgDNz0STWsb0fuFg==","X-Google-Smtp-Source":"ABdhPJwkPzSSQAGuHAbnR4kdHAlEO4575U0HTLXjbYSo+ElfdMAMHglDjPGeUMEYqQjp24pM7rCNZw4iob87KxDfTMU=","X-Received":"by 2002:a63:471b:: with SMTP id\n\tu27mr19607692pga.139.1599557738943; \n\tTue, 08 Sep 2020 02:35:38 -0700 (PDT)","MIME-Version":"1.0","References":"<20200904084316.7319-1-show.liu@linaro.org>\n\t<20200906162525.GB6047@pendragon.ideasonboard.com>","In-Reply-To":"<20200906162525.GB6047@pendragon.ideasonboard.com>","From":"Show Liu <show.liu@linaro.org>","Date":"Tue, 8 Sep 2020 17:35:27 +0800","Message-ID":"<CA+yuoHr8B7jZsP==MRjsN5fP7ervhhKBLzXPNyxYiq+6+bWucg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","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":"libcamera-devel@lists.libcamera.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============4725929201847598440==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12374,"web_url":"https://patchwork.libcamera.org/comment/12374/","msgid":"<20200908112326.GB6047@pendragon.ideasonboard.com>","date":"2020-09-08T11:23:26","subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Sep 08, 2020 at 05:35:27PM +0800, Show Liu wrote:\n> On Mon, Sep 7, 2020 at 12:25 AM Laurent Pinchart wrote:\n> > Hi Show,\n> >\n> > Thank you for the patches.\n> >\n> > On Fri, Sep 04, 2020 at 04:43:11PM +0800, Show Liu wrote:\n> > > This is patch set v5 for qcam accelerated format conversion by OpenGL shader.\n> > > It's based on viewfinderGL(patch set v3), please skip the v4.\n> > >\n> > > In this version, I changed the original viewfinder hierarchy including created\n> > > viewfinder base and move the original viewfinder as default Qt rendering and\n> > > created new viewfinderGL to handle OpenGL stuff and also move the OpenGL shader\n> > > code as Qt resource. All the changes are according to the previous review comments.\n> > >\n> > > Known issue:\n> > > * It's running well at start time, but when the stop button is pressed and\n> > >   starts again, there is no more capture event being triggered.\n> > >\n> > > Todo:\n> > > * Show the No camera icon when the capture stops being pressed.\n> >\n> > Nice work ! My head hurts with opengl now :-)\n> >\n> > Patches 1/4, 2/4 and 4/4 are mostly fine. I've sent more comments for\n> > patch 3/4, but nothing that should affect the architecture.\n> \n> Thanks for the review, I am trying to modify it according to your comments.\n> \n> > If there are\n> > issue you're not sure how to address, please let me know. I can try to\n> > help with the integration, letting you focus on the GL part. For\n> > instance I can have a look at the issues mentioned above,\n> \n> If so, that would be grateful!!  ...:-)\n> \n> > as well as the\n> > QT_NO_OPENGL conditional compilation. We also need to fall back to\n> > ViewFinderQt when the format isn't supported by ViewFinderGL, and that's\n> > also something I can handle.\n>\n> Actually I have thinks about this problem when I generating this series,\n> but the ViewFinderGL been generated before we got the format, currently\n> I am just have warning message and suggest to use render qt if setFormat()\n> is failed\n\nI'll handle this on top of the next version you'll submit.\n\nOne point I failed to mention during the review, would it be possible to\nlicense the shaders and ViewFinderGL under (GPL-2.0-or-later OR\nLGPL-2.1-or-later) ? I foresee a possibly need to use that code inside\nlibcamera for a GPU-based ISP in the future, and also possibly in a\ngeneric format conversion library that could be part of the libcamera\nproject but implemented in a separate .so. I have no plan to work on\nthese in the very near future, but having that option would avoid going\nthrough a relicensing process in the future.\n\n> > > Show Liu (4):\n> > >   qcam: add OpenGL shader code as Qt resource\n> > >   qcam: new viewfinder hierarchy\n> > >   qcam: add viewfinderGL class to accelerate the format convert\n> > >   qcam: add additional command line option to select the render type\n> > >\n> > >  src/qcam/assets/shader/NV_2_planes_UV_f.glsl  |  32 ++\n> > >  src/qcam/assets/shader/NV_2_planes_VU_f.glsl  |  32 ++\n> > >  src/qcam/assets/shader/NV_3_planes_UV_f.glsl  |  33 ++\n> > >  src/qcam/assets/shader/NV_3_planes_VU_f.glsl  |  33 ++\n> > >  src/qcam/assets/shader/NV_vertex_shader.glsl  |  16 +\n> > >  src/qcam/assets/shader/shaders.qrc            |  10 +\n> > >  src/qcam/main.cpp                             |   3 +\n> > >  src/qcam/main_window.cpp                      |  29 +-\n> > >  src/qcam/main_window.h                        |   6 +\n> > >  src/qcam/meson.build                          |   7 +-\n> > >  src/qcam/viewfinder.h                         |  60 +--\n> > >  src/qcam/viewfinder_gl.cpp                    | 441 ++++++++++++++++++\n> > >  src/qcam/viewfinder_gl.h                      |  97 ++++\n> > >  .../{viewfinder.cpp => viewfinder_qt.cpp}     |  24 +-\n> > >  src/qcam/viewfinder_qt.h                      |  67 +++\n> > >  15 files changed, 824 insertions(+), 66 deletions(-)\n> > >  create mode 100644 src/qcam/assets/shader/NV_2_planes_UV_f.glsl\n> > >  create mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl\n> > >  create mode 100644 src/qcam/assets/shader/NV_3_planes_UV_f.glsl\n> > >  create mode 100644 src/qcam/assets/shader/NV_3_planes_VU_f.glsl\n> > >  create mode 100644 src/qcam/assets/shader/NV_vertex_shader.glsl\n> > >  create mode 100644 src/qcam/assets/shader/shaders.qrc\n> > >  create mode 100644 src/qcam/viewfinder_gl.cpp\n> > >  create mode 100644 src/qcam/viewfinder_gl.h\n> > >  rename src/qcam/{viewfinder.cpp => viewfinder_qt.cpp} (86%)\n> > >  create mode 100644 src/qcam/viewfinder_qt.h","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 274DEBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  8 Sep 2020 11:23:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1D2562C33;\n\tTue,  8 Sep 2020 13:23:52 +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 BDBFB62C30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Sep 2020 13:23:51 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2FFCD39;\n\tTue,  8 Sep 2020 13:23:51 +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=\"C4BrHWeD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1599564231;\n\tbh=MeDq0ZaedYCjqUWpyS47pAzmRTt6JzAYhmy841cb3dM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C4BrHWeDXC2KLzmda3jclo27LBVZRreLe8KGEfsJ8UVkFab521Gx2jqiu8p64gXiE\n\tRF1iBufSngihk/m3zxLVSo89NrSkBM68a2v4dLePKl0kgLW1PVnwakpDi9Oh/wwMBJ\n\tltEQBvdsUm+gwMOvFh5y6ZR8yHc8w8Rm0r/vABLI=","Date":"Tue, 8 Sep 2020 14:23:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Show Liu <show.liu@linaro.org>","Message-ID":"<20200908112326.GB6047@pendragon.ideasonboard.com>","References":"<20200904084316.7319-1-show.liu@linaro.org>\n\t<20200906162525.GB6047@pendragon.ideasonboard.com>\n\t<CA+yuoHr8B7jZsP==MRjsN5fP7ervhhKBLzXPNyxYiq+6+bWucg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CA+yuoHr8B7jZsP==MRjsN5fP7ervhhKBLzXPNyxYiq+6+bWucg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","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":"libcamera-devel@lists.libcamera.org","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>"}},{"id":12388,"web_url":"https://patchwork.libcamera.org/comment/12388/","msgid":"<CA+yuoHp+NNPt9Cvu3ZKSb4RQZ5Q_JzP2mBYYOMY7FSWLtjiG2A@mail.gmail.com>","date":"2020-09-09T02:42:56","subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","submitter":{"id":24,"url":"https://patchwork.libcamera.org/api/people/24/","name":"Show Liu","email":"show.liu@linaro.org"},"content":"Hi Laurent,\n\n\nOn Tue, Sep 8, 2020 at 7:23 PM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> On Tue, Sep 08, 2020 at 05:35:27PM +0800, Show Liu wrote:\n> > On Mon, Sep 7, 2020 at 12:25 AM Laurent Pinchart wrote:\n> > > Hi Show,\n> > >\n> > > Thank you for the patches.\n> > >\n> > > On Fri, Sep 04, 2020 at 04:43:11PM +0800, Show Liu wrote:\n> > > > This is patch set v5 for qcam accelerated format conversion by\n> OpenGL shader.\n> > > > It's based on viewfinderGL(patch set v3), please skip the v4.\n> > > >\n> > > > In this version, I changed the original viewfinder hierarchy\n> including created\n> > > > viewfinder base and move the original viewfinder as default Qt\n> rendering and\n> > > > created new viewfinderGL to handle OpenGL stuff and also move the\n> OpenGL shader\n> > > > code as Qt resource. All the changes are according to the previous\n> review comments.\n> > > >\n> > > > Known issue:\n> > > > * It's running well at start time, but when the stop button is\n> pressed and\n> > > >   starts again, there is no more capture event being triggered.\n> > > >\n> > > > Todo:\n> > > > * Show the No camera icon when the capture stops being pressed.\n> > >\n> > > Nice work ! My head hurts with opengl now :-)\n> > >\n> > > Patches 1/4, 2/4 and 4/4 are mostly fine. I've sent more comments for\n> > > patch 3/4, but nothing that should affect the architecture.\n> >\n> > Thanks for the review, I am trying to modify it according to your\n> comments.\n> >\n> > > If there are\n> > > issue you're not sure how to address, please let me know. I can try to\n> > > help with the integration, letting you focus on the GL part. For\n> > > instance I can have a look at the issues mentioned above,\n> >\n> > If so, that would be grateful!!  ...:-)\n> >\n> > > as well as the\n> > > QT_NO_OPENGL conditional compilation. We also need to fall back to\n> > > ViewFinderQt when the format isn't supported by ViewFinderGL, and\n> that's\n> > > also something I can handle.\n> >\n> > Actually I have thinks about this problem when I generating this series,\n> > but the ViewFinderGL been generated before we got the format, currently\n> > I am just have warning message and suggest to use render qt if\n> setFormat()\n> > is failed\n>\n> I'll handle this on top of the next version you'll submit.\n>\n> One point I failed to mention during the review, would it be possible to\n> license the shaders and ViewFinderGL under (GPL-2.0-or-later OR\n> LGPL-2.1-or-later) ?\n\nSure. No problem. I will change to \"LGPL-2.1-or-later\" .\n\nI foresee a possibly need to use that code inside\n> libcamera for a GPU-based ISP in the future\n\nThat sounds interesting.\nAnd I believe the offscreen rendering would be more suitable for that....\njust an idea.\n\nRegards,\nShow\n\n, and also possibly in a\n> generic format conversion library that could be part of the libcamera\n> project but implemented in a separate .so. I have no plan to work on\n> these in the very near future, but having that option would avoid going\n> through a relicensing process in the future.\n>\n> > > > Show Liu (4):\n> > > >   qcam: add OpenGL shader code as Qt resource\n> > > >   qcam: new viewfinder hierarchy\n> > > >   qcam: add viewfinderGL class to accelerate the format convert\n> > > >   qcam: add additional command line option to select the render type\n> > > >\n> > > >  src/qcam/assets/shader/NV_2_planes_UV_f.glsl  |  32 ++\n> > > >  src/qcam/assets/shader/NV_2_planes_VU_f.glsl  |  32 ++\n> > > >  src/qcam/assets/shader/NV_3_planes_UV_f.glsl  |  33 ++\n> > > >  src/qcam/assets/shader/NV_3_planes_VU_f.glsl  |  33 ++\n> > > >  src/qcam/assets/shader/NV_vertex_shader.glsl  |  16 +\n> > > >  src/qcam/assets/shader/shaders.qrc            |  10 +\n> > > >  src/qcam/main.cpp                             |   3 +\n> > > >  src/qcam/main_window.cpp                      |  29 +-\n> > > >  src/qcam/main_window.h                        |   6 +\n> > > >  src/qcam/meson.build                          |   7 +-\n> > > >  src/qcam/viewfinder.h                         |  60 +--\n> > > >  src/qcam/viewfinder_gl.cpp                    | 441\n> ++++++++++++++++++\n> > > >  src/qcam/viewfinder_gl.h                      |  97 ++++\n> > > >  .../{viewfinder.cpp => viewfinder_qt.cpp}     |  24 +-\n> > > >  src/qcam/viewfinder_qt.h                      |  67 +++\n> > > >  15 files changed, 824 insertions(+), 66 deletions(-)\n> > > >  create mode 100644 src/qcam/assets/shader/NV_2_planes_UV_f.glsl\n> > > >  create mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl\n> > > >  create mode 100644 src/qcam/assets/shader/NV_3_planes_UV_f.glsl\n> > > >  create mode 100644 src/qcam/assets/shader/NV_3_planes_VU_f.glsl\n> > > >  create mode 100644 src/qcam/assets/shader/NV_vertex_shader.glsl\n> > > >  create mode 100644 src/qcam/assets/shader/shaders.qrc\n> > > >  create mode 100644 src/qcam/viewfinder_gl.cpp\n> > > >  create mode 100644 src/qcam/viewfinder_gl.h\n> > > >  rename src/qcam/{viewfinder.cpp => viewfinder_qt.cpp} (86%)\n> > > >  create mode 100644 src/qcam/viewfinder_qt.h\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 67D73BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  9 Sep 2020 02:43:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C57FF62C37;\n\tWed,  9 Sep 2020 04:43:11 +0200 (CEST)","from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com\n\t[IPv6:2607:f8b0:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 094F660372\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Sep 2020 04:43:10 +0200 (CEST)","by mail-pf1-x42f.google.com with SMTP id z19so826530pfn.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 08 Sep 2020 19:43:09 -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=\"EUaRVPUx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=7Pfb5S54nHoyTgd3abuDW1KW+1Bhs1yH5aDYDOT3oTk=;\n\tb=EUaRVPUxcgz3E+vxzGL1mxZkY6Z3PULS1JqrL2Qsq5BHUBFRXwJniO8FP+Kb3aJv2f\n\tFZ2+BOty3NTMceQSUtS1ddIqr9delkzUaBldumMDk1S8rh/XoDyT9lPe1i2rRYVoJL2V\n\thgk7OO25a/olnCY+/xOxBP7tACPyL6I9NsYVlFrsjBX0CbbyEyLULCqh8GV7vuW8j33x\n\tOL0xYN9mmk07bkTBjGVM45f98V4uSaufbsgFcwajKrhFv6o1QhqYRh+K072XAJZzRFog\n\t7NTH+Ki7VAWdg/R4mxx0QOQ4JdpCG3qIyYEgz+5NbXxCzJXwn1P1uDgBzqTrPuM62aC9\n\tfYtg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=7Pfb5S54nHoyTgd3abuDW1KW+1Bhs1yH5aDYDOT3oTk=;\n\tb=lO6ioTsM0/lV0yFjI57fhtCu3ZXtqTKg8etqb0IZJpZsJXZYpT0Ub8dyggM7oni+hZ\n\tubVaqvno/9wOxPGG0gw4P0exF+n8fAaKivgfonXXO3Vis8GOvhMrvATE5OOQq2N4aMSR\n\tS3RXujqiRz2RQE4hfyl/I9OPlbJBBtWh/lKJxOPcMSuw6sWKY0H4+vFz+DymWRSPNwee\n\tmc0us8zP0qN75sLiZX6KkxzISmWdkFhilxfLhLmGqm4+ZirlWEPIt9SiUbkiZIwkumee\n\tLBtGVYFAZII4IyvrooJOXGawKxj3tFOIPgZyt17QstM/KFb+e6BRPuHOSCRa8Hy/Ivwe\n\tHT9Q==","X-Gm-Message-State":"AOAM531zfWfGnvHdmx694N6FDAHLUm8yesrt/KP7HWaeh72B2JNiltsF\n\tE5IYAqhEeaHjYgUvUZyq3lHi8t+G2O55nyqlGwGGiHQ6hd9NBA==","X-Google-Smtp-Source":"ABdhPJzYgBLOtEBnEciLQSPWPfSwuN7FCxCAcKtXUWsl/fbqGevIDXHIHFHpngdtEusIxLliZ8JF1eOqIW6wFNH1rhM=","X-Received":"by 2002:a17:902:7286:: with SMTP id\n\td6mr1511647pll.11.1599619387932; \n\tTue, 08 Sep 2020 19:43:07 -0700 (PDT)","MIME-Version":"1.0","References":"<20200904084316.7319-1-show.liu@linaro.org>\n\t<20200906162525.GB6047@pendragon.ideasonboard.com>\n\t<CA+yuoHr8B7jZsP==MRjsN5fP7ervhhKBLzXPNyxYiq+6+bWucg@mail.gmail.com>\n\t<20200908112326.GB6047@pendragon.ideasonboard.com>","In-Reply-To":"<20200908112326.GB6047@pendragon.ideasonboard.com>","From":"Show Liu <show.liu@linaro.org>","Date":"Wed, 9 Sep 2020 10:42:56 +0800","Message-ID":"<CA+yuoHp+NNPt9Cvu3ZKSb4RQZ5Q_JzP2mBYYOMY7FSWLtjiG2A@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/4] qcam: accelerate format\n\tconversion by OpenGL shader","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":"libcamera-devel@lists.libcamera.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============3579310709826398583==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]