@@ -42,6 +42,24 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData
return 0;
}
+int Ccm::init([[maybe_unused]] IPAContext &context)
+{
+ /* Initialize with identity CCM at standard D65 color temperature */
+ float identity[] = { 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1 };
+ Matrix<float, 3, 3> identityMatrix(identity);
+
+ std::map<unsigned int, Matrix<float, 3, 3>> ccmData;
+ ccmData[6500] = identityMatrix;
+
+ ccm_ = Interpolator<Matrix<float, 3, 3>>(std::move(ccmData));
+
+ context.ccmEnabled = true;
+ context.ctrlMap[&controls::Saturation] = ControlInfo(0.0f, 2.0f, 1.0f);
+ return 0;
+}
+
int Ccm::configure(IPAContext &context,
[[maybe_unused]] const IPAConfigInfo &configInfo)
{
@@ -26,6 +26,7 @@ public:
~Ccm() = default;
int init(IPAContext &context, const YamlObject &tuningData) override;
+ int init(IPAContext &context) override;
int configure(IPAContext &context,
const IPAConfigInfo &configInfo) override;
void queueRequest(typename Module::Context &context,
This is an overloaded init() routine that allows the CCM class to self enumerate a default identity CCM at colour temperature 6500k. This is required for the case where we are running GPUISP but don't have a CCM for the sensor. In this case we want to generate a default CCM and use it instead of using the CPUISP's lookup tables. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/ipa/simple/algorithms/ccm.cpp | 18 ++++++++++++++++++ src/ipa/simple/algorithms/ccm.h | 1 + 2 files changed, 19 insertions(+)