summaryrefslogtreecommitdiff
path: root/src/ipa/simple/algorithms/lut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/simple/algorithms/lut.cpp')
-rw-r--r--src/ipa/simple/algorithms/lut.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
index a06cdeba..e8638f27 100644
--- a/src/ipa/simple/algorithms/lut.cpp
+++ b/src/ipa/simple/algorithms/lut.cpp
@@ -87,9 +87,11 @@ int16_t Lut::ccmValue(unsigned int i, float ccm) const
void Lut::prepare(IPAContext &context,
[[maybe_unused]] const uint32_t frame,
- [[maybe_unused]] IPAFrameContext &frameContext,
+ IPAFrameContext &frameContext,
DebayerParams *params)
{
+ frameContext.contrast = context.activeState.knobs.contrast;
+
/*
* Update the gamma table if needed. This means if black level changes
* and since the black level gets updated only if a lower value is
@@ -139,6 +141,17 @@ void Lut::prepare(IPAContext &context,
}
}
+void Lut::process([[maybe_unused]] IPAContext &context,
+ [[maybe_unused]] const uint32_t frame,
+ [[maybe_unused]] IPAFrameContext &frameContext,
+ [[maybe_unused]] const SwIspStats *stats,
+ ControlList &metadata)
+{
+ const auto &contrast = frameContext.contrast;
+ if (contrast)
+ metadata.set(controls::Contrast, contrast.value());
+}
+
REGISTER_IPA_ALGORITHM(Lut, "Lut")
} /* namespace ipa::soft::algorithms */