libcamera: software_isp: Start the ISP thread in configure
OpenGL is not thread-safe and in fact associates invisible handles with the threadid of the calling context. As a result we need to make configure() and process() in SoftISP execute on the same thread. Move start thread into configure() as a first step towards this. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
This commit is contained in:
parent
8ca941b7b5
commit
87ccbc69ca
1 changed files with 3 additions and 3 deletions
|
@ -159,8 +159,6 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
|
||||||
metadataReady.emit(frame, metadata);
|
metadataReady.emit(frame, metadata);
|
||||||
});
|
});
|
||||||
ipa_->setSensorControls.connect(this, &SoftwareIsp::setSensorCtrls);
|
ipa_->setSensorControls.connect(this, &SoftwareIsp::setSensorCtrls);
|
||||||
|
|
||||||
debayer_->moveToThread(&ispWorkerThread_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SoftwareIsp::~SoftwareIsp()
|
SoftwareIsp::~SoftwareIsp()
|
||||||
|
@ -262,6 +260,9 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
debayer_->moveToThread(&ispWorkerThread_);
|
||||||
|
ispWorkerThread_.start();
|
||||||
|
|
||||||
return debayer_->configure(inputCfg, outputCfgs, ccmEnabled_);
|
return debayer_->configure(inputCfg, outputCfgs, ccmEnabled_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +344,6 @@ int SoftwareIsp::start()
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ispWorkerThread_.start();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue