[RFC,2/4] libcamera: swstats_cpu: Drop patternSize_ documentation
diff mbox series

Message ID 20241009200110.275544-3-hdegoede@redhat.com
State New
Headers show
Series
  • libcamera: swstats_cpu: Add processFrame() method
Related show

Commit Message

Hans de Goede Oct. 9, 2024, 8:01 p.m. UTC
patternSize_ is a private variable and its meaning is already documented
in the patternSize() getter documentation.

Move the list of valid sizes to the patternSize() getter documentation
and drop the patternSize_ documentation.

While at it also add 1x1 as valid size for use with future support
of single plane non Bayer input data.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 src/libcamera/software_isp/swstats_cpu.cpp | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Kieran Bingham Oct. 9, 2024, 11:09 p.m. UTC | #1
Quoting Hans de Goede (2024-10-09 21:01:08)
> patternSize_ is a private variable and its meaning is already documented
> in the patternSize() getter documentation.
> 
> Move the list of valid sizes to the patternSize() getter documentation
> and drop the patternSize_ documentation.
> 
> While at it also add 1x1 as valid size for use with future support
> of single plane non Bayer input data.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

This seems reasonable already.

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

> ---
>  src/libcamera/software_isp/swstats_cpu.cpp | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp
> index a9a3e77a..5e4246a9 100644
> --- a/src/libcamera/software_isp/swstats_cpu.cpp
> +++ b/src/libcamera/software_isp/swstats_cpu.cpp
> @@ -58,6 +58,8 @@ namespace libcamera {
>   * also indicates if processLine2() should be called or not.
>   * This may only be called after a successful configure() call.
>   *
> + * Valid sizes are: 1x1, 2x2, 4x2 or 4x4.
> + *
>   * \return The pattern size
>   */
>  
> @@ -112,13 +114,6 @@ namespace libcamera {
>   * \brief Statistics window, set by setWindow(), used every line
>   */
>  
> -/**
> - * \var Size SwStatsCpu::patternSize_
> - * \brief The size of the bayer pattern
> - *
> - * Valid sizes are: 2x2, 4x2 or 4x4.
> - */
> -
>  /**
>   * \var unsigned int SwStatsCpu::xShift_
>   * \brief The offset of x, applied to window_.x for bayer variants
> -- 
> 2.46.2
>
Milan Zamazal Oct. 15, 2024, 3:36 p.m. UTC | #2
Hans de Goede <hdegoede@redhat.com> writes:

> patternSize_ is a private variable and its meaning is already documented
> in the patternSize() getter documentation.
>
> Move the list of valid sizes to the patternSize() getter documentation
> and drop the patternSize_ documentation.
>
> While at it also add 1x1 as valid size for use with future support
> of single plane non Bayer input data.

IIRC the inherent constraint on the widths and heights with the current
implementation is that they must be powers of 2 and IIRC it applies to
2^0 too.  So:

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

But "IIRC" is not a good way to express the requirements imposed by the
implementation.  I wonder whether we could do better.

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  src/libcamera/software_isp/swstats_cpu.cpp | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp
> index a9a3e77a..5e4246a9 100644
> --- a/src/libcamera/software_isp/swstats_cpu.cpp
> +++ b/src/libcamera/software_isp/swstats_cpu.cpp
> @@ -58,6 +58,8 @@ namespace libcamera {
>   * also indicates if processLine2() should be called or not.
>   * This may only be called after a successful configure() call.
>   *
> + * Valid sizes are: 1x1, 2x2, 4x2 or 4x4.
> + *
>   * \return The pattern size
>   */
>  
> @@ -112,13 +114,6 @@ namespace libcamera {
>   * \brief Statistics window, set by setWindow(), used every line
>   */
>  
> -/**
> - * \var Size SwStatsCpu::patternSize_
> - * \brief The size of the bayer pattern
> - *
> - * Valid sizes are: 2x2, 4x2 or 4x4.
> - */
> -
>  /**
>   * \var unsigned int SwStatsCpu::xShift_
>   * \brief The offset of x, applied to window_.x for bayer variants

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp
index a9a3e77a..5e4246a9 100644
--- a/src/libcamera/software_isp/swstats_cpu.cpp
+++ b/src/libcamera/software_isp/swstats_cpu.cpp
@@ -58,6 +58,8 @@  namespace libcamera {
  * also indicates if processLine2() should be called or not.
  * This may only be called after a successful configure() call.
  *
+ * Valid sizes are: 1x1, 2x2, 4x2 or 4x4.
+ *
  * \return The pattern size
  */
 
@@ -112,13 +114,6 @@  namespace libcamera {
  * \brief Statistics window, set by setWindow(), used every line
  */
 
-/**
- * \var Size SwStatsCpu::patternSize_
- * \brief The size of the bayer pattern
- *
- * Valid sizes are: 2x2, 4x2 or 4x4.
- */
-
 /**
  * \var unsigned int SwStatsCpu::xShift_
  * \brief The offset of x, applied to window_.x for bayer variants