<div dir="ltr"><div dir="ltr">Hi everyone,<div><br></div><div>Victor, thanks for the patch!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 10 Jan 2022 at 09:37, Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com" target="_blank">kieran.bingham@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Laurent,<br>
<br>
Quoting Laurent Pinchart (2022-01-09 02:32:25)<br>
> Hi Victor,<br>
> <br>
> On Sun, Jan 09, 2022 at 01:52:53AM +0100, Victor Westerhuis wrote:<br>
> > Laurent Pinchart schreef op 08.01.2022 23:19:<br>
> > > On Sat, Jan 08, 2022 at 09:47:36PM +0000, Kieran Bingham wrote:<br>
> > >> Quoting <a href="mailto:victor@westerhu.is" target="_blank">victor@westerhu.is</a> (2022-01-07 20:51:05)<br>
> > >> > From 4f419bd0310462616a107c89510a4864a3b8db31 Mon Sep 17 00:00:00 2001<br>
> > >> > From: Victor Westerhuis <<a href="mailto:victor@westerhu.is" target="_blank">victor@westerhu.is</a>><br>
> > >> > Date: Fri, 7 Jan 2022 17:10:53 +0100<br>
> > >> > Subject: [PATCH] Fix build with LTO enabled<br>
> > >> ><br>
> > >> > libcamera::RPi::Controls in raspberrypi.h depends on<br>
> > >> > libcamera::controls::controls in control_ids.cpp, instantiated<br>
> > >> > from <a href="http://control_ids.cpp.in" rel="noreferrer" target="_blank">control_ids.cpp.in</a>.<br>
> > >> ><br>
> > >> > The order of initialization is not defined between these two<br>
> > >> > namespace scope objects. This patch changes RPi::Controls to a<br>
> > >> > function-level static, initialized on first use and therefore<br>
> > >> > safe to use.<br>
> > >> ><br>
> > >> > This leads to warnings about getControls not being used in<br>
> > >> > src/ipa/raspberrypi/raspberrypi.cpp and<br>
> > >> > src/libcamera/pipeline/raspberrypi/rpi_stream.cpp<br>
> > >> > (through src/libcamera/pipeline/raspberrypi/rpi_stream.h).<br>
> > >> > This patch therefore drops the include without ill effects.<br>
> > >> ><br>
> > >> > Signed-off-by: Victor Westerhuis <<a href="mailto:victor@westerhu.is" target="_blank">victor@westerhu.is</a>><br>
> > >> > ---<br>
> > >> > This patch fixes <a href="https://bugs.libcamera.org/show_bug.cgi?id=83" rel="noreferrer" target="_blank">https://bugs.libcamera.org/show_bug.cgi?id=83</a><br>
> > >> ><br>
> > >> > Perhaps this data should not be in a header at all?<br>
> > >> <br>
> > >> Looking at this patch, it certainly looks like this should be moved to<br>
> > >> the .cpp file, and doesn't need to be in the .h file.<br>
> > > <br>
> > > The reason why the ControlInfoMap is defined in the header file is that<br>
> > > it's used by the IPA module and the pipeline handler. If you moved it to<br>
> > > a .cpp file on one side, it wouldn't be accessible to the other side.<br>
> ><br>
> > While writing my patch, I noticed that the data in the header is not <br>
> > currently referenced elsewhere. That's why after changing the variable <br>
> > to a getter function I had to remove the include from two other files, <br>
> > to prevent a warning about unused functions.<br>
> <br>
> That's a good point, but conceptually, this is data that is part of the<br>
> IPA module, and is used by the pipeline handler. We could move it to the<br>
> pipeline handler implementation, but it means it would need to change<br>
> when the IPA changes, which isn't right. Storing it in the IPA module<br>
> and passing it to the pipeline handler at init time would be better.<br>
> <br>
> How about the following (untested) patch ?<br>
> <br>
> From: Victor Westerhuis <<a href="mailto:victor@westerhu.is" target="_blank">victor@westerhu.is</a>><br>
> Date: Sun, 9 Jan 2022 04:27:51 +0200<br>
> Subject: [PATCH] ipa: raspberrypi: Fix build with LTO enabled<br>
> <br>
> libcamera::RPi::Controls in raspberrypi.h depends on<br>
> libcamera::controls::controls in control_ids.cpp, instantiated from<br>
> <a href="http://control_ids.cpp.in" rel="noreferrer" target="_blank">control_ids.cpp.in</a>.<br>
> <br>
> The order of initialization is not defined between these two namespace<br>
> scope objects, resulting in a runtime failure when compiling with LTO<br>
> enabled.<br>
> <br>
> To solve this, address the long-standing issue of the ControlInfoMap<br>
> being defined in a shared header, by moving it to the Raspberry Pi IPA<br>
> and passing it to the pipeline handler through the IPA init() function.<br>
> <br>
> Bug: <a href="https://bugs.libcamera.org/show_bug.cgi?id=83" rel="noreferrer" target="_blank">https://bugs.libcamera.org/show_bug.cgi?id=83</a><br>
> Signed-off-by: Victor Westerhuis <<a href="mailto:victor@westerhu.is" target="_blank">victor@westerhu.is</a>><br>
> Signed-off-by: Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank">laurent.pinchart@ideasonboard.com</a>><br>
> ---<br>
>  include/libcamera/ipa/raspberrypi.h           | 55 -------------------<br>
>  include/libcamera/ipa/raspberrypi.mojom       |  3 +-<br>
>  src/ipa/raspberrypi/raspberrypi.cpp           | 39 ++++++++++++-<br>
>  .../pipeline/raspberrypi/raspberrypi.cpp      | 15 +++--<br>
>  .../pipeline/raspberrypi/rpi_stream.h         |  1 -<br>
>  5 files changed, 47 insertions(+), 66 deletions(-)<br>
>  delete mode 100644 include/libcamera/ipa/raspberrypi.h<br>
> <br>
> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h<br>
> deleted file mode 100644<br>
> index 7f705e49411d..000000000000<br>
> --- a/include/libcamera/ipa/raspberrypi.h<br>
> +++ /dev/null<br>
> @@ -1,55 +0,0 @@<br>
> -/* SPDX-License-Identifier: LGPL-2.1-or-later */<br>
> -/*<br>
> - * Copyright (C) 2019-2020, Raspberry Pi Ltd.<br>
> - *<br>
> - * raspberrypi.h - Image Processing Algorithm interface for Raspberry Pi<br>
> - */<br>
> -<br>
> -#pragma once<br>
> -<br>
> -#include <stdint.h><br>
> -<br>
> -#include <libcamera/control_ids.h><br>
> -#include <libcamera/controls.h><br>
> -<br>
> -#ifndef __DOXYGEN__<br>
> -<br>
> -namespace libcamera {<br>
> -<br>
> -namespace RPi {<br>
> -<br>
> -/*<br>
> - * List of controls handled by the Raspberry Pi IPA<br>
> - *<br>
> - * \todo This list will need to be built dynamically from the control<br>
> - * algorithms loaded by the json file, once this is supported. At that<br>
> - * point applications should check first whether a control is supported,<br>
> - * and the pipeline handler may be reverted so that it aborts when an<br>
> - * unsupported control is encountered.<br>
> - */<br>
> -static const ControlInfoMap Controls({<br>
> -               { &controls::AeEnable, ControlInfo(false, true) },<br>
> -               { &controls::ExposureTime, ControlInfo(0, 999999) },<br>
> -               { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },<br>
> -               { &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },<br>
> -               { &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },<br>
> -               { &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },<br>
> -               { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },<br>
> -               { &controls::AwbEnable, ControlInfo(false, true) },<br>
> -               { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },<br>
> -               { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },<br>
> -               { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },<br>
> -               { &controls::Contrast, ControlInfo(0.0f, 32.0f) },<br>
> -               { &controls::Saturation, ControlInfo(0.0f, 32.0f) },<br>
> -               { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },<br>
> -               { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },<br>
> -               { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
> -               { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },<br>
> -               { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }<br>
> -       }, controls::controls);<br>
> -<br>
> -} /* namespace RPi */<br>
> -<br>
> -} /* namespace libcamera */<br>
> -<br>
> -#endif /* __DOXYGEN__ */<br>
> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom<br>
> index acd3cafe6c91..275cf946ee9a 100644<br>
> --- a/include/libcamera/ipa/raspberrypi.mojom<br>
> +++ b/include/libcamera/ipa/raspberrypi.mojom<br>
> @@ -45,7 +45,8 @@ struct StartConfig {<br>
>  <br>
>  interface IPARPiInterface {<br>
>         init(libcamera.IPASettings settings)<br>
> -               => (int32 ret, SensorConfig sensorConfig);<br>
> +               => (int32 ret, SensorConfig sensorConfig,<br>
> +                   libcamera.ControlInfoMap controls);<br>
>         start(libcamera.ControlList controls) => (StartConfig startConfig);<br>
>         stop();<br>
>  <br>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp<br>
> index 677126a3a2b3..e919d91e4c33 100644<br>
> --- a/src/ipa/raspberrypi/raspberrypi.cpp<br>
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp<br>
> @@ -24,7 +24,6 @@<br>
>  #include <libcamera/framebuffer.h><br>
>  #include <libcamera/ipa/ipa_interface.h><br>
>  #include <libcamera/ipa/ipa_module_info.h><br>
> -#include <libcamera/ipa/raspberrypi.h><br>
>  #include <libcamera/ipa/raspberrypi_ipa_interface.h><br>
>  #include <libcamera/request.h><br>
>  <br>
> @@ -89,7 +88,8 @@ public:<br>
>                         munmap(lsTable_, ipa::RPi::MaxLsGridSize);<br>
>         }<br>
>  <br>
> -       int init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig) override;<br>
> +       int init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig,<br>
> +                ControlInfoMap *ipaControls) override;<br>
>         void start(const ControlList &controls, ipa::RPi::StartConfig *startConfig) override;<br>
>         void stop() override {}<br>
>  <br>
> @@ -175,8 +175,39 @@ private:<br>
>         Duration maxFrameDuration_;<br>
>  };<br>
>  <br>
> -int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig)<br>
> +int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig,<br>
> +                ControlInfoMap *ipaControls)<br>
>  {<br>
> +       /*<br>
> +        * List of controls handled by the Raspberry Pi IPA<br>
> +        *<br>
> +        * \todo This list will need to be built dynamically from the control<br>
> +        * algorithms loaded by the json file, once this is supported. At that<br>
> +        * point applications should check first whether a control is supported,<br>
> +        * and the pipeline handler may be reverted so that it aborts when an<br>
> +        * unsupported control is encountered.<br>
> +        */<br>
> +       static const ControlInfoMap rpiControls({<br>
> +               { &controls::AeEnable, ControlInfo(false, true) },<br>
> +               { &controls::ExposureTime, ControlInfo(0, 999999) },<br>
> +               { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },<br>
> +               { &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },<br>
> +               { &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },<br>
> +               { &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },<br>
> +               { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },<br>
> +               { &controls::AwbEnable, ControlInfo(false, true) },<br>
> +               { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },<br>
> +               { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },<br>
> +               { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },<br>
> +               { &controls::Contrast, ControlInfo(0.0f, 32.0f) },<br>
> +               { &controls::Saturation, ControlInfo(0.0f, 32.0f) },<br>
> +               { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },<br>
> +               { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },<br>
> +               { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
<br>
Is the ScalerCrop an IPA related control?<br></blockquote><div><br></div><div>Scaler crop is to only control in this list that does not really belong in the IPA. Perhaps</div><div>there needs to be 2 lists of controls, one for the IPA and one for the pipeline handler?</div><div>Not the biggest fan of this approach :(</div><div><br></div><div>If one list is acceptable, I am happy to remove it from the header and keep in a separate</div><div>cpp file.</div><div><br></div><div>Thanks,</div><div>Naush</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
--<br>
Kieran<br>
<br>
<br>
<br>
> +               { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },<br>
> +               { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }<br>
> +       }, controls::controls);<br>
> +<br>
>         /*<br>
>          * Load the "helper" for this sensor. This tells us all the device specific stuff<br>
>          * that the kernel driver doesn't. We only do this the first time; we don't need<br>
> @@ -206,6 +237,8 @@ int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConf<br>
>         controller_.Read(settings.configurationFile.c_str());<br>
>         controller_.Initialise();<br>
>  <br>
> +       *ipaControls = rpiControls;<br>
> +<br>
>         return 0;<br>
>  }<br>
>  <br>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> index 49d7ff23209f..c9bffd647068 100644<br>
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> @@ -20,7 +20,6 @@<br>
>  #include <libcamera/camera.h><br>
>  #include <libcamera/control_ids.h><br>
>  #include <libcamera/formats.h><br>
> -#include <libcamera/ipa/raspberrypi.h><br>
>  #include <libcamera/ipa/raspberrypi_ipa_interface.h><br>
>  #include <libcamera/ipa/raspberrypi_ipa_proxy.h><br>
>  #include <libcamera/logging.h><br>
> @@ -191,7 +190,8 @@ public:<br>
>  <br>
>         void frameStarted(uint32_t sequence);<br>
>  <br>
> -       int loadIPA(ipa::RPi::SensorConfig *sensorConfig);<br>
> +       int loadIPA(ipa::RPi::SensorConfig *sensorConfig,<br>
> +                   ControlInfoMap *ipaControls);<br>
>         int configureIPA(const CameraConfiguration *config);<br>
>  <br>
>         void enumerateVideoDevices(MediaLink *link);<br>
> @@ -1199,7 +1199,9 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me<br>
>         data->sensorFormats_ = populateSensorFormats(data->sensor_);<br>
>  <br>
>         ipa::RPi::SensorConfig sensorConfig;<br>
> -       if (data->loadIPA(&sensorConfig)) {<br>
> +       ControlInfoMap ipaControls;<br>
> +<br>
> +       if (data->loadIPA(&sensorConfig, &ipaControls)) {<br>
>                 LOG(RPI, Error) << "Failed to load a suitable IPA library";<br>
>                 return -EINVAL;<br>
>         }<br>
> @@ -1250,7 +1252,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me<br>
>         data->sensorMetadata_ = sensorConfig.sensorMetadata;<br>
>  <br>
>         /* Register the controls that the Raspberry Pi IPA can handle. */<br>
> -       data->controlInfo_ = RPi::Controls;<br>
> +       data->controlInfo_ = ipaControls;<br>
>         /* Initialize the camera properties. */<br>
>         data->properties_ = data->sensor_->properties();<br>
>  <br>
> @@ -1467,7 +1469,8 @@ void RPiCameraData::frameStarted(uint32_t sequence)<br>
>         delayedCtrls_->applyControls(sequence);<br>
>  }<br>
>  <br>
> -int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig)<br>
> +int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig,<br>
> +                          ControlInfoMap *ipaControls)<br>
>  {<br>
>         ipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe(), 1, 1);<br>
>  <br>
> @@ -1493,7 +1496,7 @@ int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig)<br>
>  <br>
>         IPASettings settings(configurationFile, sensor_->model());<br>
>  <br>
> -       return ipa_->init(settings, sensorConfig);<br>
> +       return ipa_->init(settings, sensorConfig, ipaControls);<br>
>  }<br>
>  <br>
>  int RPiCameraData::configureIPA(const CameraConfiguration *config)<br>
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> index d6f49d34f8c8..b0fc1119aabb 100644<br>
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> @@ -12,7 +12,6 @@<br>
>  #include <unordered_map><br>
>  #include <vector><br>
>  <br>
> -#include <libcamera/ipa/raspberrypi.h><br>
>  #include <libcamera/ipa/raspberrypi_ipa_interface.h><br>
>  #include <libcamera/stream.h><br>
>  <br>
> > > I think the information should be store din the IPA module, and<br>
> > > communicated to the pipeline handler at init time.<br>
> > > <br>
> > >> Naush, what do you think?<br>
> > >> <br>
> > >> Maybe this set of controls should be part of the class too. Would that<br>
> > >> help guarantee the order of construction?<br>
> > >> <br>
> > >> > Please CC me when responding, since I'm not subscribed to this mailing<br>
> > >> > list.<br>
> > >> ><br>
> > >> >  include/libcamera/ipa/raspberrypi.h           | 42 ++++++++++---------<br>
> > >> >  src/ipa/raspberrypi/raspberrypi.cpp           |  1 -<br>
> > >> >  .../pipeline/raspberrypi/raspberrypi.cpp      |  2 +-<br>
> > >> >  .../pipeline/raspberrypi/rpi_stream.h         |  1 -<br>
> > >> >  4 files changed, 24 insertions(+), 22 deletions(-)<br>
> > >> ><br>
> > >> > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h<br>
> > >> > index 7f705e49..545df355 100644<br>
> > >> > --- a/include/libcamera/ipa/raspberrypi.h<br>
> > >> > +++ b/include/libcamera/ipa/raspberrypi.h<br>
> > >> > @@ -27,26 +27,30 @@ namespace RPi {<br>
> > >> >   * and the pipeline handler may be reverted so that it aborts when an<br>
> > >> >   * unsupported control is encountered.<br>
> > >> >   */<br>
> > >> > -static const ControlInfoMap Controls({<br>
> > >> > -               { &controls::AeEnable, ControlInfo(false, true) },<br>
> > >> > -               { &controls::ExposureTime, ControlInfo(0, 999999) },<br>
> > >> > -               { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },<br>
> > >> > -               { &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },<br>
> > >> > -               { &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },<br>
> > >> > -               { &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },<br>
> > >> > -               { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },<br>
> > >> > -               { &controls::AwbEnable, ControlInfo(false, true) },<br>
> > >> > -               { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },<br>
> > >> > -               { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },<br>
> > >> > -               { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },<br>
> > >> > -               { &controls::Contrast, ControlInfo(0.0f, 32.0f) },<br>
> > >> > -               { &controls::Saturation, ControlInfo(0.0f, 32.0f) },<br>
> > >> > -               { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },<br>
> > >> > -               { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },<br>
> > >> > -               { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
> > >> > -               { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },<br>
> > >> > -               { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }<br>
> > >> > +static const ControlInfoMap &getControls()<br>
> > >> > +{<br>
> > >> > +       static const ControlInfoMap controls({<br>
> > >> > +                       { &controls::AeEnable, ControlInfo(false, true) },<br>
> > >> > +                       { &controls::ExposureTime, ControlInfo(0, 999999) },<br>
> > >> > +                       { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },<br>
> > >> > +                       { &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },<br>
> > >> > +                       { &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },<br>
> > >> > +                       { &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },<br>
> > >> > +                       { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },<br>
> > >> > +                       { &controls::AwbEnable, ControlInfo(false, true) },<br>
> > >> > +                       { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },<br>
> > >> > +                       { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },<br>
> > >> > +                       { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },<br>
> > >> > +                       { &controls::Contrast, ControlInfo(0.0f, 32.0f) },<br>
> > >> > +                       { &controls::Saturation, ControlInfo(0.0f, 32.0f) },<br>
> > >> > +                       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },<br>
> > >> > +                       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },<br>
> > >> > +                       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
> > >> > +                       { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },<br>
> > >> > +                       { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }<br>
> > >> >         }, controls::controls);<br>
> > >> > +       return controls;<br>
> > >> > +}<br>
> > >> ><br>
> > >> >  } /* namespace RPi */<br>
> > >> ><br>
> > >> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp<br>
> > >> > index 0ed41385..b2717dfc 100644<br>
> > >> > --- a/src/ipa/raspberrypi/raspberrypi.cpp<br>
> > >> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp<br>
> > >> > @@ -24,7 +24,6 @@<br>
> > >> >  #include <libcamera/framebuffer.h><br>
> > >> >  #include <libcamera/ipa/ipa_interface.h><br>
> > >> >  #include <libcamera/ipa/ipa_module_info.h><br>
> > >> > -#include <libcamera/ipa/raspberrypi.h><br>
> > >> >  #include <libcamera/ipa/raspberrypi_ipa_interface.h><br>
> > >> >  #include <libcamera/request.h><br>
> > >> ><br>
> > >> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> > >> > index 168bbcef..a48f1130 100644<br>
> > >> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> > >> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
> > >> > @@ -1244,7 +1244,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me<br>
> > >> >         data->sensorMetadata_ = sensorConfig.sensorMetadata;<br>
> > >> ><br>
> > >> >         /* Register the controls that the Raspberry Pi IPA can handle. */<br>
> > >> > -       data->controlInfo_ = RPi::Controls;<br>
> > >> > +       data->controlInfo_ = RPi::getControls();<br>
> > >> >         /* Initialize the camera properties. */<br>
> > >> >         data->properties_ = data->sensor_->properties();<br>
> > >> ><br>
> > >> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> > >> > index d6f49d34..b0fc1119 100644<br>
> > >> > --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> > >> > +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h<br>
> > >> > @@ -12,7 +12,6 @@<br>
> > >> >  #include <unordered_map><br>
> > >> >  #include <vector><br>
> > >> ><br>
> > >> > -#include <libcamera/ipa/raspberrypi.h><br>
> > >> >  #include <libcamera/ipa/raspberrypi_ipa_interface.h><br>
> > >> >  #include <libcamera/stream.h><br>
> > >> ><br>
> <br>
> -- <br>
> Regards,<br>
> <br>
> Laurent Pinchart<br>
</blockquote></div></div>