libcamera: pipeline: Move tuning file override handling to IPAProxy
The rkisp1 and rpi pipeline handlers duplicate code to handle the LIBCAMERA_RKISP1_TUNING_FILE and LIBCAMERA_RPI_TUNING_FILE environment variables that override tuning file selection. Move the common code to IPAProxy::configurationFile() to avoid the duplication, and make the feature available to all pipeline handlers with the same behaviour. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
@@ -380,18 +380,9 @@ int RkISP1CameraData::loadIPA(unsigned int hwRevision)
|
||||
ipa_->paramsComputed.connect(this, &RkISP1CameraData::paramsComputed);
|
||||
ipa_->metadataReady.connect(this, &RkISP1CameraData::metadataReady);
|
||||
|
||||
/*
|
||||
* The API tuning file is made from the sensor name unless the
|
||||
* environment variable overrides it.
|
||||
*/
|
||||
std::string ipaTuningFile;
|
||||
char const *configFromEnv = utils::secure_getenv("LIBCAMERA_RKISP1_TUNING_FILE");
|
||||
if (!configFromEnv || *configFromEnv == '\0') {
|
||||
ipaTuningFile =
|
||||
ipa_->configurationFile(sensor_->model() + ".yaml", "uncalibrated.yaml");
|
||||
} else {
|
||||
ipaTuningFile = std::string(configFromEnv);
|
||||
}
|
||||
/* The IPA tuning file is made from the sensor name. */
|
||||
std::string ipaTuningFile =
|
||||
ipa_->configurationFile(sensor_->model() + ".yaml", "uncalibrated.yaml");
|
||||
|
||||
IPACameraSensorInfo sensorInfo{};
|
||||
int ret = sensor_->sensorInfo(&sensorInfo);
|
||||
|
||||
Reference in New Issue
Block a user