[libcamera-devel,v3,0/5] ipa: ipu3: af: Small improvements
mbox series

Message ID 20220325092555.1799897-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • ipa: ipu3: af: Small improvements
Related show

Message

Kieran Bingham March 25, 2022, 9:25 a.m. UTC
Following review of the IPU3 Af implementation, the following additional
improvements were identified.

No functional change to the running of the algorithm is intended or
expected, though this does remove a memcpy, and adapts to use a Span for
range based iterators, as well as hopefully make it easier to use custom
ROI's and return the AF regions in later developments.

 *** This is only compile tested! ***

Kate/JM - could you test this please?

v3:
 - Minor cleanups from Laurent and collect tags.
 - Keeping the two loop implementation of Af::afEstimateVariance
   to prevent risk of "catasrophic cancellation".

Kieran Bingham (5):
  ipa: ipu3: af: Move constants to implementation
  ipa: ipu3: af: Use geometry classes to perform grid centering
  ipa: ipu3: af: Remove redundant memcpy
  ipa: ipu3: af: Use Span for y_table_item_t
  ipa: ipu3: af: Simplify accumulations of y_items

 src/ipa/ipu3/algorithms/af.cpp | 140 +++++++++++++--------------------
 src/ipa/ipu3/algorithms/af.h   |  15 +---
 2 files changed, 56 insertions(+), 99 deletions(-)

Comments

Kate Hsuan March 29, 2022, 12:36 a.m. UTC | #1
Hi Kieran,

On Fri, Mar 25, 2022 at 5:26 PM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
>
> Following review of the IPU3 Af implementation, the following additional
> improvements were identified.
>
> No functional change to the running of the algorithm is intended or
> expected, though this does remove a memcpy, and adapts to use a Span for
> range based iterators, as well as hopefully make it easier to use custom
> ROI's and return the AF regions in later developments.
>
>  *** This is only compile tested! ***
>
> Kate/JM - could you test this please?

Okay, I can test it, please allow me some time :)

Thank you.

>
> v3:
>  - Minor cleanups from Laurent and collect tags.
>  - Keeping the two loop implementation of Af::afEstimateVariance
>    to prevent risk of "catasrophic cancellation".
>
> Kieran Bingham (5):
>   ipa: ipu3: af: Move constants to implementation
>   ipa: ipu3: af: Use geometry classes to perform grid centering
>   ipa: ipu3: af: Remove redundant memcpy
>   ipa: ipu3: af: Use Span for y_table_item_t
>   ipa: ipu3: af: Simplify accumulations of y_items
>
>  src/ipa/ipu3/algorithms/af.cpp | 140 +++++++++++++--------------------
>  src/ipa/ipu3/algorithms/af.h   |  15 +---
>  2 files changed, 56 insertions(+), 99 deletions(-)
>
> --
> 2.32.0
>
Jean-Michel Hautbois March 29, 2022, 5:54 a.m. UTC | #2
Hi Kieran,

On 25/03/2022 10:25, Kieran Bingham wrote:
> Following review of the IPU3 Af implementation, the following additional
> improvements were identified.
> 
> No functional change to the running of the algorithm is intended or
> expected, though this does remove a memcpy, and adapts to use a Span for
> range based iterators, as well as hopefully make it easier to use custom
> ROI's and return the AF regions in later developments.
> 
>   *** This is only compile tested! ***
> 
> Kate/JM - could you test this please?

For my side:
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

> 
> v3:
>   - Minor cleanups from Laurent and collect tags.
>   - Keeping the two loop implementation of Af::afEstimateVariance
>     to prevent risk of "catasrophic cancellation".
> 
> Kieran Bingham (5):
>    ipa: ipu3: af: Move constants to implementation
>    ipa: ipu3: af: Use geometry classes to perform grid centering
>    ipa: ipu3: af: Remove redundant memcpy
>    ipa: ipu3: af: Use Span for y_table_item_t
>    ipa: ipu3: af: Simplify accumulations of y_items
> 
>   src/ipa/ipu3/algorithms/af.cpp | 140 +++++++++++++--------------------
>   src/ipa/ipu3/algorithms/af.h   |  15 +---
>   2 files changed, 56 insertions(+), 99 deletions(-)
>
Kate Hsuan March 29, 2022, 6:53 a.m. UTC | #3
Hi Kieran,

On Tue, Mar 29, 2022 at 1:54 PM Jean-Michel Hautbois
<jeanmichel.hautbois@ideasonboard.com> wrote:
>
> Hi Kieran,
>
> On 25/03/2022 10:25, Kieran Bingham wrote:
> > Following review of the IPU3 Af implementation, the following additional
> > improvements were identified.
> >
> > No functional change to the running of the algorithm is intended or
> > expected, though this does remove a memcpy, and adapts to use a Span for
> > range based iterators, as well as hopefully make it easier to use custom
> > ROI's and return the AF regions in later developments.
> >
> >   *** This is only compile tested! ***
> >
> > Kate/JM - could you test this please?
>
> For my side:
> Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
>
> >
> > v3:
> >   - Minor cleanups from Laurent and collect tags.
> >   - Keeping the two loop implementation of Af::afEstimateVariance
> >     to prevent risk of "catasrophic cancellation".
> >
> > Kieran Bingham (5):
> >    ipa: ipu3: af: Move constants to implementation
> >    ipa: ipu3: af: Use geometry classes to perform grid centering
> >    ipa: ipu3: af: Remove redundant memcpy
> >    ipa: ipu3: af: Use Span for y_table_item_t
> >    ipa: ipu3: af: Simplify accumulations of y_items
> >
> >   src/ipa/ipu3/algorithms/af.cpp | 140 +++++++++++++--------------------
> >   src/ipa/ipu3/algorithms/af.h   |  15 +---
> >   2 files changed, 56 insertions(+), 99 deletions(-)
> >
>

For my side

Tested-by: Kate Hsuan <hpa@redhat.com>