[libcamera-devel] [PATCH] libcamera: ipa: raspberrypi: Enable focus measure without recompile
David Plowman
david.plowman at raspberrypi.com
Wed Jul 1 13:43:47 CEST 2020
HI Laurent
On Wed, 1 Jul 2020 at 10:11, Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> Hi David,
>
> Thank you for the patch.
>
> On Wed, Jul 01, 2020 at 09:53:56AM +0100, David Plowman wrote:
> > Previously output of the focus measure could be enabled without
> > recompiling (because of the RPI_LOGGING_ENABLE macro). Here we disable
> > it in the imx477 tuning, but if re-enabled there it will now be output
> > to the console (much more helpful behaviour).
> >
> > Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> > ---
> > src/ipa/raspberrypi/controller/rpi/focus.cpp | 2 +-
> > src/ipa/raspberrypi/data/imx477.json | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> > index 1e2b649..133ea6f 100644
> > --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
> > +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> > @@ -39,7 +39,7 @@ void Focus::Process(StatisticsPtr &stats, Metadata *image_metadata)
> > image_metadata->Set("focus.status", status);
> > if (print_) {
> > uint32_t value = (status.focus_measures[5] + status.focus_measures[6]) / 10;
> > - RPI_LOG("Focus contrast measure: " << value);
> > + std::cout << "Focus contrast measure: " << value << std::endl;
>
> How about using the libcamera logging infrastructure ? It would give you
> runtime-controllable log categories and levels.
Yes, thank you for the thought. I spent way longer trying to make up
my mind than such a trivial and unimportant thing really warrants! But
I think I've eventually come down on the side of using the libcamera
logging, so expect a v2 patch momentarily.
Best regards
David
>
> > }
> > }
> >
> > diff --git a/src/ipa/raspberrypi/data/imx477.json b/src/ipa/raspberrypi/data/imx477.json
> > index 389e8ce..8976e31 100644
> > --- a/src/ipa/raspberrypi/data/imx477.json
> > +++ b/src/ipa/raspberrypi/data/imx477.json
> > @@ -415,6 +415,6 @@
> > },
> > "rpi.focus":
> > {
> > - "print": 1
> > + "print": 0
> > }
> > }
>
> --
> Regards,
>
> Laurent Pinchart
More information about the libcamera-devel
mailing list