libcamera: software_isp: Drop unnecessary sanity check

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 <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Umang Jain 2024-06-24 19:18:57 +05:30
parent 67b24d2c4e
commit ec2402a1ad

View file

@ -287,12 +287,9 @@ int SoftwareIsp::exportBuffers(unsigned int output, unsigned int count,
int SoftwareIsp::queueBuffers(FrameBuffer *input, int SoftwareIsp::queueBuffers(FrameBuffer *input,
const std::map<unsigned int, FrameBuffer *> &outputs) const std::map<unsigned int, FrameBuffer *> &outputs)
{ {
unsigned int mask = 0;
/* /*
* Validate the outputs as a sanity check: at least one output is * Validate the outputs as a sanity check: at least one output is
* required, all outputs must reference a valid stream and no two * required, all outputs must reference a valid stream.
* outputs can reference the same stream.
*/ */
if (outputs.empty()) if (outputs.empty())
return -EINVAL; return -EINVAL;
@ -302,10 +299,6 @@ int SoftwareIsp::queueBuffers(FrameBuffer *input,
return -EINVAL; return -EINVAL;
if (index >= 1) /* only single stream atm */ if (index >= 1) /* only single stream atm */
return -EINVAL; return -EINVAL;
if (mask & (1 << index))
return -EINVAL;
mask |= 1 << index;
} }
process(input, outputs.at(0)); process(input, outputs.at(0));