[{"id":17332,"web_url":"https://patchwork.libcamera.org/comment/17332/","msgid":"<026832a4-269e-6b01-7b58-26e040aadc4c@ideasonboard.com>","date":"2021-05-27T13:47:11","subject":"Re: [libcamera-devel] [PATCH] Revert \"libcamera: ipu3: imgu: Add\n\tpipe calculation debug\"","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo\n\nOn 5/27/21 5:39 PM, Jacopo Mondi wrote:\n> This reverts commit 5b015e96ccdbcd87b4ba6484199652fec5cdb38a.\n>\n> The ImgU pipe configuration debug is useful to test the correctness\n> of the parameters computation against the Intel Python script.\n>\n> However, the number of debug messages which is printed out by the\n> configuration procedure is so high it floods the logs, up to the point\n> that starting the Android camera3 HAL, which tests several configurations\n> at startup, becomes so slow it is barely usable.\n>\n> Revert the patch that adds the excessive debug statements, which are mostly\n> useful only when testing the configuration procedure.\n>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\nAcked-by: Umang Jain <umang.jain@ideasonboard.com>\n>\n> ---\n>   src/libcamera/pipeline/ipu3/imgu.cpp | 34 ++++------------------------\n>   1 file changed, 4 insertions(+), 30 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 6bfd23bee3ca..3e517ac67962 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -23,7 +23,6 @@\n>   namespace libcamera {\n>\n>   LOG_DECLARE_CATEGORY(IPU3)\n> -LOG_DEFINE_CATEGORY(ImgUPipe)\n>\n>   namespace {\n>\n> @@ -129,8 +128,6 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>   \tunsigned int ifHeight;\n>   \tfloat bdsHeight;\n>\n> -\tLOG(ImgUPipe, Debug) << \"BDS sf: \" << bdsSF << \", BDS width: \" << bdsWidth;\n> -\n>   \tif (!isSameRatio(pipe->input, gdc)) {\n>   \t\tunsigned int foundIfHeight = 0;\n>   \t\tfloat estIFHeight = (iif.width * gdc.height) /\n> @@ -138,9 +135,6 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>   \t\testIFHeight = std::clamp<float>(estIFHeight, minIFHeight, iif.height);\n>\n>   \t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> -\t\tLOG(ImgUPipe, Debug) << \"Estimated IF Height: \" << estIFHeight\n> -\t\t\t\t     << \", IF Height: \" << ifHeight;\n> -\n>   \t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n>   \t\t       ifHeight / bdsSF >= minBDSHeight) {\n>\n> @@ -176,15 +170,9 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>\n>   \t\tif (foundIfHeight) {\n>   \t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n> -\t\t\tSize foundIf{ iif.width, foundIfHeight };\n> -\t\t\tSize foundBds{ bdsWidth, bdsIntHeight };\n>\n> -\t\t\tLOG(ImgUPipe, Debug)\n> -\t\t\t\t<< \"IF: \" << foundIf.toString()\n> -\t\t\t\t<< \", BDS: \" << foundBds.toString()\n> -\t\t\t\t<< \", GDC: \" << gdc.toString();\n> -\n> -\t\t\tpipeConfigs.push_back({ bdsSF, foundIf, foundBds, gdc });\n> +\t\t\tpipeConfigs.push_back({ bdsSF, { iif.width, foundIfHeight },\n> +\t\t\t\t\t\t{ bdsWidth, bdsIntHeight }, gdc });\n>   \t\t\treturn;\n>   \t\t}\n>   \t} else {\n> @@ -197,15 +185,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>\n>   \t\t\t\tif (!(ifHeight % IF_ALIGN_H) &&\n>   \t\t\t\t    !(bdsIntHeight % BDS_ALIGN_H)) {\n> -\t\t\t\t\tSize foundIf{ iif.width, ifHeight };\n> -\t\t\t\t\tSize foundBds{ bdsWidth, bdsIntHeight };\n> -\n> -\t\t\t\t\tLOG(ImgUPipe, Debug)\n> -\t\t\t\t\t\t<< \"IF: \" << foundIf.toString()\n> -\t\t\t\t\t\t<< \", BDS: \" << foundBds.toString()\n> -\t\t\t\t\t\t<< \", GDC: \" << gdc.toString();\n> -\n> -\t\t\t\t\tpipeConfigs.push_back({ bdsSF, foundIf, foundBds, gdc });\n> +\t\t\t\t\tpipeConfigs.push_back({ bdsSF, { iif.width, ifHeight },\n> +\t\t\t\t\t\t\t\t{ bdsWidth, bdsIntHeight }, gdc });\n>   \t\t\t\t}\n>   \t\t\t}\n>\n> @@ -283,8 +264,6 @@ Size calculateGDC(ImgUDevice::Pipe *pipe)\n>   \tgdc.width = main.width * sf;\n>   \tgdc.height = main.height * sf;\n>\n> -\tLOG(ImgUPipe, Debug) << \"GDC: \" << gdc.toString();\n> -\n>   \treturn gdc;\n>   }\n>\n> @@ -302,11 +281,6 @@ FOV calcFOV(const Size &in, const ImgUDevice::PipeConfig &pipe)\n>   \tfov.w = (inW - (ifCropW + gdcCropW)) / inW;\n>   \tfov.h = (inH - (ifCropH + gdcCropH)) / inH;\n>\n> -\tLOG(ImgUPipe, Debug)\n> -\t\t<< \"IF (\" << pipe.iif.toString() << \") - BDS (\"\n> -\t\t<< pipe.bds.toString() << \") - GDC (\" << pipe.gdc.toString()\n> -\t\t<< \") -> FOV: \" << fov.w << \"x\" << fov.h;\n> -\n>   \treturn fov;\n>   }\n>\n> --\n> 2.31.1\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 18A37BDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 May 2021 13:47:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68441602AE;\n\tThu, 27 May 2021 15:47:35 +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 71E82602AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 15:47:33 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.189])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 170DEED;\n\tThu, 27 May 2021 15:47:27 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kA23fWdt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622123253;\n\tbh=zc2amwjPjd35TzyzXx5N0MxJsG5lk82msrZOcZm8sZo=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=kA23fWdtDT6bwzIe/WDiCyK3wfPXcZn9gnsR3RkQ8iwI7Km1uDtef7ew+8m2TavUy\n\tKVMd0kgdBoZFmdhPXSaXnNtn1fEvRvGmpWMIhSXkjITYBtB8fudmBufOPeaoI9eJPI\n\tbElfiUgxSIX9KhIMzgvlaw25mR1rp9UA8RgXaTGc=","To":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20210527120920.28936-1-jacopo@jmondi.org>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<026832a4-269e-6b01-7b58-26e040aadc4c@ideasonboard.com>","Date":"Thu, 27 May 2021 19:17:11 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<20210527120920.28936-1-jacopo@jmondi.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] Revert \"libcamera: ipu3: imgu: Add\n\tpipe calculation debug\"","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>"}},{"id":17333,"web_url":"https://patchwork.libcamera.org/comment/17333/","msgid":"<YK+oj0rAMUHTFdbq@pendragon.ideasonboard.com>","date":"2021-05-27T14:11:27","subject":"Re: [libcamera-devel] [PATCH] Revert \"libcamera: ipu3: imgu: Add\n\tpipe calculation debug\"","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, May 27, 2021 at 02:09:20PM +0200, Jacopo Mondi wrote:\n> This reverts commit 5b015e96ccdbcd87b4ba6484199652fec5cdb38a.\n> \n> The ImgU pipe configuration debug is useful to test the correctness\n> of the parameters computation against the Intel Python script.\n> \n> However, the number of debug messages which is printed out by the\n> configuration procedure is so high it floods the logs, up to the point\n> that starting the Android camera3 HAL, which tests several configurations\n> at startup, becomes so slow it is barely usable.\n> \n> Revert the patch that adds the excessive debug statements, which are mostly\n> useful only when testing the configuration procedure.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/ipu3/imgu.cpp | 34 ++++------------------------\n>  1 file changed, 4 insertions(+), 30 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 6bfd23bee3ca..3e517ac67962 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -23,7 +23,6 @@\n>  namespace libcamera {\n> \n>  LOG_DECLARE_CATEGORY(IPU3)\n> -LOG_DEFINE_CATEGORY(ImgUPipe)\n> \n>  namespace {\n> \n> @@ -129,8 +128,6 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>  \tunsigned int ifHeight;\n>  \tfloat bdsHeight;\n> \n> -\tLOG(ImgUPipe, Debug) << \"BDS sf: \" << bdsSF << \", BDS width: \" << bdsWidth;\n> -\n>  \tif (!isSameRatio(pipe->input, gdc)) {\n>  \t\tunsigned int foundIfHeight = 0;\n>  \t\tfloat estIFHeight = (iif.width * gdc.height) /\n> @@ -138,9 +135,6 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>  \t\testIFHeight = std::clamp<float>(estIFHeight, minIFHeight, iif.height);\n> \n>  \t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> -\t\tLOG(ImgUPipe, Debug) << \"Estimated IF Height: \" << estIFHeight\n> -\t\t\t\t     << \", IF Height: \" << ifHeight;\n> -\n>  \t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n>  \t\t       ifHeight / bdsSF >= minBDSHeight) {\n> \n> @@ -176,15 +170,9 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n> \n>  \t\tif (foundIfHeight) {\n>  \t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n> -\t\t\tSize foundIf{ iif.width, foundIfHeight };\n> -\t\t\tSize foundBds{ bdsWidth, bdsIntHeight };\n> \n> -\t\t\tLOG(ImgUPipe, Debug)\n> -\t\t\t\t<< \"IF: \" << foundIf.toString()\n> -\t\t\t\t<< \", BDS: \" << foundBds.toString()\n> -\t\t\t\t<< \", GDC: \" << gdc.toString();\n> -\n> -\t\t\tpipeConfigs.push_back({ bdsSF, foundIf, foundBds, gdc });\n> +\t\t\tpipeConfigs.push_back({ bdsSF, { iif.width, foundIfHeight },\n> +\t\t\t\t\t\t{ bdsWidth, bdsIntHeight }, gdc });\n>  \t\t\treturn;\n>  \t\t}\n>  \t} else {\n> @@ -197,15 +185,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n> \n>  \t\t\t\tif (!(ifHeight % IF_ALIGN_H) &&\n>  \t\t\t\t    !(bdsIntHeight % BDS_ALIGN_H)) {\n> -\t\t\t\t\tSize foundIf{ iif.width, ifHeight };\n> -\t\t\t\t\tSize foundBds{ bdsWidth, bdsIntHeight };\n> -\n> -\t\t\t\t\tLOG(ImgUPipe, Debug)\n> -\t\t\t\t\t\t<< \"IF: \" << foundIf.toString()\n> -\t\t\t\t\t\t<< \", BDS: \" << foundBds.toString()\n> -\t\t\t\t\t\t<< \", GDC: \" << gdc.toString();\n> -\n> -\t\t\t\t\tpipeConfigs.push_back({ bdsSF, foundIf, foundBds, gdc });\n> +\t\t\t\t\tpipeConfigs.push_back({ bdsSF, { iif.width, ifHeight },\n> +\t\t\t\t\t\t\t\t{ bdsWidth, bdsIntHeight }, gdc });\n>  \t\t\t\t}\n>  \t\t\t}\n> \n> @@ -283,8 +264,6 @@ Size calculateGDC(ImgUDevice::Pipe *pipe)\n>  \tgdc.width = main.width * sf;\n>  \tgdc.height = main.height * sf;\n> \n> -\tLOG(ImgUPipe, Debug) << \"GDC: \" << gdc.toString();\n> -\n>  \treturn gdc;\n>  }\n> \n> @@ -302,11 +281,6 @@ FOV calcFOV(const Size &in, const ImgUDevice::PipeConfig &pipe)\n>  \tfov.w = (inW - (ifCropW + gdcCropW)) / inW;\n>  \tfov.h = (inH - (ifCropH + gdcCropH)) / inH;\n> \n> -\tLOG(ImgUPipe, Debug)\n> -\t\t<< \"IF (\" << pipe.iif.toString() << \") - BDS (\"\n> -\t\t<< pipe.bds.toString() << \") - GDC (\" << pipe.gdc.toString()\n> -\t\t<< \") -> FOV: \" << fov.w << \"x\" << fov.h;\n> -\n>  \treturn fov;\n>  }\n> \n> --\n> 2.31.1\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 9A8E5C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 May 2021 14:11:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0752A602AE;\n\tThu, 27 May 2021 16:11:37 +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 533CE602AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 16:11:35 +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 9A0EFBB1;\n\tThu, 27 May 2021 16:11:34 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bzcNXVbZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622124695;\n\tbh=1LkX9QY0o6PQWWuXNiD4Dal1Ls+kX7bQz+nt55Eu6AA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bzcNXVbZEvlFt5xqv/zXm6TOcQxAas4paaBqv2zka8BvRCEOIBJTKx/xZjjALH3We\n\tIvmih7HvPyzKOJWs3Vaxmp1xu31w1o8ZL5AU6mrF6iiv4CwchkD1QTFP+efyPlR8h9\n\t1LOP44B5pJyHxyVqIMxX84GFjfLbb7F/Jmdb2wPk=","Date":"Thu, 27 May 2021 17:11:27 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YK+oj0rAMUHTFdbq@pendragon.ideasonboard.com>","References":"<20210527120920.28936-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210527120920.28936-1-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH] Revert \"libcamera: ipu3: imgu: Add\n\tpipe calculation debug\"","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]