[libcamera-devel] [PATCH v1 07/10] ipa: raspberrypi: Make RegionStats::get() always return a Region struct
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Fri Mar 24 10:13:02 CET 2023
Hi Naush
On Wed, Mar 22, 2023 at 01:06:09PM +0000, Naushir Patuck via libcamera-devel wrote:
> Update the overloaded RegionStats::get() and RegionStats::getFloating()
> member functions to return a Region struct for consistency.
>
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
> ---
> src/ipa/raspberrypi/controller/region_stats.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/ipa/raspberrypi/controller/region_stats.h b/src/ipa/raspberrypi/controller/region_stats.h
> index 9aaf3a58a6f7..a8860dc8dba2 100644
> --- a/src/ipa/raspberrypi/controller/region_stats.h
> +++ b/src/ipa/raspberrypi/controller/region_stats.h
> @@ -86,12 +86,12 @@ public:
> return get_(index);
> }
>
> - const T &get(const libcamera::Point &pos) const
> + const Region &get(const libcamera::Point &pos) const
Was this working because Region has a first member of type T ?
Anyway, looks good
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Thanks
j
> {
> return get(pos.y * size_.width + pos.x);
> }
>
> - const T &getFloating(unsigned int index) const
> + const Region &getFloating(unsigned int index) const
> {
> if (index >= numFloatingRegions())
> return default_;
> --
> 2.34.1
>
More information about the libcamera-devel
mailing list