ipa: rkisp1: agc: Rename frame context update variable to updateMetering
diff mbox series

Message ID 20240617134728.17477-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit a8de1f398ddc26a655756e8954fd4d90dff3b3fa
Headers show
Series
  • ipa: rkisp1: agc: Rename frame context update variable to updateMetering
Related show

Commit Message

Laurent Pinchart June 17, 2024, 1:47 p.m. UTC
The frame context agc.update variable is used to indicate if the ISP
histogram metering parameters need to be updated. Rename it to
updateMetering to make usage more explicit.

Suggested-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/agc.cpp | 4 ++--
 src/ipa/rkisp1/ipa_context.cpp    | 4 ++--
 src/ipa/rkisp1/ipa_context.h      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


base-commit: 13a8fbeb5c8d10524f357b4f2eb566b7243d0b94

Comments

Kieran Bingham June 17, 2024, 3:16 p.m. UTC | #1
Quoting Laurent Pinchart (2024-06-17 14:47:28)
> The frame context agc.update variable is used to indicate if the ISP
> histogram metering parameters need to be updated. Rename it to
> updateMetering to make usage more explicit.
> 
> Suggested-by: Paul Elder <paul.elder@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Sounds clearer to me!


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

> ---
>  src/ipa/rkisp1/algorithms/agc.cpp | 4 ++--
>  src/ipa/rkisp1/ipa_context.cpp    | 4 ++--
>  src/ipa/rkisp1/ipa_context.h      | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
> index 965030b62de5..f12f8b60de15 100644
> --- a/src/ipa/rkisp1/algorithms/agc.cpp
> +++ b/src/ipa/rkisp1/algorithms/agc.cpp
> @@ -250,7 +250,7 @@ void Agc::queueRequest(IPAContext &context,
>  
>         const auto &meteringMode = controls.get(controls::AeMeteringMode);
>         if (meteringMode) {
> -               frameContext.agc.update = agc.meteringMode != *meteringMode;
> +               frameContext.agc.updateMetering = agc.meteringMode != *meteringMode;
>                 agc.meteringMode =
>                         static_cast<controls::AeMeteringModeEnum>(*meteringMode);
>         }
> @@ -288,7 +288,7 @@ void Agc::prepare(IPAContext &context, const uint32_t frame,
>                 frameContext.agc.gain = context.activeState.agc.automatic.gain;
>         }
>  
> -       if (frame > 0 && !frameContext.agc.update)
> +       if (frame > 0 && !frameContext.agc.updateMetering)
>                 return;
>  
>         /* Configure the measurement window. */
> diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
> index ab6cfae17feb..9f3f576afcf7 100644
> --- a/src/ipa/rkisp1/ipa_context.cpp
> +++ b/src/ipa/rkisp1/ipa_context.cpp
> @@ -317,8 +317,8 @@ namespace libcamera::ipa::rkisp1 {
>   * \var IPAFrameContext::agc.maxFrameDuration
>   * \brief Maximum frame duration as set by the FrameDurationLimits control
>   *
> - * \var IPAFrameContext::agc.update
> - * \brief Indicate if new ISP parameters need to be applied
> + * \var IPAFrameContext::agc.updateMetering
> + * \brief Indicate if new ISP AGC metering parameters need to be applied
>   */
>  
>  /**
> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
> index 7977590544fd..8602b408870e 100644
> --- a/src/ipa/rkisp1/ipa_context.h
> +++ b/src/ipa/rkisp1/ipa_context.h
> @@ -123,7 +123,7 @@ struct IPAFrameContext : public FrameContext {
>                 controls::AeExposureModeEnum exposureMode;
>                 controls::AeMeteringModeEnum meteringMode;
>                 utils::Duration maxFrameDuration;
> -               bool update;
> +               bool updateMetering;
>         } agc;
>  
>         struct {
> 
> base-commit: 13a8fbeb5c8d10524f357b4f2eb566b7243d0b94
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 965030b62de5..f12f8b60de15 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -250,7 +250,7 @@  void Agc::queueRequest(IPAContext &context,
 
 	const auto &meteringMode = controls.get(controls::AeMeteringMode);
 	if (meteringMode) {
-		frameContext.agc.update = agc.meteringMode != *meteringMode;
+		frameContext.agc.updateMetering = agc.meteringMode != *meteringMode;
 		agc.meteringMode =
 			static_cast<controls::AeMeteringModeEnum>(*meteringMode);
 	}
@@ -288,7 +288,7 @@  void Agc::prepare(IPAContext &context, const uint32_t frame,
 		frameContext.agc.gain = context.activeState.agc.automatic.gain;
 	}
 
-	if (frame > 0 && !frameContext.agc.update)
+	if (frame > 0 && !frameContext.agc.updateMetering)
 		return;
 
 	/* Configure the measurement window. */
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index ab6cfae17feb..9f3f576afcf7 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -317,8 +317,8 @@  namespace libcamera::ipa::rkisp1 {
  * \var IPAFrameContext::agc.maxFrameDuration
  * \brief Maximum frame duration as set by the FrameDurationLimits control
  *
- * \var IPAFrameContext::agc.update
- * \brief Indicate if new ISP parameters need to be applied
+ * \var IPAFrameContext::agc.updateMetering
+ * \brief Indicate if new ISP AGC metering parameters need to be applied
  */
 
 /**
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index 7977590544fd..8602b408870e 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -123,7 +123,7 @@  struct IPAFrameContext : public FrameContext {
 		controls::AeExposureModeEnum exposureMode;
 		controls::AeMeteringModeEnum meteringMode;
 		utils::Duration maxFrameDuration;
-		bool update;
+		bool updateMetering;
 	} agc;
 
 	struct {