summaryrefslogtreecommitdiff
path: root/src/ipa/mali-c55/mali-c55.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-11-15 12:25:37 +0000
committerDaniel Scally <dan.scally@ideasonboard.com>2024-12-17 22:35:59 +0000
commitfbea6a4c023cd0757c0a7e812763c1193916fc61 (patch)
treedca5e229c23a004b19339a446ed3d9531b449dc7 /src/ipa/mali-c55/mali-c55.cpp
parente8cae247e8ebd13f31c854dd8cd8d1b2929a8eb4 (diff)
ipa: mali-c55: Add BLC Algorithm
Add a Black Level Correction algorithm. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Acked-by: Nayden Kanchev <nayden.kanchev@arm.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'src/ipa/mali-c55/mali-c55.cpp')
-rw-r--r--src/ipa/mali-c55/mali-c55.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp
index e332c7a7..c6941a95 100644
--- a/src/ipa/mali-c55/mali-c55.cpp
+++ b/src/ipa/mali-c55/mali-c55.cpp
@@ -193,6 +193,16 @@ void IPAMaliC55::updateSessionConfiguration(const IPACameraSensorInfo &info,
context_.configuration.agc.defaultExposure = defExposure;
context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain);
context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain);
+
+ if (camHelper_->blackLevel().has_value()) {
+ /*
+ * The black level from CameraSensorHelper is a 16-bit value.
+ * The Mali-C55 ISP expects 20-bit settings, so we shift it to
+ * the appropriate width
+ */
+ context_.configuration.sensor.blackLevel =
+ camHelper_->blackLevel().value() << 4;
+ }
}
void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo,