[libcamera-devel,v2,07/11] ipa: ipu3: Document AWB Algorithm overriden functions
diff mbox series

Message ID 20211123091451.67404-8-jeanmichel.hautbois@ideasonboard.com
State Superseded
Headers show
Series
  • Introduce AGC for RkISP1
Related show

Commit Message

Jean-Michel Hautbois Nov. 23, 2021, 9:14 a.m. UTC
Now that Algorithm is defined in libipa, we miss documentation for the
functions implemented in IPU3::Awb. Fix it.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 src/ipa/ipu3/algorithms/awb.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Laurent Pinchart Nov. 23, 2021, 11:11 a.m. UTC | #1
Hi Jean-Michel,

Thank you for the patch.

On Tue, Nov 23, 2021 at 10:14:47AM +0100, Jean-Michel Hautbois wrote:
> Now that Algorithm is defined in libipa, we miss documentation for the
> functions implemented in IPU3::Awb. Fix it.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> ---
>  src/ipa/ipu3/algorithms/awb.cpp | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
> index c7bcb20e..85205333 100644
> --- a/src/ipa/ipu3/algorithms/awb.cpp
> +++ b/src/ipa/ipu3/algorithms/awb.cpp
> @@ -193,6 +193,9 @@ Awb::Awb()
>  
>  Awb::~Awb() = default;
>  
> +/**
> + * \brief Configure the AWB given a configInfo

Missing \param. Maybe

 * \copydoc libcamera::ipa::Algorithm::configure

would be better ? Same below.

> + */
>  int Awb::configure(IPAContext &context,
>  		   [[maybe_unused]] const IPAConfigInfo &configInfo)
>  {
> @@ -373,6 +376,9 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
>  	}
>  }
>  
> +/**
> + * \brief Process IPU3 statistics, and run algorithm operations
> + */
>  void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
>  {
>  	calculateWBGains(stats);
> @@ -394,6 +400,9 @@ constexpr uint16_t Awb::threshold(float value)
>  	return value * 8191;
>  }
>  
> +/**
> + * \brief Fill the \a params buffer with IPU3 processing parameters for a frame
> + */
>  void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)
>  {
>  	/*
Jean-Michel Hautbois Nov. 23, 2021, 1:38 p.m. UTC | #2
Hi Laurent,

On 23/11/2021 12:11, Laurent Pinchart wrote:
> Hi Jean-Michel,
> 
> Thank you for the patch.
> 
> On Tue, Nov 23, 2021 at 10:14:47AM +0100, Jean-Michel Hautbois wrote:
>> Now that Algorithm is defined in libipa, we miss documentation for the
>> functions implemented in IPU3::Awb. Fix it.
>>
>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
>> ---
>>   src/ipa/ipu3/algorithms/awb.cpp | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
>> index c7bcb20e..85205333 100644
>> --- a/src/ipa/ipu3/algorithms/awb.cpp
>> +++ b/src/ipa/ipu3/algorithms/awb.cpp
>> @@ -193,6 +193,9 @@ Awb::Awb()
>>   
>>   Awb::~Awb() = default;
>>   
>> +/**
>> + * \brief Configure the AWB given a configInfo
> 
> Missing \param. Maybe
> 
>   * \copydoc libcamera::ipa::Algorithm::configure
> 
> would be better ? Same below.

Nice. Should I keep this patch or squash it with the one introducing the 
template class ?

> 
>> + */
>>   int Awb::configure(IPAContext &context,
>>   		   [[maybe_unused]] const IPAConfigInfo &configInfo)
>>   {
>> @@ -373,6 +376,9 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
>>   	}
>>   }
>>   
>> +/**
>> + * \brief Process IPU3 statistics, and run algorithm operations
>> + */
>>   void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
>>   {
>>   	calculateWBGains(stats);
>> @@ -394,6 +400,9 @@ constexpr uint16_t Awb::threshold(float value)
>>   	return value * 8191;
>>   }
>>   
>> +/**
>> + * \brief Fill the \a params buffer with IPU3 processing parameters for a frame
>> + */
>>   void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)
>>   {
>>   	/*
>
Laurent Pinchart Nov. 23, 2021, 2:06 p.m. UTC | #3
Hi Jean-Michel,

On Tue, Nov 23, 2021 at 02:38:25PM +0100, Jean-Michel Hautbois wrote:
> On 23/11/2021 12:11, Laurent Pinchart wrote:
> > On Tue, Nov 23, 2021 at 10:14:47AM +0100, Jean-Michel Hautbois wrote:
> >> Now that Algorithm is defined in libipa, we miss documentation for the
> >> functions implemented in IPU3::Awb. Fix it.
> >>
> >> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> >> ---
> >>   src/ipa/ipu3/algorithms/awb.cpp | 9 +++++++++
> >>   1 file changed, 9 insertions(+)
> >>
> >> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
> >> index c7bcb20e..85205333 100644
> >> --- a/src/ipa/ipu3/algorithms/awb.cpp
> >> +++ b/src/ipa/ipu3/algorithms/awb.cpp
> >> @@ -193,6 +193,9 @@ Awb::Awb()
> >>   
> >>   Awb::~Awb() = default;
> >>   
> >> +/**
> >> + * \brief Configure the AWB given a configInfo
> > 
> > Missing \param. Maybe
> > 
> >   * \copydoc libcamera::ipa::Algorithm::configure
> > 
> > would be better ? Same below.
> 
> Nice. Should I keep this patch or squash it with the one introducing the 
> template class ?

I'd squash it, otherwise you'll introduce a build warning during
bisection.

> >> + */
> >>   int Awb::configure(IPAContext &context,
> >>   		   [[maybe_unused]] const IPAConfigInfo &configInfo)
> >>   {
> >> @@ -373,6 +376,9 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
> >>   	}
> >>   }
> >>   
> >> +/**
> >> + * \brief Process IPU3 statistics, and run algorithm operations
> >> + */
> >>   void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
> >>   {
> >>   	calculateWBGains(stats);
> >> @@ -394,6 +400,9 @@ constexpr uint16_t Awb::threshold(float value)
> >>   	return value * 8191;
> >>   }
> >>   
> >> +/**
> >> + * \brief Fill the \a params buffer with IPU3 processing parameters for a frame
> >> + */
> >>   void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)
> >>   {
> >>   	/*

Patch
diff mbox series

diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
index c7bcb20e..85205333 100644
--- a/src/ipa/ipu3/algorithms/awb.cpp
+++ b/src/ipa/ipu3/algorithms/awb.cpp
@@ -193,6 +193,9 @@  Awb::Awb()
 
 Awb::~Awb() = default;
 
+/**
+ * \brief Configure the AWB given a configInfo
+ */
 int Awb::configure(IPAContext &context,
 		   [[maybe_unused]] const IPAConfigInfo &configInfo)
 {
@@ -373,6 +376,9 @@  void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
 	}
 }
 
+/**
+ * \brief Process IPU3 statistics, and run algorithm operations
+ */
 void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
 {
 	calculateWBGains(stats);
@@ -394,6 +400,9 @@  constexpr uint16_t Awb::threshold(float value)
 	return value * 8191;
 }
 
+/**
+ * \brief Fill the \a params buffer with IPU3 processing parameters for a frame
+ */
 void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)
 {
 	/*