summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/black_level.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-18 09:15:58 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-28 13:47:50 +0300
commitc1597f989654618f782012104f547b367082fa3e (patch)
tree7cbf0a2ff11609d0dbe60d145711f67a0f606ff6 /src/ipa/raspberrypi/controller/rpi/black_level.cpp
parent735f0ffeaac736f91c35774e575b1280ba868d69 (diff)
ipa: raspberrypi: Use YamlParser to replace dependency on boost
The Raspberry Pi IPA module depends on boost only to parse the JSON tuning data files. As libcamera depends on libyaml, use the YamlParser class to parse those files and drop the dependency on boost. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/black_level.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/black_level.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
index 749fcd7c..85baec3f 100644
--- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
@@ -31,13 +31,13 @@ char const *BlackLevel::name() const
return NAME;
}
-int BlackLevel::read(boost::property_tree::ptree const &params)
+int BlackLevel::read(const libcamera::YamlObject &params)
{
- uint16_t blackLevel = params.get<uint16_t>(
- "black_level", 4096); /* 64 in 10 bits scaled to 16 bits */
- blackLevelR_ = params.get<uint16_t>("black_level_r", blackLevel);
- blackLevelG_ = params.get<uint16_t>("black_level_g", blackLevel);
- blackLevelB_ = params.get<uint16_t>("black_level_b", blackLevel);
+ /* 64 in 10 bits scaled to 16 bits */
+ uint16_t blackLevel = params["black_level"].get<uint16_t>(4096);
+ blackLevelR_ = params["black_level_r"].get<uint16_t>(blackLevel);
+ blackLevelG_ = params["black_level_g"].get<uint16_t>(blackLevel);
+ blackLevelB_ = params["black_level_b"].get<uint16_t>(blackLevel);
LOG(RPiBlackLevel, Debug)
<< " Read black levels red " << blackLevelR_
<< " green " << blackLevelG_