[{"id":24126,"web_url":"https://patchwork.libcamera.org/comment/24126/","msgid":"<Yt8DdsL8ug7e2akb@pendragon.ideasonboard.com>","date":"2022-07-25T20:56:22","subject":"Re: [libcamera-devel] [PATCH 09/15] DNI: ipa: raspberrypi: Code\n\trefactoring to match style guidelines","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Mon, Jul 25, 2022 at 02:46:33PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Refactor the source files src/ipa/raspberrypi/controller/rps/[f|g|l]* to match the\n> recommended formatting guidelines for the libcamera project. The vast majority\n> of changes in this commit comprise of switching from snake_case to CamelCase,\n> and starting class member functions with a lower case character.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/focus.cpp | 14 ++--\n>  src/ipa/raspberrypi/controller/rpi/focus.hpp |  4 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.cpp   | 48 +++++++-------\n>  src/ipa/raspberrypi/controller/rpi/geq.hpp   |  6 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp   | 70 ++++++++++----------\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp   | 22 +++---\n>  6 files changed, 81 insertions(+), 83 deletions(-)\n\n[snip]","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F10F5BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Jul 2022 20:56:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 610D563312;\n\tMon, 25 Jul 2022 22:56:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E9A796330A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jul 2022 22:56:26 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 61BA46D1;\n\tMon, 25 Jul 2022 22:56:26 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658782588;\n\tbh=yEk31ryOIauMdsXajh+gIR7i7QA211AG20XaF4OhCg4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=aw9929KCmTY98zn6lKRB9oea1s/0f/Ky1RkSUI51VrRCsVip9HclGfF8Fh2Bvm/EZ\n\tto6QpfyM16sPORqJ+ADJ6Ti0WQRu1vmV+gjG+9xt2TtX384eNRrw6b+C9RHXR/dDBV\n\t2aQtW6BrYeWKl8sG1fFOrdNEZM3xV3+0Byu16rANJPtcwnGGwaGaIgvrz9kWOmXroA\n\tnrP/gGpIv1LdNZ5Z8E1GtTp8zhVDJ9mmzZUh4Hp98xDKxe66/fQSeVJa/mFf3zfkDL\n\thmdAN6cKTSmPlLqRSnE+ZkwL+gLiUUdSGOCyn1xka9++AQ/iLY66pSTHvbtneKlBP8\n\tcVFckqtiNgLbQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658782586;\n\tbh=yEk31ryOIauMdsXajh+gIR7i7QA211AG20XaF4OhCg4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=I4PZh7gaqwrQVbdBzKXfcW14j5dYQkKx66YLo6WXtURdQi5dSh8ETVIWh4ZoEfCJB\n\t0BxEOeOY2CXAIV/lCdLto2XovUHq4WKFJD/xvDKUm7iSmYcgvn3STwOpKlnbG0OCVw\n\t8IGJR4VaqZV/3zaYxS+2n1cOf1x1FHq5QT273PkI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"I4PZh7ga\"; dkim-atps=neutral","Date":"Mon, 25 Jul 2022 23:56:22 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yt8DdsL8ug7e2akb@pendragon.ideasonboard.com>","References":"<20220725134639.4572-1-naush@raspberrypi.com>\n\t<20220725134639.4572-10-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220725134639.4572-10-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 09/15] DNI: ipa: raspberrypi: Code\n\trefactoring to match style guidelines","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24134,"web_url":"https://patchwork.libcamera.org/comment/24134/","msgid":"<Yt8b0YQpQEo7OzkB@pendragon.ideasonboard.com>","date":"2022-07-25T22:40:17","subject":"Re: [libcamera-devel] [PATCH 09/15] DNI: ipa: raspberrypi: Code\n\trefactoring to match style guidelines","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOne comment actually.\n\nOn Mon, Jul 25, 2022 at 02:46:33PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Refactor the source files src/ipa/raspberrypi/controller/rps/[f|g|l]* to match the\n> recommended formatting guidelines for the libcamera project. The vast majority\n> of changes in this commit comprise of switching from snake_case to CamelCase,\n> and starting class member functions with a lower case character.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/ipa/raspberrypi/controller/rpi/focus.cpp | 14 ++--\n>  src/ipa/raspberrypi/controller/rpi/focus.hpp |  4 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.cpp   | 48 +++++++-------\n>  src/ipa/raspberrypi/controller/rpi/geq.hpp   |  6 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp   | 70 ++++++++++----------\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp   | 22 +++---\n>  6 files changed, 81 insertions(+), 83 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> index a87ec802b964..90f36e58f28c 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> @@ -23,28 +23,28 @@ Focus::Focus(Controller *controller)\n>  {\n>  }\n>  \n> -char const *Focus::Name() const\n> +char const *Focus::name() const\n>  {\n>  \treturn NAME;\n>  }\n>  \n> -void Focus::Process(StatisticsPtr &stats, Metadata *image_metadata)\n> +void Focus::process(StatisticsPtr &stats, Metadata *imageMetadata)\n>  {\n>  \tFocusStatus status;\n>  \tunsigned int i;\n>  \tfor (i = 0; i < FOCUS_REGIONS; i++)\n> -\t\tstatus.focus_measures[i] = stats->focus_stats[i].contrast_val[1][1] / 1000;\n> +\t\tstatus.focusMeasures[i] = stats->focus_stats[i].contrast_val[1][1] / 1000;\n>  \tstatus.num = i;\n> -\timage_metadata->Set(\"focus.status\", status);\n> +\timageMetadata->set(\"focus.status\", status);\n>  \n>  \tLOG(RPiFocus, Debug)\n>  \t\t<< \"Focus contrast measure: \"\n> -\t\t<< (status.focus_measures[5] + status.focus_measures[6]) / 10;\n> +\t\t<< (status.focusMeasures[5] + status.focusMeasures[6]) / 10;\n>  }\n>  \n>  /* Register algorithm with the system. */\n> -static Algorithm *Create(Controller *controller)\n> +static Algorithm *create(Controller *controller)\n>  {\n>  \treturn new Focus(controller);\n>  }\n> -static RegisterAlgorithm reg(NAME, &Create);\n> +static RegisterAlgorithm reg(NAME, &create);\n> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.hpp b/src/ipa/raspberrypi/controller/rpi/focus.hpp\n> index 131b1d0f2fbf..a9207eb3cc23 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/focus.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/focus.hpp\n> @@ -21,8 +21,8 @@ class Focus : public Algorithm\n>  {\n>  public:\n>  \tFocus(Controller *controller);\n> -\tchar const *Name() const override;\n> -\tvoid Process(StatisticsPtr &stats, Metadata *image_metadata) override;\n> +\tchar const *name() const override;\n> +\tvoid process(StatisticsPtr &stats, Metadata *imageMetadata) override;\n>  };\n>  \n>  } /* namespace RPiController */\n> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> index 4530cb75792c..0da5efdf3d3d 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> @@ -28,54 +28,52 @@ Geq::Geq(Controller *controller)\n>  {\n>  }\n>  \n> -char const *Geq::Name() const\n> +char const *Geq::name() const\n>  {\n>  \treturn NAME;\n>  }\n>  \n> -void Geq::Read(boost::property_tree::ptree const &params)\n> +void Geq::read(boost::property_tree::ptree const &params)\n>  {\n>  \tconfig_.offset = params.get<uint16_t>(\"offset\", 0);\n>  \tconfig_.slope = params.get<double>(\"slope\", 0.0);\n>  \tif (config_.slope < 0.0 || config_.slope >= 1.0)\n>  \t\tthrow std::runtime_error(\"Geq: bad slope value\");\n>  \tif (params.get_child_optional(\"strength\"))\n> -\t\tconfig_.strength.Read(params.get_child(\"strength\"));\n> +\t\tconfig_.strength.read(params.get_child(\"strength\"));\n>  }\n>  \n> -void Geq::Prepare(Metadata *image_metadata)\n> +void Geq::prepare(Metadata *imageMetadata)\n>  {\n> -\tLuxStatus lux_status = {};\n> -\tlux_status.lux = 400;\n> -\tif (image_metadata->Get(\"lux.status\", lux_status))\n> +\tLuxStatus luxStatus = {};\n> +\tluxStatus.lux = 400;\n> +\tif (imageMetadata->get(\"lux.status\", luxStatus))\n>  \t\tLOG(RPiGeq, Warning) << \"no lux data found\";\n> -\tDeviceStatus device_status;\n> -\tdevice_status.analogue_gain = 1.0; // in case not found\n> -\tif (image_metadata->Get(\"device.status\", device_status))\n> +\tDeviceStatus deviceStatus;\n> +\tdeviceStatus.analogueGain = 1.0; // in case not found\n> +\tif (imageMetadata->get(\"device.status\", deviceStatus))\n>  \t\tLOG(RPiGeq, Warning)\n>  \t\t\t<< \"no device metadata - use analogue gain of 1x\";\n> -\tGeqStatus geq_status = {};\n> -\tdouble strength =\n> -\t\tconfig_.strength.Empty()\n> +\tGeqStatus geqStatus = {};\n> +\tdouble strength = config_.strength.empty()\n>  \t\t\t? 1.0\n> -\t\t\t: config_.strength.Eval(config_.strength.Domain().Clip(\n> -\t\t\t\t  lux_status.lux));\n> -\tstrength *= device_status.analogue_gain;\n> +\t\t\t: config_.strength.eval(config_.strength.domain().clip(luxStatus.lux));\n> +\tstrength *= deviceStatus.analogueGain;\n>  \tdouble offset = config_.offset * strength;\n>  \tdouble slope = config_.slope * strength;\n> -\tgeq_status.offset = std::min(65535.0, std::max(0.0, offset));\n> -\tgeq_status.slope = std::min(.99999, std::max(0.0, slope));\n> +\tgeqStatus.offset = std::min(65535.0, std::max(0.0, offset));\n> +\tgeqStatus.slope = std::min(.99999, std::max(0.0, slope));\n>  \tLOG(RPiGeq, Debug)\n> -\t\t<< \"offset \" << geq_status.offset << \" slope \"\n> -\t\t<< geq_status.slope << \" (analogue gain \"\n> -\t\t<< device_status.analogue_gain << \" lux \"\n> -\t\t<< lux_status.lux << \")\";\n> -\timage_metadata->Set(\"geq.status\", geq_status);\n> +\t\t<< \"offset \" << geqStatus.offset << \" slope \"\n> +\t\t<< geqStatus.slope << \" (analogue gain \"\n> +\t\t<< deviceStatus.analogueGain << \" lux \"\n> +\t\t<< luxStatus.lux << \")\";\n> +\timageMetadata->set(\"geq.status\", geqStatus);\n>  }\n>  \n>  // Register algorithm with the system.\n> -static Algorithm *Create(Controller *controller)\n> +static Algorithm *create(Controller *controller)\n>  {\n>  \treturn (Algorithm *)new Geq(controller);\n>  }\n> -static RegisterAlgorithm reg(NAME, &Create);\n> +static RegisterAlgorithm reg(NAME, &create);\n> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.hpp b/src/ipa/raspberrypi/controller/rpi/geq.hpp\n> index 8ba3046b2a2b..bdbc55b2e2d9 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/geq.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/geq.hpp\n> @@ -23,9 +23,9 @@ class Geq : public Algorithm\n>  {\n>  public:\n>  \tGeq(Controller *controller);\n> -\tchar const *Name() const override;\n> -\tvoid Read(boost::property_tree::ptree const &params) override;\n> -\tvoid Prepare(Metadata *image_metadata) override;\n> +\tchar const *name() const override;\n> +\tvoid read(boost::property_tree::ptree const &params) override;\n> +\tvoid prepare(Metadata *imageMetadata) override;\n>  \n>  private:\n>  \tGeqConfig config_;\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> index 4d145b6ff0e9..10654fbba94a 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> @@ -31,74 +31,74 @@ Lux::Lux(Controller *controller)\n>  \tstatus_.lux = 400;\n>  }\n>  \n> -char const *Lux::Name() const\n> +char const *Lux::name() const\n>  {\n>  \treturn NAME;\n>  }\n>  \n> -void Lux::Read(boost::property_tree::ptree const &params)\n> +void Lux::read(boost::property_tree::ptree const &params)\n>  {\n> -\treference_shutter_speed_ =\n> +\treferenceshutterSpeed_ =\n>  \t\tparams.get<double>(\"reference_shutter_speed\") * 1.0us;\n> -\treference_gain_ = params.get<double>(\"reference_gain\");\n> -\treference_aperture_ = params.get<double>(\"reference_aperture\", 1.0);\n> -\treference_Y_ = params.get<double>(\"reference_Y\");\n> -\treference_lux_ = params.get<double>(\"reference_lux\");\n> -\tcurrent_aperture_ = reference_aperture_;\n> +\treferenceGain_ = params.get<double>(\"reference_gain\");\n> +\treferenceAperture_ = params.get<double>(\"reference_aperture\", 1.0);\n> +\treferenceY_ = params.get<double>(\"reference_Y\");\n> +\treferenceLux_ = params.get<double>(\"reference_lux\");\n> +\tcurrentAperture_ = referenceAperture_;\n>  }\n>  \n> -void Lux::SetCurrentAperture(double aperture)\n> +void Lux::setCurrentAperture(double aperture)\n>  {\n> -\tcurrent_aperture_ = aperture;\n> +\tcurrentAperture_ = aperture;\n>  }\n>  \n> -void Lux::Prepare(Metadata *image_metadata)\n> +void Lux::prepare(Metadata *imageMetadata)\n>  {\n>  \tstd::unique_lock<std::mutex> lock(mutex_);\n> -\timage_metadata->Set(\"lux.status\", status_);\n> +\timageMetadata->set(\"lux.status\", status_);\n>  }\n>  \n> -void Lux::Process(StatisticsPtr &stats, Metadata *image_metadata)\n> +void Lux::process(StatisticsPtr &stats, Metadata *imageMetadata)\n>  {\n> -\tDeviceStatus device_status;\n> -\tif (image_metadata->Get(\"device.status\", device_status) == 0) {\n> -\t\tdouble current_gain = device_status.analogue_gain;\n> -\t\tdouble current_aperture = device_status.aperture.value_or(current_aperture_);\n> +\tDeviceStatus deviceStatus;\n> +\tif (imageMetadata->get(\"device.status\", deviceStatus) == 0) {\n> +\t\tdouble currentGain = deviceStatus.analogueGain;\n> +\t\tdouble currentAperture = deviceStatus.aperture.value_or(currentAperture_);\n>  \t\tuint64_t sum = 0;\n>  \t\tuint32_t num = 0;\n>  \t\tuint32_t *bin = stats->hist[0].g_hist;\n> -\t\tconst int num_bins = sizeof(stats->hist[0].g_hist) /\n> -\t\t\t\t     sizeof(stats->hist[0].g_hist[0]);\n> -\t\tfor (int i = 0; i < num_bins; i++)\n> +\t\tconst int numBins = sizeof(stats->hist[0].g_hist) /\n> +\t\t\t\t    sizeof(stats->hist[0].g_hist[0]);\n> +\t\tfor (int i = 0; i < numBins; i++)\n>  \t\t\tsum += bin[i] * (uint64_t)i, num += bin[i];\n>  \t\t// add .5 to reflect the mid-points of bins\n> -\t\tdouble current_Y = sum / (double)num + .5;\n> -\t\tdouble gain_ratio = reference_gain_ / current_gain;\n> -\t\tdouble shutter_speed_ratio =\n> -\t\t\treference_shutter_speed_ / device_status.shutter_speed;\n> -\t\tdouble aperture_ratio = reference_aperture_ / current_aperture;\n> -\t\tdouble Y_ratio = current_Y * (65536 / num_bins) / reference_Y_;\n> -\t\tdouble estimated_lux = shutter_speed_ratio * gain_ratio *\n> -\t\t\t\t       aperture_ratio * aperture_ratio *\n> -\t\t\t\t       Y_ratio * reference_lux_;\n> +\t\tdouble currentY = sum / (double)num + .5;\n> +\t\tdouble gainRatio = referenceGain_ / currentGain;\n> +\t\tdouble shutterSpeedRatio =\n> +\t\t\treferenceshutterSpeed_ / deviceStatus.shutterSpeed;\n> +\t\tdouble apertureRatio = referenceAperture_ / currentAperture;\n> +\t\tdouble yRatio = currentY * (65536 / numBins) / referenceY_;\n> +\t\tdouble estimatedLux = shutterSpeedRatio * gainRatio *\n> +\t\t\t\t      apertureRatio * apertureRatio *\n> +\t\t\t\t      yRatio * referenceLux_;\n>  \t\tLuxStatus status;\n> -\t\tstatus.lux = estimated_lux;\n> -\t\tstatus.aperture = current_aperture;\n> -\t\tLOG(RPiLux, Debug) << \": estimated lux \" << estimated_lux;\n> +\t\tstatus.lux = estimatedLux;\n> +\t\tstatus.aperture = currentAperture;\n> +\t\tLOG(RPiLux, Debug) << \": estimated lux \" << estimatedLux;\n>  \t\t{\n>  \t\t\tstd::unique_lock<std::mutex> lock(mutex_);\n>  \t\t\tstatus_ = status;\n>  \t\t}\n>  \t\t// Overwrite the metadata here as well, so that downstream\n>  \t\t// algorithms get the latest value.\n> -\t\timage_metadata->Set(\"lux.status\", status);\n> +\t\timageMetadata->set(\"lux.status\", status);\n>  \t} else\n>  \t\tLOG(RPiLux, Warning) << \": no device metadata\";\n>  }\n>  \n>  // Register algorithm with the system.\n> -static Algorithm *Create(Controller *controller)\n> +static Algorithm *create(Controller *controller)\n>  {\n>  \treturn (Algorithm *)new Lux(controller);\n>  }\n> -static RegisterAlgorithm reg(NAME, &Create);\n> +static RegisterAlgorithm reg(NAME, &create);\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> index 3ebd35d1e382..98cfd0ac8bd0 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> @@ -21,21 +21,21 @@ class Lux : public Algorithm\n>  {\n>  public:\n>  \tLux(Controller *controller);\n> -\tchar const *Name() const override;\n> -\tvoid Read(boost::property_tree::ptree const &params) override;\n> -\tvoid Prepare(Metadata *image_metadata) override;\n> -\tvoid Process(StatisticsPtr &stats, Metadata *image_metadata) override;\n> -\tvoid SetCurrentAperture(double aperture);\n> +\tchar const *name() const override;\n> +\tvoid read(boost::property_tree::ptree const &params) override;\n> +\tvoid prepare(Metadata *imageMetadata) override;\n> +\tvoid process(StatisticsPtr &stats, Metadata *imageMetadata) override;\n> +\tvoid setCurrentAperture(double aperture);\n>  \n>  private:\n>  \t// These values define the conditions of the reference image, against\n>  \t// which we compare the new image.\n> -\tlibcamera::utils::Duration reference_shutter_speed_;\n> -\tdouble reference_gain_;\n> -\tdouble reference_aperture_; // units of 1/f\n> -\tdouble reference_Y_; // out of 65536\n> -\tdouble reference_lux_;\n> -\tdouble current_aperture_;\n> +\tlibcamera::utils::Duration referenceshutterSpeed_;\n\nThis should be referenceShutterSpeed_.\n\n> +\tdouble referenceGain_;\n> +\tdouble referenceAperture_; // units of 1/f\n> +\tdouble referenceY_; // out of 65536\n> +\tdouble referenceLux_;\n> +\tdouble currentAperture_;\n>  \tLuxStatus status_;\n>  \tstd::mutex mutex_;\n>  };","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C108ABE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Jul 2022 22:40:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1C1163312;\n\tTue, 26 Jul 2022 00:40:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B0E26603E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 00:40:22 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1C3DD6D7;\n\tTue, 26 Jul 2022 00:40:22 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658788824;\n\tbh=tPIkO3kb2KuuDz7g+pryhBO7Ft1//Z8ufoOoygBS9u8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=jMtmS571yXpjEPNP8vfbp7dMftiMoiv5lqR1cXh9kuSSJD9G5v21cm4SDJBY+rUnk\n\tlWc/EYvxerl8UhJTi0P/1XVB4xGFMwSYbXrZLDZFAI2wxQKzD3v+Lz+LZ5yCmFvyXK\n\t7clIIt+h6FuZ68QBKUymH2PdHvufl8h31RrSxTFJ+7BM3DXbn+W2/NMpWsDf/b1qjL\n\tKK1p/nVZnquUYeMk8T4nr/MI9dqHE+duRAzxOCGsVa7v/T3iZOOnYMLUrzqX5k/vya\n\t1xWPsKD5T0HPgejmuXoDdB2MMN2fedxC3wZ9ucDSAY9fGMGlIKPfsRmB5ZKpgWmeKv\n\tNobUGRkw2hHvQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658788822;\n\tbh=tPIkO3kb2KuuDz7g+pryhBO7Ft1//Z8ufoOoygBS9u8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lUNd0AqziojrRv/QeVPK4Uhqjs3cWi06yIoYd+N1CiHBz5h5i3IEDDwJcl/9xCigl\n\tiHZG1fQixwbBdIonLedZrW9UMQs9fEoTD3x6nm+aZ8naQlC8FDHNx1mB8IRgwbmBqq\n\tnvn9VlsWTQcTKl2ohuGyWyqAru0sSbPGThZrkDpE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lUNd0Aqz\"; dkim-atps=neutral","Date":"Tue, 26 Jul 2022 01:40:17 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yt8b0YQpQEo7OzkB@pendragon.ideasonboard.com>","References":"<20220725134639.4572-1-naush@raspberrypi.com>\n\t<20220725134639.4572-10-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220725134639.4572-10-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 09/15] DNI: ipa: raspberrypi: Code\n\trefactoring to match style guidelines","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]