From patchwork Mon Jun 24 13:48:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20364 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id EBDE5BD87C for ; Mon, 24 Jun 2024 13:49:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BA13B654B1; Mon, 24 Jun 2024 15:49:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vU0aFoJO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF9A2654A3 for ; Mon, 24 Jun 2024 15:49:16 +0200 (CEST) Received: from fedora.local (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BACC87E0; Mon, 24 Jun 2024 15:48:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719236934; bh=k1pNL9ibnmaP85g55/kdshlcCKbBLVbAo2d62DeoC00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vU0aFoJOW5do9s19vK7+xk/FTga5DzxS9UNLpFzj6clXZB4bdw+m4+oysJ4sSoFKu UIlT+IebUFkGr+9+eGT9gzZ0TSAAPPctJXBCCanQexfVosGz95UXI+j0G04jzZuv8s X0T6dkpb3tb+QLtvKFQmUSKoT2LkIZZoF00RssIo= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain , Kieran Bingham Subject: [PATCH v4 2/4] libcamera: software_isp: Drop unnecessary sanity check 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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently the soft-isp outputs a single output stream. Hence, drop the unnecessary check for stream indexes. Another reason to drop is actually the stream indexes is meant to be unique in outputs std::map<>, hence checking for unique stream indexes is redundant. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/libcamera/software_isp/software_isp.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 20fb6f48..3fb7ec8c 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -287,12 +287,9 @@ int SoftwareIsp::exportBuffers(unsigned int output, unsigned int count, int SoftwareIsp::queueBuffers(FrameBuffer *input, const std::map &outputs) { - unsigned int mask = 0; - /* * Validate the outputs as a sanity check: at least one output is - * required, all outputs must reference a valid stream and no two - * outputs can reference the same stream. + * required, all outputs must reference a valid stream. */ if (outputs.empty()) return -EINVAL; @@ -302,10 +299,6 @@ int SoftwareIsp::queueBuffers(FrameBuffer *input, return -EINVAL; if (index >= 1) /* only single stream atm */ return -EINVAL; - if (mask & (1 << index)) - return -EINVAL; - - mask |= 1 << index; } process(input, outputs.at(0));