[08/15] libipa: awb: Rename AwbStats::getRGBMeans() to rgbMeans()
diff mbox series

Message ID 20250223230403.1226-9-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libipa: awb: Drive-by fixes
Related show

Commit Message

Laurent Pinchart Feb. 23, 2025, 11:03 p.m. UTC
The convention in libcamera is not to prefix getters with a 'get'
prefix. Rename the AwbStats::getRGBMeans() function accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/libipa/awb.cpp            | 2 +-
 src/ipa/libipa/awb.h              | 2 +-
 src/ipa/libipa/awb_grey.cpp       | 2 +-
 src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Stefan Klug Feb. 24, 2025, 9:15 a.m. UTC | #1
Hi Laurent,

Thank you for the patch.

On Mon, Feb 24, 2025 at 01:03:56AM +0200, Laurent Pinchart wrote:
> The convention in libcamera is not to prefix getters with a 'get'
> prefix. Rename the AwbStats::getRGBMeans() function accordingly.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> 

> ---
>  src/ipa/libipa/awb.cpp            | 2 +-
>  src/ipa/libipa/awb.h              | 2 +-
>  src/ipa/libipa/awb_grey.cpp       | 2 +-
>  src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp
> index 1c4f2330ec6c..925fac232709 100644
> --- a/src/ipa/libipa/awb.cpp
> +++ b/src/ipa/libipa/awb.cpp
> @@ -65,7 +65,7 @@ namespace ipa {
>   */
>  
>  /**
> - * \fn AwbStats::getRGBMeans()
> + * \fn AwbStats::rgbMeans()
>   * \brief Get RGB means of the statistics
>   *
>   * Fetch the RGB means from the statistics. The values of each channel are
> diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h
> index 5c298d3b6f69..a86581adf43e 100644
> --- a/src/ipa/libipa/awb.h
> +++ b/src/ipa/libipa/awb.h
> @@ -26,7 +26,7 @@ struct AwbResult {
>  
>  struct AwbStats {
>  	virtual double computeColourError(const RGB<double> &gains) const = 0;
> -	virtual RGB<double> getRGBMeans() const = 0;
> +	virtual RGB<double> rgbMeans() const = 0;
>  };
>  
>  class AwbAlgorithm
> diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp
> index e979cc4d1a3e..17b8598400e7 100644
> --- a/src/ipa/libipa/awb_grey.cpp
> +++ b/src/ipa/libipa/awb_grey.cpp
> @@ -73,7 +73,7 @@ int AwbGrey::init(const YamlObject &tuningData)
>  AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux)
>  {
>  	AwbResult result;
> -	auto means = stats.getRGBMeans();
> +	auto means = stats.rgbMeans();
>  	result.colourTemperature = estimateCCT(means);
>  
>  	/*
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index 3d6737df801c..af34b81beb96 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -65,7 +65,7 @@ public:
>  		return delta2;
>  	}
>  
> -	RGB<double> getRGBMeans() const override
> +	RGB<double> rgbMeans() const override
>  	{
>  		return rgbMeans_;
>  	}
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp
index 1c4f2330ec6c..925fac232709 100644
--- a/src/ipa/libipa/awb.cpp
+++ b/src/ipa/libipa/awb.cpp
@@ -65,7 +65,7 @@  namespace ipa {
  */
 
 /**
- * \fn AwbStats::getRGBMeans()
+ * \fn AwbStats::rgbMeans()
  * \brief Get RGB means of the statistics
  *
  * Fetch the RGB means from the statistics. The values of each channel are
diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h
index 5c298d3b6f69..a86581adf43e 100644
--- a/src/ipa/libipa/awb.h
+++ b/src/ipa/libipa/awb.h
@@ -26,7 +26,7 @@  struct AwbResult {
 
 struct AwbStats {
 	virtual double computeColourError(const RGB<double> &gains) const = 0;
-	virtual RGB<double> getRGBMeans() const = 0;
+	virtual RGB<double> rgbMeans() const = 0;
 };
 
 class AwbAlgorithm
diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp
index e979cc4d1a3e..17b8598400e7 100644
--- a/src/ipa/libipa/awb_grey.cpp
+++ b/src/ipa/libipa/awb_grey.cpp
@@ -73,7 +73,7 @@  int AwbGrey::init(const YamlObject &tuningData)
 AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux)
 {
 	AwbResult result;
-	auto means = stats.getRGBMeans();
+	auto means = stats.rgbMeans();
 	result.colourTemperature = estimateCCT(means);
 
 	/*
diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index 3d6737df801c..af34b81beb96 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -65,7 +65,7 @@  public:
 		return delta2;
 	}
 
-	RGB<double> getRGBMeans() const override
+	RGB<double> rgbMeans() const override
 	{
 		return rgbMeans_;
 	}