[{"id":17933,"web_url":"https://patchwork.libcamera.org/comment/17933/","msgid":"<YNvGEWqOG7cc7TgS@pendragon.ideasonboard.com>","date":"2021-06-30T01:17:05","subject":"Re: [libcamera-devel] [PATCH v5 0/9] qcam: viewfinder_gl: add RAW8, \n\tRAW10P and RAW12P formats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Andrey,\n\nVery nice patch series, thank you !\n\nOn Tue, Jun 22, 2021 at 04:46:43PM +0300, Andrey Konovalov wrote:\n> This patchset adds support for both 10-bit, and 12-bit raw Bayer packed\n> and 8-bit raw Bayer formats. GL_RED texture is used to store the image data.\n> Not only this allows to use the same shader code in 10-bit and 12-bit cases.\n> But it also turned out that sampling from GL_RED texture is easier (less\n> \"patterns\") than from GL_RGB - even though we loose the \"auto-skipping the LS\n> bytes of pixel values\" feature in the 12-bit case.\n> \n> Changes in v5 vs v4 [1]:\n> * 8-bit raw Bayer format is back, but it is now split into several patches\n>   (4/9 to 8/9) to make it easier to see the particular changes done to\n>   the original shader code.\n>   With the first 8 of the total 9 patches applied I am seeing some\n>   artifacts (note the horizontal colour lines which change when the viewfinder\n>   window height is changed) [2].\n>   Patch 9/9 fixes that, but the root cause of the issue isn't currently known.\n>   That's why 9/9 comes as RFC, and the series can be merged without it.\n\nI've noticed in\nhttps://github.com/motmot/libcamiface/blob/master/demo/liveview-glut.c\nthat GL_TEXTURE_MIN_FILTER is set to GL_LINEAR, while you set it to\nGL_NEAREST. Could it be related to the artifacts you're seeing ?\n\nI'll merge patches 1/9 to 8/9 already, and merge 9/9 or a different fix\nonce we finish this discussion.\n\n> * s/tex_raw/tex_y in the shaders to match the uniform name used in the cpp\n>   code.\n> \n> [1] https://patchwork.libcamera.org/cover/12629/\n> [2] https://people.linaro.org/~andrey.konovalov/cam-56/20210622.imx219-RAW8-artifacts.viewfinder_gl-add-RAW1xP-and-RAW8-support-v4.1-raw8.0.mp4\n> \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 CD9E6C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 01:17:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4E85D684E8;\n\tWed, 30 Jun 2021 03:17:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 184766028A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 03:17:43 +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 851233F2;\n\tWed, 30 Jun 2021 03:17:42 +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=\"Sv0LQ+ph\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625015862;\n\tbh=S56BHN9d9bVMcln72Z7JizFE9xSY1w3mx6dXEA7Cgag=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Sv0LQ+ph4ILOR15uBZz87GrX2jMoGZcShudDt46chvxqD3+gpOh5Fic1WsmfuaFW4\n\tACol6Iky18aOpEIHCy0RScFxbTFuWJsTRAZwb72+7R9n2zthDSLCPPqUVL++9CAfT6\n\tYeTk1GPBi6Out9EpH2lbjl4s2qUp5NqyugVyZHL8=","Date":"Wed, 30 Jun 2021 04:17:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<YNvGEWqOG7cc7TgS@pendragon.ideasonboard.com>","References":"<20210622134652.1279260-1-andrey.konovalov@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210622134652.1279260-1-andrey.konovalov@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH v5 0/9] qcam: viewfinder_gl: add RAW8, \n\tRAW10P and RAW12P formats","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, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18071,"web_url":"https://patchwork.libcamera.org/comment/18071/","msgid":"<2ed31a68-c447-ba6f-eb82-614b0ab5fa7d@linaro.org>","date":"2021-07-09T16:29:04","subject":"Re: [libcamera-devel] [PATCH v5 0/9] qcam: viewfinder_gl: add RAW8, \n\tRAW10P and RAW12P formats","submitter":{"id":25,"url":"https://patchwork.libcamera.org/api/people/25/","name":"Andrey Konovalov","email":"andrey.konovalov@linaro.org"},"content":"Hi Laurent,\n\nThanks for merging the first 8 patches from this series!\n\nAnd sorry for the delayed reply (has just returned from the vacations).\n\nOn 30.06.2021 04:17, Laurent Pinchart wrote:\n> Hi Andrey,\n> \n> Very nice patch series, thank you !\n> \n> On Tue, Jun 22, 2021 at 04:46:43PM +0300, Andrey Konovalov wrote:\n>> This patchset adds support for both 10-bit, and 12-bit raw Bayer packed\n>> and 8-bit raw Bayer formats. GL_RED texture is used to store the image data.\n>> Not only this allows to use the same shader code in 10-bit and 12-bit cases.\n>> But it also turned out that sampling from GL_RED texture is easier (less\n>> \"patterns\") than from GL_RGB - even though we loose the \"auto-skipping the LS\n>> bytes of pixel values\" feature in the 12-bit case.\n>>\n>> Changes in v5 vs v4 [1]:\n>> * 8-bit raw Bayer format is back, but it is now split into several patches\n>>    (4/9 to 8/9) to make it easier to see the particular changes done to\n>>    the original shader code.\n>>    With the first 8 of the total 9 patches applied I am seeing some\n>>    artifacts (note the horizontal colour lines which change when the viewfinder\n>>    window height is changed) [2].\n>>    Patch 9/9 fixes that, but the root cause of the issue isn't currently known.\n>>    That's why 9/9 comes as RFC, and the series can be merged without it.\n> \n> I've noticed in\n> https://github.com/motmot/libcamiface/blob/master/demo/liveview-glut.c\n> that GL_TEXTURE_MIN_FILTER is set to GL_LINEAR, while you set it to\n> GL_NEAREST. Could it be related to the artifacts you're seeing ?\n\nI started from GL_TEXTURE_MIN_FILTER set to GL_LINEAR, and saw the similar\nartifacts. Then changed it to GL_NEAREST, though it didn't produce a visible\ndifference (just using a linear mix of pixels of different colours didn't seem\nlike a good idea for me).\nI've got one more thing to check, and will let you know if it brings any new\ninformation after I am done with it.\n\n> I'll merge patches 1/9 to 8/9 already, and merge 9/9 or a different fix\n> once we finish this discussion.\n\nSounds good!\n\nThanks,\nAndrey\n\n>> * s/tex_raw/tex_y in the shaders to match the uniform name used in the cpp\n>>    code.\n>>\n>> [1] https://patchwork.libcamera.org/cover/12629/\n>> [2] https://people.linaro.org/~andrey.konovalov/cam-56/20210622.imx219-RAW8-artifacts.viewfinder_gl-add-RAW1xP-and-RAW8-support-v4.1-raw8.0.mp4\n>>\n>>\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 B9BBFBD794\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Jul 2021 16:29:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3195A684E7;\n\tFri,  9 Jul 2021 18:29:10 +0200 (CEST)","from mail-lj1-x233.google.com (mail-lj1-x233.google.com\n\t[IPv6:2a00:1450:4864:20::233])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8BE96605AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Jul 2021 18:29:08 +0200 (CEST)","by mail-lj1-x233.google.com with SMTP id a18so8902758ljk.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 09 Jul 2021 09:29:08 -0700 (PDT)","from [192.168.88.254] ([85.249.40.209])\n\tby smtp.gmail.com with ESMTPSA id d3sm610791lja.7.2021.07.09.09.29.06\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 09 Jul 2021 09:29:07 -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=\"DfdXQrwt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=KR+K74pcIt4xdkaZDvYu+PMofkKNYaHT6uuXapHABOQ=;\n\tb=DfdXQrwt+A6yti3pcBAuSUGJOA9n50AO6k2XOjdSo71TM62yb5hDLcoDgk+/nYJATC\n\tzJ2fzBe8bkTnIbMIOT58yzOmfZbjwEaeSsafUlL8gQepzusVoY0iAzAXHIPLavPRQJBX\n\t7t9rn+3eI6V/fn6F9xdEKvEhXzbGx/phEbvzNMgQM1vuRLymJyuDXOqn+8gavZHonGIo\n\tyIwWRdrxwgmdPHpwFDopP0EUMcZ+N4mnIjrLEU2Nf/NK7vpVCnJulJCuRmOQePB0n8tP\n\tWJNfDYCJVX7A5NkUODYxlqshKGFVwvtG1HPaoOcp9zVeCc8cRtpPnYFXdBSB6tVvsGoC\n\tFadA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=KR+K74pcIt4xdkaZDvYu+PMofkKNYaHT6uuXapHABOQ=;\n\tb=GcUpoqwQyXC2f3R896lwvaEv47+YZhVo/uikbPVpFF5Y8GMPuT4alFrikWWme9PyC1\n\tzZt0v6IASHqeMFhP3jkWRmEcjMy1PVHEsdCIY2i2CIdzmz+YUyvCGDk/vjjC1exoipou\n\tWXIKpn32xFCu+hrWV1IHrWX/lzUIOrlvs75rKIRs04KAMgxdo9plGbAHHVQUkYPyhFUY\n\t7WaCHYZiXe9prmwa2rJgfuKagaEpMSIAd+ex+ikuWoI1OLO++57x/eL9W7lwcdCRF/41\n\tnZRLEhcNNGxpSar/+TuL6IDvUxQNLFxKTmmcUdRXX/iK1dmxGVybsF0hmbW1h2+9SFV3\n\tQsGw==","X-Gm-Message-State":"AOAM532eKWCQLTSWbDODW1K6gyIphEgoRvVW2STDExASb3VrGyZJok0x\n\tRYnK+sPJUKvXrtr6CE45mIPbyQ==","X-Google-Smtp-Source":"ABdhPJwtRIDPUBXXKOhMdJQSF3YQeknGGNxIAg3kfN/L+/KgVsgUynqkNmjFaADi/rHId79CfoinCQ==","X-Received":"by 2002:a2e:8244:: with SMTP id\n\tj4mr20093322ljh.364.1625848147830; \n\tFri, 09 Jul 2021 09:29:07 -0700 (PDT)","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210622134652.1279260-1-andrey.konovalov@linaro.org>\n\t<YNvGEWqOG7cc7TgS@pendragon.ideasonboard.com>","From":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<2ed31a68-c447-ba6f-eb82-614b0ab5fa7d@linaro.org>","Date":"Fri, 9 Jul 2021 19:29:04 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YNvGEWqOG7cc7TgS@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v5 0/9] qcam: viewfinder_gl: add RAW8, \n\tRAW10P and RAW12P formats","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, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]