@@ -389,6 +389,10 @@ int SoftwareIspInstanceGpu::start()
if (initBayerShaders(inputPixelFormat_, outputPixelFormat_))
return -EINVAL;
+ /* Intermediary ping/pong textures */
+ eglImagePingPong_[0] = std::make_unique<eGLImage>(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);
+ eglImagePingPong_[1] = std::make_unique<eGLImage>(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE2, 2);
+
return 0;
}
@@ -396,6 +400,8 @@ void SoftwareIspInstanceGpu::stop()
{
eglImageOutCache_.clear();
eglImageInCache_.clear();
+ eglImagePingPong_[1].reset();
+ eglImagePingPong_[0].reset();
gpuIspShaderPassDemosiac_.stop();
@@ -71,6 +71,8 @@ private:
eGLImage *getCachedInputFrameBuffer(FrameBuffer *input, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer);
eGLImage *getCachedOutputFrameBuffer(FrameBuffer *output);
+ /* Pointer to object representing input texture */
+ std::unique_ptr<eGLImage> eglImagePingPong_[2];
/* Pointer to object representing input texture */
std::deque<std::pair<SharedFD, std::unique_ptr<eGLImage>>> eglImageInCache_;
Add in the Ping/Pong texture buffers, don't bind them to anything yet. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/libcamera/software_isp/software_isp_instance_gpu.cpp | 6 ++++++ src/libcamera/software_isp/software_isp_instance_gpu.h | 2 ++ 2 files changed, 8 insertions(+)