[libcamera-devel,20/20] ipa: rpi: agc: When AGC channels are changed, start with the 1st channel
diff mbox series

Message ID 20231006132000.23504-21-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi: Preliminary PiSP support
Related show

Commit Message

Naushir Patuck Oct. 6, 2023, 1:20 p.m. UTC
Whenever the AGC active channels are changed, start with the first
channel listed. This allows applications to rely on a particular channel
being generated first. For example, multi-exposure HDR always wants the
short channel first.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/rpi/controller/rpi/agc.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Jacopo Mondi Oct. 12, 2023, 10:57 a.m. UTC | #1
Hi Naush

On Fri, Oct 06, 2023 at 02:20:00PM +0100, Naushir Patuck via libcamera-devel wrote:
> Whenever the AGC active channels are changed, start with the first
> channel listed. This allows applications to rely on a particular channel
> being generated first. For example, multi-exposure HDR always wants the
> short channel first.

The user won't be able to cycle through channels directly, but the HDR
algorithm will, right ? So this doesn't need to be documented anywhere
perhaps...

>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/ipa/rpi/controller/rpi/agc.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/ipa/rpi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp
> index 758da0719b9b..32eb36242268 100644
> --- a/src/ipa/rpi/controller/rpi/agc.cpp
> +++ b/src/ipa/rpi/controller/rpi/agc.cpp
> @@ -203,6 +203,7 @@ void Agc::setActiveChannels(const std::vector<unsigned int> &activeChannels)
>
>  	LOG(RPiAgc, Debug) << "setActiveChannels " << activeChannels;
>  	activeChannels_ = activeChannels;
> +	index_ = 0;
>  }
>
>  void Agc::switchMode(CameraMode const &cameraMode,
> --
> 2.34.1
>
Naushir Patuck Oct. 12, 2023, 1:11 p.m. UTC | #2
Hi Jacopo,

Thank you for the review.

On Thu, 12 Oct 2023 at 11:57, Jacopo Mondi
<jacopo.mondi@ideasonboard.com> wrote:
>
> Hi Naush
>
> On Fri, Oct 06, 2023 at 02:20:00PM +0100, Naushir Patuck via libcamera-devel wrote:
> > Whenever the AGC active channels are changed, start with the first
> > channel listed. This allows applications to rely on a particular channel
> > being generated first. For example, multi-exposure HDR always wants the
> > short channel first.
>
> The user won't be able to cycle through channels directly, but the HDR
> algorithm will, right ?

Correct!

> So this doesn't need to be documented anywhere
> perhaps...

We do have a job of updating our IPA/tuning guide and this will have
to be noted there.

Regards,
Naush

>
> >
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
>
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>
> Thanks
>   j
>
> > ---
> >  src/ipa/rpi/controller/rpi/agc.cpp | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/ipa/rpi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp
> > index 758da0719b9b..32eb36242268 100644
> > --- a/src/ipa/rpi/controller/rpi/agc.cpp
> > +++ b/src/ipa/rpi/controller/rpi/agc.cpp
> > @@ -203,6 +203,7 @@ void Agc::setActiveChannels(const std::vector<unsigned int> &activeChannels)
> >
> >       LOG(RPiAgc, Debug) << "setActiveChannels " << activeChannels;
> >       activeChannels_ = activeChannels;
> > +     index_ = 0;
> >  }
> >
> >  void Agc::switchMode(CameraMode const &cameraMode,
> > --
> > 2.34.1
> >

Patch
diff mbox series

diff --git a/src/ipa/rpi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp
index 758da0719b9b..32eb36242268 100644
--- a/src/ipa/rpi/controller/rpi/agc.cpp
+++ b/src/ipa/rpi/controller/rpi/agc.cpp
@@ -203,6 +203,7 @@  void Agc::setActiveChannels(const std::vector<unsigned int> &activeChannels)
 
 	LOG(RPiAgc, Debug) << "setActiveChannels " << activeChannels;
 	activeChannels_ = activeChannels;
+	index_ = 0;
 }
 
 void Agc::switchMode(CameraMode const &cameraMode,