[libcamera-devel,v5,08/17] libcamera: rkisp1: Do not over-write metadata
diff mbox series

Message ID 20210503104152.34048-9-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,
the metadata associated with the Request are over-written, deleting
the information set at output buffer completion, such as the
SensorTimestamp.

This commit applies to the RkISP1 pipeline handler the same change
applied to IPU3 in commit 2ee3dd57e2fc ("libcamera: ipu3: Merge IPA
metadata controls").

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

Comments

Kieran Bingham May 4, 2021, 8:12 a.m. UTC | #1
On 03/05/2021 11:41, Jacopo Mondi wrote:
> When a Request is completed upon receiving the IPA produced metadata,
> the metadata associated with the Request are over-written, deleting
> the information set at output buffer completion, such as the
> SensorTimestamp.
> 
> This commit applies to the RkISP1 pipeline handler the same change
> applied to IPU3 in commit 2ee3dd57e2fc ("libcamera: ipu3: Merge IPA
> metadata controls").
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index c75666391222..26f708242523 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -365,7 +365,7 @@ void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &meta
>  	if (!info)
>  		return;
>  
> -	info->request->metadata() = metadata;
> +	info->request->metadata().merge(metadata);
>  	info->metadataProcessed = true;
>  
>  	pipe->tryCompleteRequest(info->request);
>
Hirokazu Honda May 6, 2021, 5:03 a.m. UTC | #2
Hi Jacopo, thank you for the patch.

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

> On 03/05/2021 11:41, Jacopo Mondi wrote:
> > When a Request is completed upon receiving the IPA produced metadata,
> > the metadata associated with the Request are over-written, deleting
> > the information set at output buffer completion, such as the
> > SensorTimestamp.
> >
> > This commit applies to the RkISP1 pipeline handler the same change
> > applied to IPU3 in commit 2ee3dd57e2fc ("libcamera: ipu3: Merge IPA
> > metadata controls").
> >
> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>


> > ---
> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > index c75666391222..26f708242523 100644
> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > @@ -365,7 +365,7 @@ void RkISP1CameraData::metadataReady(unsigned int
> frame, const ControlList &meta
> >       if (!info)
> >               return;
> >
> > -     info->request->metadata() = metadata;
> > +     info->request->metadata().merge(metadata);
> >       info->metadataProcessed = true;
> >
> >       pipe->tryCompleteRequest(info->request);
> >
>
> --
> Regards
> --
> Kieran
> _______________________________________________
> 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/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c75666391222..26f708242523 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -365,7 +365,7 @@  void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &meta
 	if (!info)
 		return;
 
-	info->request->metadata() = metadata;
+	info->request->metadata().merge(metadata);
 	info->metadataProcessed = true;
 
 	pipe->tryCompleteRequest(info->request);