Patch Detail
Show a patch.
GET /api/patches/16782/?format=api
{ "id": 16782, "url": "https://patchwork.libcamera.org/api/patches/16782/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16782/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220726124549.1646-10-naush@raspberrypi.com>", "date": "2022-07-26T12:45:41", "name": "[libcamera-devel,09/17] DNI: ipa: raspberrypi: Code refactoring to match style guidelines", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "34e16f66aa780a6761fa0e153c9e7de01c763ab9", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16782/mbox/", "series": [ { "id": 3325, "url": "https://patchwork.libcamera.org/api/series/3325/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3325", "date": "2022-07-26T12:45:32", "name": "Raspberry Pi IPA code refactor", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3325/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16782/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16782/checks/", "tags": {}, "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 3F036C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jul 2022 12:46:10 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CCCA063331;\n\tTue, 26 Jul 2022 14:46:09 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 401916331D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 14:46:06 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\tr1-20020a05600c35c100b003a326685e7cso778148wmq.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 05:46:06 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ty17-20020adfd091000000b0021e87ec980bsm5948460wrh.84.2022.07.26.05.46.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 26 Jul 2022 05:46:03 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658839569;\n\tbh=MrGiF9VO/RPYTur3ZPQxhi3q2+T9zGx+WewZhBx/N3s=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=a4+ickVICypJXCb/umvS1DmqeihKbSw+bxaArgA1ULO7slyLL7AprC1pHdVC3Sohd\n\tuht+Tn3ie1l9xqS6AMwgvGKNIA9nxiJ622AgoTYpA5+ebXgD1tdkw3x/cKDT46uv0H\n\ttUeGB2rqKUr7bvi6o88Rltd/zwxewsxVPIcQQagSBOV3WjZXdKqAW8Da4FfEqk1IAR\n\tZ4MgkpdCoN53uVybIWMyL35qr2dB+S0UgL2VzJKGuHh3FOZnd/g2D7NILZjdOTKtMD\n\tx3g0ZktwHP6ipw8teq1wEDJ7YO0x2xhe3cClNOtGzhkIvW32ms5YjwcvBY6NQvBU18\n\t7GnQnVL7w1x0A==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=h53DiA/UCvKsJUis2lWATuAAfe37Smke2YjB7DNAO+E=;\n\tb=UPMOmb+0h1IaBB25MTVD4TOW9NyHcblnCEbbT5nCXdzV4CtIaSxhbl0aZEq9OoX08E\n\tKXS+9DcEEfvt5xTkq8rNIPtUoE/VYx5p7L1FMxH/k8qJuG3x2s2qlGcOoh0nnz1tghwE\n\tnMLRoJnZ4p0ghsX7dKEYElNPdXZKHE1eaycF4LlM2Jc6qC0ePaEbD8jgxW5R2YIqODv2\n\twBmwSZT2okyf/wCjydno+cGp7Qxtj7PoUxB0Jw3gJyxX77KcSnGz+hDN2M9QyPdi5jIh\n\tBvPCfH9L5Y+J/RX0cq7dsPP79nRrxfc6Q5G/a6g6oUy83KNQQnEBOjXWJisbzlIO1kl0\n\t+Y5Q==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"UPMOmb+0\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=h53DiA/UCvKsJUis2lWATuAAfe37Smke2YjB7DNAO+E=;\n\tb=J5P8pzcClcyyly3lZj9Y3t42VWiMwjLE6zRje5hjaw94vusufQT5LBXKJF5QSUYWvi\n\tfDS3UxcKQ7v5Zd+F1NqmwdecOEbfxjSPt9vqtTmBCNwGkZhwkhOUQJT8U0LhVFVVwmbg\n\tRdqko+yJGOynTm9JmHnF2mlzgu8sDU/Y6+qG/mUutdw5FzXo0Yg6UTrAo8SHSL8awg2D\n\tjnhSRb0NizPR8lITpVr18GksGuRpYxzOcX3nuEFiS7dnf30NJm3dbo/sl+C0RLGvB7VN\n\t/rXsuq5reXRsm1ElNecdJG99Gw0zHmhoNaC83n2ZXtXEfKb66dMfQGTnqDueJJZESvlP\n\t2WPA==", "X-Gm-Message-State": "AJIora+vgcpsA5RRL80tKYw4D7ifgzUa23M2i06dY/xki+UfSadNYgem\n\tyJ7/T2cfy0mVEBV2YyVVok9B9+OnPZzkjw==", "X-Google-Smtp-Source": "AGRyM1t+Pxr3VPnIXeJegdx14gPG+rYDf2iEgBmlEUCPKjSq53K1JafokmFyh/W/QRF8BySARhtvKA==", "X-Received": "by 2002:a05:600c:4e0d:b0:3a3:bc7:e9ec with SMTP id\n\tb13-20020a05600c4e0d00b003a30bc7e9ecmr25186916wmq.167.1658839565280; \n\tTue, 26 Jul 2022 05:46:05 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 26 Jul 2022 13:45:41 +0100", "Message-Id": "<20220726124549.1646-10-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220726124549.1646-1-naush@raspberrypi.com>", "References": "<20220726124549.1646-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 09/17] 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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Refactor the source files src/ipa/raspberrypi/controller/rps/[f|g|l]* to match the\nrecommended formatting guidelines for the libcamera project. The vast majority\nof changes in this commit comprise of switching from snake_case to CamelCase,\nand starting class member functions with a lower case character.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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(-)", "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp\nindex 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);\ndiff --git a/src/ipa/raspberrypi/controller/rpi/focus.hpp b/src/ipa/raspberrypi/controller/rpi/focus.hpp\nindex 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 */\ndiff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\nindex 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 ¶ms)\n+void Geq::read(boost::property_tree::ptree const ¶ms)\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);\ndiff --git a/src/ipa/raspberrypi/controller/rpi/geq.hpp b/src/ipa/raspberrypi/controller/rpi/geq.hpp\nindex 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 ¶ms) override;\n-\tvoid Prepare(Metadata *image_metadata) override;\n+\tchar const *name() const override;\n+\tvoid read(boost::property_tree::ptree const ¶ms) override;\n+\tvoid prepare(Metadata *imageMetadata) override;\n \n private:\n \tGeqConfig config_;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\nindex 4d145b6ff0e9..739a3d533874 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 ¶ms)\n+void Lux::read(boost::property_tree::ptree const ¶ms)\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);\ndiff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\nindex 3ebd35d1e382..bd49a409d402 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 ¶ms) 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 ¶ms) 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+\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 };\n", "prefixes": [ "libcamera-devel", "09/17" ] }