[libcamera-devel,3/4] libcamera: ipa: raspberrypi: Populate libcamera metadata after controller process

Message ID 20200626102531.1187650-4-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Focus feedback control
Related show

Commit Message

Naushir Patuck June 26, 2020, 10:25 a.m. UTC
For control algorithms like focus, this is needed to return out the
the current frame focus statistics. For other algorithms, there is no
functional change.

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

Comments

David Plowman June 26, 2020, 12:31 p.m. UTC | #1
Hi Naush

Yes, this change seems correct to me.

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

Best regards
Davd

On Fri, 26 Jun 2020 at 11:25, Naushir Patuck <naush@raspberrypi.com> wrote:
>
> For control algorithms like focus, this is needed to return out the
> the current frame focus statistics. For other algorithms, there is no
> functional change.
>
> Signed-off-By: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/ipa/raspberrypi/raspberrypi.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index bc89ab58..62730198 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -318,6 +318,8 @@ void IPARPi::processEvent(const IPAOperationData &event)
>                 if (frame_count_ > mistrust_count_)
>                         processStats(bufferId);
>
> +               reportMetadata();
> +
>                 IPAOperationData op;
>                 op.operation = RPI_IPA_ACTION_STATS_METADATA_COMPLETE;
>                 op.data = { bufferId & RPiIpaMask::ID };
> @@ -336,7 +338,6 @@ void IPARPi::processEvent(const IPAOperationData &event)
>                  * they are "unreliable".
>                  */
>                 prepareISP(embeddedbufferId);
> -               reportMetadata();
>
>                 /* Ready to push the input buffer into the ISP. */
>                 IPAOperationData op;
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Laurent Pinchart July 3, 2020, 1:04 a.m. UTC | #2
Hi Naush,

Thank you for the patch.

On Fri, Jun 26, 2020 at 11:25:30AM +0100, Naushir Patuck wrote:
> For control algorithms like focus, this is needed to return out the
> the current frame focus statistics. For other algorithms, there is no
> functional change.
> 
> Signed-off-By: Naushir Patuck <naush@raspberrypi.com>

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

> ---
>  src/ipa/raspberrypi/raspberrypi.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index bc89ab58..62730198 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -318,6 +318,8 @@ void IPARPi::processEvent(const IPAOperationData &event)
>  		if (frame_count_ > mistrust_count_)
>  			processStats(bufferId);
>  
> +		reportMetadata();
> +
>  		IPAOperationData op;
>  		op.operation = RPI_IPA_ACTION_STATS_METADATA_COMPLETE;
>  		op.data = { bufferId & RPiIpaMask::ID };
> @@ -336,7 +338,6 @@ void IPARPi::processEvent(const IPAOperationData &event)
>  		 * they are "unreliable".
>  		 */
>  		prepareISP(embeddedbufferId);
> -		reportMetadata();
>  
>  		/* Ready to push the input buffer into the ISP. */
>  		IPAOperationData op;

Patch

diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index bc89ab58..62730198 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -318,6 +318,8 @@  void IPARPi::processEvent(const IPAOperationData &event)
 		if (frame_count_ > mistrust_count_)
 			processStats(bufferId);
 
+		reportMetadata();
+
 		IPAOperationData op;
 		op.operation = RPI_IPA_ACTION_STATS_METADATA_COMPLETE;
 		op.data = { bufferId & RPiIpaMask::ID };
@@ -336,7 +338,6 @@  void IPARPi::processEvent(const IPAOperationData &event)
 		 * they are "unreliable".
 		 */
 		prepareISP(embeddedbufferId);
-		reportMetadata();
 
 		/* Ready to push the input buffer into the ISP. */
 		IPAOperationData op;