libcamera: software_isp: Move Bayer params init from DebayerCpu to Debayer
Move the initialisation of Bayer params and CCM to a new constructor in the Debayer class. Ensure we call the base class constructor from DebayerCpu's constructor in the expected constructor order Debayer then DebayerCpu. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
d635cd884e
commit
cafb39b257
@@ -109,6 +109,17 @@ namespace libcamera {
|
||||
|
||||
LOG_DEFINE_CATEGORY(Debayer)
|
||||
|
||||
Debayer::Debayer(const GlobalConfiguration &configuration) : bench_(configuration)
|
||||
{
|
||||
/* Initialize color lookup tables */
|
||||
for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
|
||||
red_[i] = green_[i] = blue_[i] = i;
|
||||
redCcm_[i] = { static_cast<int16_t>(i), 0, 0 };
|
||||
greenCcm_[i] = { 0, static_cast<int16_t>(i), 0 };
|
||||
blueCcm_[i] = { 0, 0, static_cast<int16_t>(i) };
|
||||
}
|
||||
}
|
||||
|
||||
Debayer::~Debayer()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ LOG_DECLARE_CATEGORY(Debayer)
|
||||
class Debayer : public Object
|
||||
{
|
||||
public:
|
||||
Debayer(const GlobalConfiguration &configuration) : bench_(configuration) {};
|
||||
Debayer(const GlobalConfiguration &configuration);
|
||||
virtual ~Debayer() = 0;
|
||||
|
||||
virtual int configure(const StreamConfiguration &inputCfg,
|
||||
|
||||
@@ -57,14 +57,6 @@ DebayerCpu::DebayerCpu(std::unique_ptr<SwStatsCpu> stats, const GlobalConfigurat
|
||||
*/
|
||||
enableInputMemcpy_ =
|
||||
configuration.option<bool>({ "software_isp", "copy_input_buffer" }).value_or(true);
|
||||
|
||||
/* Initialize color lookup tables */
|
||||
for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
|
||||
red_[i] = green_[i] = blue_[i] = i;
|
||||
redCcm_[i] = { static_cast<int16_t>(i), 0, 0 };
|
||||
greenCcm_[i] = { 0, static_cast<int16_t>(i), 0 };
|
||||
blueCcm_[i] = { 0, 0, static_cast<int16_t>(i) };
|
||||
}
|
||||
}
|
||||
|
||||
DebayerCpu::~DebayerCpu() = default;
|
||||
|
||||
Reference in New Issue
Block a user