[libcamera-devel] [PATCH v2 1/5] pipeline: rkisp1: Support IPA tuning file
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jun 16 10:18:11 CEST 2022
Hi Florian,
Thank you for the patch.
On Thu, Jun 16, 2022 at 10:07:40AM +0200, Florian Sylvestre via libcamera-devel wrote:
> Allow the usage of a Yaml IPA tuning file that is either defined by
s/Yaml/YAML/
> the sensor name (sensor_name.yaml) or defined by
> LIBCAMERA_RKISP1_TUNING_FILE environment variable.
>
> Signed-off-by: Florian Sylvestre <fsylvestre at baylibre.com>
You can pick the tags that you have received for the previous version of
a patch when you post the new version. This would be
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
with the small changes from this review applied.
If there's no other reason to send a v3, I can handle this when
applying.
> ---
> src/libcamera/pipeline/rkisp1/rkisp1.cpp | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 4b3d2cf7..96bf09e3 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -322,7 +322,18 @@ int RkISP1CameraData::loadIPA(unsigned int hwRevision)
> ipa_->paramsBufferReady.connect(this, &RkISP1CameraData::paramFilled);
> ipa_->metadataReady.connect(this, &RkISP1CameraData::metadataReady);
>
> - int ret = ipa_->init(IPASettings{ "", sensor_->model() }, hwRevision);
> + /*
> + * The API tuning file is made from the sensor name unless
> + * the environment variable overrides it.
> + */
> + std::string IPATunigFile;
ipaTuningFile
> + char const *configFromEnv = utils::secure_getenv("LIBCAMERA_RKISP1_TUNING_FILE");
> + if (!configFromEnv || *configFromEnv == '\0')
> + IPATunigFile = ipa_->configurationFile(sensor_->model() + ".yaml");
> + else
> + IPATunigFile = std::string(configFromEnv);
> +
> + int ret = ipa_->init({ IPATunigFile, sensor_->model() }, hwRevision);
> if (ret < 0) {
> LOG(RkISP1, Error) << "IPA initialization failure";
> return ret;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list