[{"id":29653,"web_url":"https://patchwork.libcamera.org/comment/29653/","msgid":"<171698072917.2248009.14528641495113596896@ping.linuxembedded.co.uk>","date":"2024-05-29T11:05:29","subject":"Re: [PATCH v2 2/4] libcamera: software_isp: Drop unnecessary sanity\n\tcheck","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Umang Jain (2024-05-29 08:02:46)\n> Currently the soft-isp outputs a single output stream. Hence,\n> drop the unnecessary check for stream indexes.\n> \n> Another reason to drop is actually the stream indexes is meant to be\n> unique in outputs std::map<>, hence checking for unique stream indexes\n> is redundant.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/libcamera/software_isp/software_isp.cpp | 9 +--------\n>  1 file changed, 1 insertion(+), 8 deletions(-)\n> \n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index c9b6be56..ac10d82d 100644\n> --- a/src/libcamera/software_isp/software_isp.cpp\n> +++ b/src/libcamera/software_isp/software_isp.cpp\n> @@ -267,12 +267,9 @@ int SoftwareIsp::exportBuffers(unsigned int output, unsigned int count,\n>  int SoftwareIsp::queueBuffers(FrameBuffer *input,\n>                               const std::map<unsigned int, FrameBuffer *> &outputs)\n>  {\n> -       unsigned int mask = 0;\n> -\n>         /*\n>          * Validate the outputs as a sanity check: at least one output is\n> -        * required, all outputs must reference a valid stream and no two\n> -        * outputs can reference the same stream.\n> +        * required, all outputs must reference a valid stream.\n>          */\n>         if (outputs.empty())\n>                 return -EINVAL;\n> @@ -282,10 +279,6 @@ int SoftwareIsp::queueBuffers(FrameBuffer *input,\n>                         return -EINVAL;\n>                 if (index >= 1) /* only single stream atm */\n>                         return -EINVAL;\n> -               if (mask & (1 << index))\n> -                       return -EINVAL;\n> -\n> -               mask |= 1 << index;\n>         }\n>  \n>         process(input, outputs.at(0));\n> -- \n> 2.44.0\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 6A495BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 May 2024 11:05:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 465C1634B7;\n\tWed, 29 May 2024 13:05:34 +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 968D86347E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 May 2024 13:05:32 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C2E724AB;\n\tWed, 29 May 2024 13:05:28 +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=\"ODKQnGl3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1716980728;\n\tbh=fncZlxzsp+sA62vyaq5nEZ7VTd1FfvIPEr56GCU7HWQ=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ODKQnGl3gQnIetXhi18yVFuLI7YNRg87KEUKx7bKWoELEhVCQGuJ4wfi+rYYjJ6w3\n\tE5P/hqlzUuZuqRmniswIW2w0/lqn4yesSPNjyGGS3qatEpq1S5Qk1e6Ir0kpxFy7RZ\n\tsOeoNJrC3cBbsxHdy/MGcvM3ZcrVeA9bbwrs2Zuk=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240529070248.12186-3-umang.jain@ideasonboard.com>","References":"<20240529070248.12186-1-umang.jain@ideasonboard.com>\n\t<20240529070248.12186-3-umang.jain@ideasonboard.com>","Subject":"Re: [PATCH v2 2/4] libcamera: software_isp: Drop unnecessary sanity\n\tcheck","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>,\n\tUmang Jain <umang.jain@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 29 May 2024 12:05:29 +0100","Message-ID":"<171698072917.2248009.14528641495113596896@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]