79f0fc937d
Multiple algorithms have an initialized_ flag that they set to true at the end of the init() function, and check at the beginning of prepare() to skip preparation. This serves no real purpose, as the flag can only be false if init() fails, in which case the IPA module initialization as a whole will fail. Drop the initialized_ flags. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
36 lines
800 B
C++
36 lines
800 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2021-2022, Ideas On Board
|
|
*
|
|
* gsl.h - RkISP1 Gamma Sensor Linearization control
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "algorithm.h"
|
|
|
|
namespace libcamera {
|
|
|
|
namespace ipa::rkisp1::algorithms {
|
|
|
|
class GammaSensorLinearization : public Algorithm
|
|
{
|
|
public:
|
|
GammaSensorLinearization();
|
|
~GammaSensorLinearization() = default;
|
|
|
|
int init(IPAContext &context, const YamlObject &tuningData) override;
|
|
void prepare(IPAContext &context, const uint32_t frame,
|
|
IPAFrameContext &frameContext,
|
|
rkisp1_params_cfg *params) override;
|
|
|
|
private:
|
|
uint32_t gammaDx_[2];
|
|
std::vector<uint16_t> curveYr_;
|
|
std::vector<uint16_t> curveYg_;
|
|
std::vector<uint16_t> curveYb_;
|
|
};
|
|
|
|
} /* namespace ipa::rkisp1::algorithms */
|
|
} /* namespace libcamera */
|