[libcamera-devel] ipa: raspberrypi: Return controls::FrameDuration from the IPA
diff mbox series

Message ID 20210722115742.3131100-1-naush@raspberrypi.com
State Accepted
Headers show
Series
  • [libcamera-devel] ipa: raspberrypi: Return controls::FrameDuration from the IPA
Related show

Commit Message

Naushir Patuck July 22, 2021, 11:57 a.m. UTC
Return controls::FrameDuration through the per-frame Request metadata. The
frame duration is obtained by either the value in DelayedControls, or
(preferably) the value parsed from the embedded data buffer.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/ipa/raspberrypi/raspberrypi.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Naushir Patuck July 28, 2021, 6:36 a.m. UTC | #1
Hi,

Gentle ping for some feedback on this change.

Thanks,
Naush

On Thu, 22 Jul 2021 at 12:57, Naushir Patuck <naush@raspberrypi.com> wrote:

> Return controls::FrameDuration through the per-frame Request metadata. The
> frame duration is obtained by either the value in DelayedControls, or
> (preferably) the value parsed from the embedded data buffer.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/ipa/raspberrypi/raspberrypi.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp
> b/src/ipa/raspberrypi/raspberrypi.cpp
> index 5cd333049807..b08602f474af 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -465,6 +465,8 @@ void IPARPi::reportMetadata()
>                 libcameraMetadata_.set(controls::ExposureTime,
>
>  deviceStatus->shutter_speed.get<std::micro>());
>                 libcameraMetadata_.set(controls::AnalogueGain,
> deviceStatus->analogue_gain);
> +               libcameraMetadata_.set(controls::FrameDuration,
> +
> helper_->Exposure(deviceStatus->frame_length).get<std::micro>());
>         }
>
>         AgcStatus *agcStatus =
> rpiMetadata_.GetLocked<AgcStatus>("agc.status");
> --
> 2.25.1
>
>
Laurent Pinchart July 28, 2021, 6:55 a.m. UTC | #2
Hi Naush,

Thank you for the patch.

On Thu, Jul 22, 2021 at 12:57:42PM +0100, Naushir Patuck wrote:
> Return controls::FrameDuration through the per-frame Request metadata. The
> frame duration is obtained by either the value in DelayedControls, or
> (preferably) the value parsed from the embedded data buffer.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

David, would you like to review this, or should I merge it ?

> ---
>  src/ipa/raspberrypi/raspberrypi.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index 5cd333049807..b08602f474af 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -465,6 +465,8 @@ void IPARPi::reportMetadata()
>  		libcameraMetadata_.set(controls::ExposureTime,
>  				       deviceStatus->shutter_speed.get<std::micro>());
>  		libcameraMetadata_.set(controls::AnalogueGain, deviceStatus->analogue_gain);
> +		libcameraMetadata_.set(controls::FrameDuration,
> +				       helper_->Exposure(deviceStatus->frame_length).get<std::micro>());
>  	}
>  
>  	AgcStatus *agcStatus = rpiMetadata_.GetLocked<AgcStatus>("agc.status");
David Plowman July 28, 2021, 8:22 a.m. UTC | #3
Hi Laurent

Sorry, this one must have slipped past me! Happy to merge, also with

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks!
Davod

On Wed, 28 Jul 2021 at 07:55, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Naush,
>
> Thank you for the patch.
>
> On Thu, Jul 22, 2021 at 12:57:42PM +0100, Naushir Patuck wrote:
> > Return controls::FrameDuration through the per-frame Request metadata. The
> > frame duration is obtained by either the value in DelayedControls, or
> > (preferably) the value parsed from the embedded data buffer.
> >
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> David, would you like to review this, or should I merge it ?
>
> > ---
> >  src/ipa/raspberrypi/raspberrypi.cpp | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> > index 5cd333049807..b08602f474af 100644
> > --- a/src/ipa/raspberrypi/raspberrypi.cpp
> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> > @@ -465,6 +465,8 @@ void IPARPi::reportMetadata()
> >               libcameraMetadata_.set(controls::ExposureTime,
> >                                      deviceStatus->shutter_speed.get<std::micro>());
> >               libcameraMetadata_.set(controls::AnalogueGain, deviceStatus->analogue_gain);
> > +             libcameraMetadata_.set(controls::FrameDuration,
> > +                                    helper_->Exposure(deviceStatus->frame_length).get<std::micro>());
> >       }
> >
> >       AgcStatus *agcStatus = rpiMetadata_.GetLocked<AgcStatus>("agc.status");
>
> --
> Regards,
>
> Laurent Pinchart

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 5cd333049807..b08602f474af 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -465,6 +465,8 @@  void IPARPi::reportMetadata()
 		libcameraMetadata_.set(controls::ExposureTime,
 				       deviceStatus->shutter_speed.get<std::micro>());
 		libcameraMetadata_.set(controls::AnalogueGain, deviceStatus->analogue_gain);
+		libcameraMetadata_.set(controls::FrameDuration,
+				       helper_->Exposure(deviceStatus->frame_length).get<std::micro>());
 	}
 
 	AgcStatus *agcStatus = rpiMetadata_.GetLocked<AgcStatus>("agc.status");