{"id":20364,"url":"https://patchwork.libcamera.org/api/patches/20364/?format=json","web_url":"https://patchwork.libcamera.org/patch/20364/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20240624134859.171969-3-umang.jain@ideasonboard.com>","date":"2024-06-24T13:48:57","name":"[v4,2/4] libcamera: software_isp: Drop unnecessary sanity check","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9809a54e0fb1ea11a51b4081956c256b3152728a","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20364/mbox/","series":[{"id":4412,"url":"https://patchwork.libcamera.org/api/series/4412/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4412","date":"2024-06-24T13:48:55","name":"libcamera: converter: Replace usage of stream index by Stream pointer","version":4,"mbox":"https://patchwork.libcamera.org/series/4412/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20364/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20364/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 EBDE5BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jun 2024 13:49:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BA13B654B1;\n\tMon, 24 Jun 2024 15:49:20 +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 AF9A2654A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2024 15:49:16 +0200 (CEST)","from fedora.local (unknown\n\t[IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BACC87E0;\n\tMon, 24 Jun 2024 15:48:53 +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=\"vU0aFoJO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719236934;\n\tbh=k1pNL9ibnmaP85g55/kdshlcCKbBLVbAo2d62DeoC00=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vU0aFoJOW5do9s19vK7+xk/FTga5DzxS9UNLpFzj6clXZB4bdw+m4+oysJ4sSoFKu\n\tUIlT+IebUFkGr+9+eGT9gzZ0TSAAPPctJXBCCanQexfVosGz95UXI+j0G04jzZuv8s\n\tX0T6dkpb3tb+QLtvKFQmUSKoT2LkIZZoF00RssIo=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Umang Jain <umang.jain@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v4 2/4] libcamera: software_isp: Drop unnecessary sanity\n\tcheck","Date":"Mon, 24 Jun 2024 19:18:57 +0530","Message-ID":"<20240624134859.171969-3-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.44.0","In-Reply-To":"<20240624134859.171969-1-umang.jain@ideasonboard.com>","References":"<20240624134859.171969-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"Currently the soft-isp outputs a single output stream. Hence,\ndrop the unnecessary check for stream indexes.\n\nAnother reason to drop is actually the stream indexes is meant to be\nunique in outputs std::map<>, hence checking for unique stream indexes\nis redundant.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/software_isp/software_isp.cpp | 9 +--------\n 1 file changed, 1 insertion(+), 8 deletions(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex 20fb6f48..3fb7ec8c 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -287,12 +287,9 @@ int SoftwareIsp::exportBuffers(unsigned int output, unsigned int count,\n int SoftwareIsp::queueBuffers(FrameBuffer *input,\n \t\t\t      const std::map<unsigned int, FrameBuffer *> &outputs)\n {\n-\tunsigned int mask = 0;\n-\n \t/*\n \t * Validate the outputs as a sanity check: at least one output is\n-\t * required, all outputs must reference a valid stream and no two\n-\t * outputs can reference the same stream.\n+\t * required, all outputs must reference a valid stream.\n \t */\n \tif (outputs.empty())\n \t\treturn -EINVAL;\n@@ -302,10 +299,6 @@ int SoftwareIsp::queueBuffers(FrameBuffer *input,\n \t\t\treturn -EINVAL;\n \t\tif (index >= 1) /* only single stream atm */\n \t\t\treturn -EINVAL;\n-\t\tif (mask & (1 << index))\n-\t\t\treturn -EINVAL;\n-\n-\t\tmask |= 1 << index;\n \t}\n \n \tprocess(input, outputs.at(0));\n","prefixes":["v4","2/4"]}