@@ -44,7 +44,7 @@ file structure:
pipelines:
simple:
devices:
- - driver: # driver name, e.g. `mxc-isi`
+ # driver name, e.g. `mxc-isi`:
software_isp: # true/false
software_isp:
copy_input_buffer: # true/false
@@ -79,7 +79,7 @@ Configuration file example
pipelines:
simple:
devices:
- - driver: mxc-isi
+ mxc-isi:
software_isp: true
software_isp:
copy_input_buffer: false
@@ -150,7 +150,7 @@ LIBCAMERA_SOFTISP_MODE, software_isp.mode
Example value: ``gpu``
-pipelines.simple.devices.driver, pipelines.simple.devices.software_isp
+pipelines.simple.devices.<driver>.software_isp
Override whether software ISP is enabled for the given driver.
Example `driver` value: ``mxc-isi``
@@ -1879,18 +1879,17 @@ bool SimplePipelineHandler::matchDevice(std::shared_ptr<MediaDevice> media,
}
swIspEnabled_ = info.swIspEnabled;
+
const GlobalConfiguration &configuration = cameraManager()->_d()->configuration();
- for (const ValueNode &entry :
- configuration.configuration()["pipelines"]["simple"]["devices"]
- .asList()) {
- auto name = entry["driver"].get<std::string>();
- if (name == info.driver) {
- swIspEnabled_ = entry["software_isp"].get<bool>().value_or(swIspEnabled_);
- LOG(SimplePipeline, Debug)
- << "Configuration file overrides software ISP for "
- << info.driver << " to " << swIspEnabled_;
- break;
- }
+ const ValueNode &cfg =
+ configuration.configuration()["pipelines"]["simple"]["devices"][info.driver];
+
+ if (auto enable = cfg["software_isp"].get<bool>()) {
+ swIspEnabled_ = *enable;
+
+ LOG(SimplePipeline, Debug)
+ << "Configuration file overrides software ISP for "
+ << info.driver << " to " << swIspEnabled_;
}
/* Locate the sensors. */