libcamera: rkisp1: Create main buffer pool out of if(!isRaw)

The "useDewarper_" class variable is set to true during configure
only if the configuration is !isRaw.

The main path buffer pool creation can thus be moved out of the
if (!isRaw) block at allocateBuffers() time.

Cosmetic change that will make it easier to create a buffer pool
for the main and self paths unconditionally in future.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2024-10-28 10:32:00 +01:00
parent 5cb45181d7
commit e1d45a17f7
+8 -8
View File
@@ -927,16 +927,16 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)
ret = stat_->allocateBuffers(maxCount, &statBuffers_);
if (ret < 0)
goto error;
}
/* If the dewarper is being used, allocate internal buffers for ISP. */
if (useDewarper_) {
ret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_);
if (ret < 0)
goto error;
/* If the dewarper is being used, allocate internal buffers for ISP. */
if (useDewarper_) {
ret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_);
if (ret < 0)
goto error;
for (std::unique_ptr<FrameBuffer> &buffer : mainPathBuffers_)
availableMainPathBuffers_.push(buffer.get());
}
for (std::unique_ptr<FrameBuffer> &buffer : mainPathBuffers_)
availableMainPathBuffers_.push(buffer.get());
}
for (std::unique_ptr<FrameBuffer> &buffer : paramBuffers_) {