[libcamera-devel,2/2] ipa: ipu3: Set output frame duration metadata
diff mbox series

Message ID 20210521105534.1125303-2-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-devel,1/2] android: camera_device: Fix sensor frame duration
Related show

Commit Message

Paul Elder May 21, 2021, 10:55 a.m. UTC
The sensor frame duration should be set by the IPA. Hardcode it for now.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jacopo Mondi May 21, 2021, 11:55 a.m. UTC | #1
Hi Paul,

On Fri, May 21, 2021 at 07:55:34PM +0900, Paul Elder wrote:
> The sensor frame duration should be set by the IPA. Hardcode it for now.
>
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

With a \todo

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> ---
>  src/ipa/ipu3/ipu3.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index f5343547..35c24052 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -269,6 +269,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>  	if (agcAlgo_->updateControls())
>  		setControls(frame);
>
> +	ctrls.set(controls::FrameDurations,
> +		  { static_cast<int64_t>(33334),
> +		    static_cast<int64_t>(33334) });
> +
>  	IPU3Action op;
>  	op.op = ActionMetadataReady;
>  	op.controls = ctrls;
> --
> 2.27.0
>
Laurent Pinchart May 23, 2021, 12:17 a.m. UTC | #2
On Fri, May 21, 2021 at 01:55:14PM +0200, Jacopo Mondi wrote:
> On Fri, May 21, 2021 at 07:55:34PM +0900, Paul Elder wrote:
> > The sensor frame duration should be set by the IPA. Hardcode it for now.
> >
> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> 
> With a \todo
> 
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Ditto, the todo is important.

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

> > ---
> >  src/ipa/ipu3/ipu3.cpp | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> > index f5343547..35c24052 100644
> > --- a/src/ipa/ipu3/ipu3.cpp
> > +++ b/src/ipa/ipu3/ipu3.cpp
> > @@ -269,6 +269,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,
> >  	if (agcAlgo_->updateControls())
> >  		setControls(frame);
> >
> > +	ctrls.set(controls::FrameDurations,
> > +		  { static_cast<int64_t>(33334),
> > +		    static_cast<int64_t>(33334) });
> > +
> >  	IPU3Action op;
> >  	op.op = ActionMetadataReady;
> >  	op.controls = ctrls;
Hirokazu Honda May 24, 2021, 5 a.m. UTC | #3
Hi Paul, thank you for the patch.

On Sun, May 23, 2021 at 9:17 AM Laurent Pinchart <
laurent.pinchart@ideasonboard.com> wrote:

> On Fri, May 21, 2021 at 01:55:14PM +0200, Jacopo Mondi wrote:
> > On Fri, May 21, 2021 at 07:55:34PM +0900, Paul Elder wrote:
> > > The sensor frame duration should be set by the IPA. Hardcode it for
> now.
> > >
> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> >
> > With a \todo
> >
> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
>
> Ditto, the todo is important.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>


> > > ---
> > >  src/ipa/ipu3/ipu3.cpp | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> > > index f5343547..35c24052 100644
> > > --- a/src/ipa/ipu3/ipu3.cpp
> > > +++ b/src/ipa/ipu3/ipu3.cpp
> > > @@ -269,6 +269,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,
> > >     if (agcAlgo_->updateControls())
> > >             setControls(frame);
> > >
> > > +   ctrls.set(controls::FrameDurations,
> > > +             { static_cast<int64_t>(33334),
> > > +               static_cast<int64_t>(33334) });
> > > +
> > >     IPU3Action op;
> > >     op.op = ActionMetadataReady;
> > >     op.controls = ctrls;
>
> --
> Regards,
>
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index f5343547..35c24052 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -269,6 +269,10 @@  void IPAIPU3::parseStatistics(unsigned int frame,
 	if (agcAlgo_->updateControls())
 		setControls(frame);
 
+	ctrls.set(controls::FrameDurations,
+		  { static_cast<int64_t>(33334),
+		    static_cast<int64_t>(33334) });
+
 	IPU3Action op;
 	op.op = ActionMetadataReady;
 	op.controls = ctrls;