<div dir="ltr"><div dir="ltr">Hi Laurent and Jacopo,<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Oct 2020 at 03:47, Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@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 Jacopo,<br>
<br>
Thank you for the patch.<br>
<br>
CC'ing Naush and David.<br>
<br>
On Wed, Oct 21, 2020 at 04:36:28PM +0200, Jacopo Mondi wrote:<br>
> Initialize the ControlInfoMap of controls supported by the Raspberry<br>
> pipeline handler and IPA using the list of the enumerated values instead<br>
> of specifying them manually.<br>
> <br>
> Reviewed-by: Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com" target="_blank">kieran.bingham@ideasonboard.com</a>><br>
> Signed-off-by: Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank">jacopo@jmondi.org</a>><br>
> ---<br>
>  include/libcamera/ipa/raspberrypi.h | 8 ++++----<br>
>  1 file changed, 4 insertions(+), 4 deletions(-)<br>
> <br>
> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h<br>
> index b23baf2f1330..4ca1528ad097 100644<br>
> --- a/include/libcamera/ipa/raspberrypi.h<br>
> +++ b/include/libcamera/ipa/raspberrypi.h<br>
> @@ -50,13 +50,13 @@ 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(0, static_cast<int32_t>(controls::MeteringModeMax)) },<br>
> -     { &controls::AeConstraintMode, ControlInfo(0, static_cast<int32_t>(controls::ConstraintModeMax)) },<br>
> -     { &controls::AeExposureMode, ControlInfo(0, static_cast<int32_t>(controls::ExposureModeMax)) },<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(0, static_cast<int32_t>(controls::AwbModeMax)) },<br>
> +     { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },<br>
<br>
This looks good to me, but I haven't checked if the RPi IPA actually<br>
supports all possible values. David or Naush, would you be able to<br>
comment on this ?<br></blockquote><div><br></div><div>Yes, we do support all listed modes, so this should be fine.</div><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></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>
>       { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },<br>
>       { &controls::Contrast, ControlInfo(0.0f, 32.0f) },<br>
>       { &controls::Saturation, ControlInfo(0.0f, 32.0f) },<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>