[PATCH 2/5] utils: tuning: rkisp1: Add skeletal AGC to the rkisp1 tuning script

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Apr 12 11:08:12 CEST 2024


Quoting Kieran Bingham (2024-04-12 10:04:36)
> Quoting Stefan Klug (2024-04-12 08:47:53)
> > Hi Paul,
> > 
> > thanks for the patch.
> > Looks good to me.
> > 
> > Reviewed-by: Stefan Klug <stefan.klug at ideasonboard.com> 
> > 
> > Cheers,
> > Stefan
> > 
> > On Fri, Apr 05, 2024 at 11:53:32PM +0900, Paul Elder wrote:
> > > Add the skeletal AGC module to the rkisp1 tuning script. For now it just
> > > spits out hardcoded values.
> > > 
> > > Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> > > ---
> > >  utils/tuning/rkisp1.py | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py
> > > index 1cea6ddb..d42646de 100755
> > > --- a/utils/tuning/rkisp1.py
> > > +++ b/utils/tuning/rkisp1.py
> > > @@ -11,6 +11,7 @@ import libtuning as lt
> > >  from libtuning.parsers import YamlParser
> > >  from libtuning.generators import YamlOutput
> > >  from libtuning.modules.lsc import LSCRkISP1
> > > +from libtuning.modules.agc import AGCRkISP1
> > >  
> > >  tuner = lt.Tuner('RkISP1')
> > >  tuner.add(LSCRkISP1(
> > > @@ -32,9 +33,10 @@ tuner.add(LSCRkISP1(
> > >            # values.  This can also be a custom function.
> > >            smoothing_function=lt.smoothing.MedianBlur(3),
> > >            ))
> > > +tuner.add(AGCRkISP1(debug=[lt.Debug.Plot], hw_rev='V10'))
> 
> Are the AGC tuning parameters expected to differ between hw_revs ?

Aha, yes I see it probably is. So doesn't that mean we'll need to
distinguish between these when loading the files?

I.e. - the tuning files will have to be rkisp1 version specfiic in the
file name that gets loaded. That could lead to quite a bit of tuning
file duplication ;-(

Or otherwise, the tuning process should write both AGC configurations to
the same file, and then the IPA would load and only read the one it is
interested in, without having to duplicate all of the LSC etc.

--
Kieran


> 
> > >  tuner.set_input_parser(YamlParser())
> > >  tuner.set_output_formatter(YamlOutput())
> > > -tuner.set_output_order([LSCRkISP1])
> > > +tuner.set_output_order([AGCRkISP1, LSCRkISP1])
> > >  
> > >  if __name__ == '__main__':
> > >      sys.exit(tuner.run(sys.argv))
> > > -- 
> > > 2.39.2
> > >


More information about the libcamera-devel mailing list