[libcamera-devel,v5,06/17] libcamera: ipu3: Merge IPA metadata controls
diff mbox series

Message ID 20210503104152.34048-7-jacopo@jmondi.org
State Accepted
Headers show
Series
  • Support SensorTimestamp metadata
Related show

Commit Message

Jacopo Mondi May 3, 2021, 10:41 a.m. UTC
When a Request is completed upon receiving the IPA produced metadata,
they should be merged with the metadata set by the pipeline handler
before reporting them to applications.

Use ControlList::merge() to collect the IPA produced controls to the
request's metadata.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Kieran Bingham May 4, 2021, 8:13 a.m. UTC | #1
Hi Jacopo,

On 03/05/2021 11:41, Jacopo Mondi wrote:
> When a Request is completed upon receiving the IPA produced metadata,
> they should be merged with the metadata set by the pipeline handler
> before reporting them to applications.
> 
> Use ControlList::merge() to collect the IPA produced controls to the
> request's metadata.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Aha great, thank you - Good to have consistency here, even if we haven't
yet started adding metadata to this ipa.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 88b7bd1e52c3..ade8ffbddb0e 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1190,11 +1190,8 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
>  		if (!info)
>  			break;
>  
> -		/*
> -		 * \todo Parse the value of the controls returned by the IPA
> -		 * in action.controls to register additional metadata.
> -		 */
>  		Request *request = info->request;
> +		request->metadata().merge(action.controls);
>  
>  		info->metadataProcessed = true;
>  		if (frameInfos_.tryComplete(info))
>
Hirokazu Honda May 6, 2021, 5 a.m. UTC | #2
Hi Jacopo, thank you for the patch.

On Tue, May 4, 2021 at 5:13 PM Kieran Bingham <
kieran.bingham@ideasonboard.com> wrote:

> Hi Jacopo,
>
> On 03/05/2021 11:41, Jacopo Mondi wrote:
> > When a Request is completed upon receiving the IPA produced metadata,
> > they should be merged with the metadata set by the pipeline handler
> > before reporting them to applications.
> >
> > Use ControlList::merge() to collect the IPA produced controls to the
> > request's metadata.
> >
> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
>
> Aha great, thank you - Good to have consistency here, even if we haven't
> yet started adding metadata to this ipa.
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> > ---
> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp
> b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > index 88b7bd1e52c3..ade8ffbddb0e 100644
> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> > @@ -1190,11 +1190,8 @@ void IPU3CameraData::queueFrameAction(unsigned
> int id,
> >               if (!info)
> >                       break;
> >
> > -             /*
> > -              * \todo Parse the value of the controls returned by the
> IPA
> > -              * in action.controls to register additional metadata.
> > -              */
> >               Request *request = info->request;
> > +             request->metadata().merge(action.controls);
> >
> >               info->metadataProcessed = true;
> >               if (frameInfos_.tryComplete(info))
> >
>
>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>


> --
> Regards
> --
> Kieran
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
>
Niklas Söderlund May 6, 2021, 7:05 a.m. UTC | #3
Hi Jacopo,

Thanks for your patch.

On 2021-05-03 12:41:41 +0200, Jacopo Mondi wrote:
> When a Request is completed upon receiving the IPA produced metadata,
> they should be merged with the metadata set by the pipeline handler
> before reporting them to applications.
> 
> Use ControlList::merge() to collect the IPA produced controls to the
> request's metadata.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 88b7bd1e52c3..ade8ffbddb0e 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1190,11 +1190,8 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
>  		if (!info)
>  			break;
>  
> -		/*
> -		 * \todo Parse the value of the controls returned by the IPA
> -		 * in action.controls to register additional metadata.
> -		 */
>  		Request *request = info->request;
> +		request->metadata().merge(action.controls);
>  
>  		info->metadataProcessed = true;
>  		if (frameInfos_.tryComplete(info))
> -- 
> 2.31.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 88b7bd1e52c3..ade8ffbddb0e 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1190,11 +1190,8 @@  void IPU3CameraData::queueFrameAction(unsigned int id,
 		if (!info)
 			break;
 
-		/*
-		 * \todo Parse the value of the controls returned by the IPA
-		 * in action.controls to register additional metadata.
-		 */
 		Request *request = info->request;
+		request->metadata().merge(action.controls);
 
 		info->metadataProcessed = true;
 		if (frameInfos_.tryComplete(info))