Patch Detail
Show a patch.
GET /api/1.1/patches/16788/?format=api
{ "id": 16788, "url": "https://patchwork.libcamera.org/api/1.1/patches/16788/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16788/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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-16-naush@raspberrypi.com>", "date": "2022-07-26T12:45:47", "name": "[libcamera-devel,15/17] ipa: raspberryip: Remove all exception throw statements", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1752c050f6e37bbed8172c9818e9fe847da12e80", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16788/mbox/", "series": [ { "id": 3325, "url": "https://patchwork.libcamera.org/api/1.1/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/16788/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16788/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 0E094C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jul 2022 12:46:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE86663328;\n\tTue, 26 Jul 2022 14:46:18 +0200 (CEST)", "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 81E0A63329\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 14:46:12 +0200 (CEST)", "by mail-wr1-x436.google.com with SMTP id u5so19995458wrm.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 05:46:12 -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.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 26 Jul 2022 05:46:10 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658839578;\n\tbh=IvE0AUztvqKidMRgwxhQcrPEL0XYqVbeJBUIM7fqEII=;\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=RUMksnQ9ukO1pT2WJRmrtIGPCuS6ljSTbw6rMJzi7h0suFo7UESw+48MXQfTNArMb\n\tI9ks7lMOp25KrLXVlnY6dSWI3A6spH+5TbMGuEFVKnf6U8dtpmHQPpqFFqy/OPcA8o\n\txGxBVh9l3SYWIWvIlUmLFS66OW6wTXEz37jtCGUdPZfoKz8E6sHQ+nUlx74US5XsNr\n\tEZqFfadqg3dbCbA+YJn0N4XnXhtG+orkXoHxnBYt9xMp3OZirHGq0ZcwFWgl7Tuu0f\n\tmv7hU86SaXoFMjf/B3HB/AE/nVKPq5NQ8quSYIO1l5lc0iCQJGh2KrHFBMBcNjz7wP\n\tL6SGyCVnEqhag==", "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=l5fV6kN4UH7/CrZllIjvQWPAyZOX1oO6ts232+aaqGA=;\n\tb=UY/TetYcyuYO8S/DAbGIdmBh+A8rLgG0OCTaaMUvduQz6YmFx2q1hrpcSHb08TuT5B\n\tBA2lt0jLKQE8/YH6Oo1LnVyP5/5ObXuEan6JfvkVtysdkP67q1AkFFSRYJGRyQqWaCYf\n\theoNROg2RSDXXGcAKCfVdEZsFBemIN9WHFo9iXN1GuJAvu9AuAcyPYMvwiYfChBPeEKZ\n\t/x4PiNF/Z/NNsbLJJcJho8ihN8+TX3spmzRDxQ6iFefTiF8Svlw9M1Ywma8XBSxz1+f/\n\txYUTPXoeTIOzu22pTDvtCazD7Ha0dDHGv9s4OlwgLBvxXuBlxPd22HvvwdRLaohn/mbg\n\tdktg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"UY/TetYc\"; 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=l5fV6kN4UH7/CrZllIjvQWPAyZOX1oO6ts232+aaqGA=;\n\tb=URI+au1pShoCKWapu99y/h/vAYMm4CvEAaeDGTW3+TFA/h1W1h7kuAzhkx6AgAqMS/\n\tTHCsx5ygg/HzrVjyqN0pedRwmWpH9H/gjlIoiucuCFKDJY3vx/EWOWP7wLm5FkIOwoDw\n\trji5YyxcMyRBOmQ75XUPSnug6q/xYR4+aTuAPjHSPqSNkxone+Tc5YgDoJZkj7oNVKx6\n\tvEizWoES24z3oNtXBS+47kXNGt9fBvwo23ge1UZQKacpjjhZ4N5zXgnHQxyK1mD433o9\n\t0HNIjEXheiOegPlJrTofDhuldBRuVK2uYtIy5kHAdNGMFoofTIeCmCbl2pbe70FKg9PD\n\tFjSg==", "X-Gm-Message-State": "AJIora+tqoex+50y9HsSwgr47NnhrMms+z95o4lBh6wW9w7YT8ydUk+g\n\tr2YKRdPEw+JpnQ7NY3AuP4fRZwM0mr2zVA==", "X-Google-Smtp-Source": "AGRyM1tFGBsilgArYnBFUvf8wAPQOliz761paG9co5Y06S/z+xyitpdWadr/tJJYzZ3A2YE3ayIstQ==", "X-Received": "by 2002:adf:f452:0:b0:21e:86ac:cd74 with SMTP id\n\tf18-20020adff452000000b0021e86accd74mr7180742wrp.194.1658839571503; \n\tTue, 26 Jul 2022 05:46:11 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 26 Jul 2022 13:45:47 +0100", "Message-Id": "<20220726124549.1646-16-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 15/17] ipa: raspberryip: Remove all\n\texception throw statements", "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": "Replace all exception throw statements with LOG(RPi*, Fatal) error messages.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/rpi/agc.cpp | 26 +++++++++------------\n src/ipa/raspberrypi/controller/rpi/alsc.cpp | 25 ++++++++------------\n src/ipa/raspberrypi/controller/rpi/awb.cpp | 18 ++++++--------\n src/ipa/raspberrypi/controller/rpi/ccm.cpp | 9 ++++---\n src/ipa/raspberrypi/controller/rpi/dpc.cpp | 2 +-\n src/ipa/raspberrypi/controller/rpi/geq.cpp | 2 +-\n 6 files changed, 34 insertions(+), 48 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 000ab03e2ff7..e9a945e3a630 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -35,11 +35,11 @@ void AgcMeteringMode::read(boost::property_tree::ptree const ¶ms)\n \tint num = 0;\n \tfor (auto &p : params.get_child(\"weights\")) {\n \t\tif (num == AGC_STATS_SIZE)\n-\t\t\tthrow std::runtime_error(\"AgcConfig: too many weights\");\n+\t\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: too many weights\";\n \t\tweights[num++] = p.second.get_value<double>();\n \t}\n \tif (num != AGC_STATS_SIZE)\n-\t\tthrow std::runtime_error(\"AgcConfig: insufficient weights\");\n+\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: insufficient weights\";\n }\n \n static std::string\n@@ -78,11 +78,11 @@ void AgcExposureMode::read(boost::property_tree::ptree const ¶ms)\n \tint numShutters = readList(shutter, params.get_child(\"shutter\"));\n \tint numAgs = readList(gain, params.get_child(\"gain\"));\n \tif (numShutters < 2 || numAgs < 2)\n-\t\tthrow std::runtime_error(\n-\t\t\t\"AgcConfig: must have at least two entries in exposure profile\");\n+\t\tLOG(RPiAgc, Fatal)\n+\t\t\t<< \"AgcConfig: must have at least two entries in exposure profile\";\n \tif (numShutters != numAgs)\n-\t\tthrow std::runtime_error(\n-\t\t\t\"AgcConfig: expect same number of exposure and gain entries in exposure profile\");\n+\t\tLOG(RPiAgc, Fatal)\n+\t\t\t<< \"AgcConfig: expect same number of exposure and gain entries in exposure profile\";\n }\n \n static std::string\n@@ -106,8 +106,7 @@ void AgcConstraint::read(boost::property_tree::ptree const ¶ms)\n \ttransform(boundString.begin(), boundString.end(),\n \t\t boundString.begin(), ::toupper);\n \tif (boundString != \"UPPER\" && boundString != \"LOWER\")\n-\t\tthrow std::runtime_error(\n-\t\t\t\"AGC constraint type should be UPPER or LOWER\");\n+\t\tLOG(RPiAgc, Fatal) << \"AGC constraint type should be UPPER or LOWER\";\n \tbound = boundString == \"UPPER\" ? Bound::UPPER : Bound::LOWER;\n \tqLo = params.get<double>(\"q_lo\");\n \tqHi = params.get<double>(\"q_hi\");\n@@ -465,8 +464,7 @@ void Agc::housekeepConfig()\n \tif (strcmp(meteringModeName_.c_str(), status_.meteringMode)) {\n \t\tauto it = config_.meteringModes.find(meteringModeName_);\n \t\tif (it == config_.meteringModes.end())\n-\t\t\tthrow std::runtime_error(\"Agc: no metering mode \" +\n-\t\t\t\t\t\t meteringModeName_);\n+\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no metering mode \" << meteringModeName_;\n \t\tmeteringMode_ = &it->second;\n \t\tcopyString(meteringModeName_, status_.meteringMode,\n \t\t\t sizeof(status_.meteringMode));\n@@ -474,8 +472,7 @@ void Agc::housekeepConfig()\n \tif (strcmp(exposureModeName_.c_str(), status_.exposureMode)) {\n \t\tauto it = config_.exposureModes.find(exposureModeName_);\n \t\tif (it == config_.exposureModes.end())\n-\t\t\tthrow std::runtime_error(\"Agc: no exposure profile \" +\n-\t\t\t\t\t\t exposureModeName_);\n+\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no exposure profile \" << exposureModeName_;\n \t\texposureMode_ = &it->second;\n \t\tcopyString(exposureModeName_, status_.exposureMode,\n \t\t\t sizeof(status_.exposureMode));\n@@ -484,8 +481,7 @@ void Agc::housekeepConfig()\n \t\tauto it =\n \t\t\tconfig_.constraintModes.find(constraintModeName_);\n \t\tif (it == config_.constraintModes.end())\n-\t\t\tthrow std::runtime_error(\"Agc: no constraint list \" +\n-\t\t\t\t\t\t constraintModeName_);\n+\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no constraint list \" << constraintModeName_;\n \t\tconstraintMode_ = &it->second;\n \t\tcopyString(constraintModeName_, status_.constraintMode,\n \t\t\t sizeof(status_.constraintMode));\n@@ -502,7 +498,7 @@ void Agc::fetchCurrentExposure(Metadata *imageMetadata)\n \tDeviceStatus *deviceStatus =\n \t\timageMetadata->getLocked<DeviceStatus>(\"device.status\");\n \tif (!deviceStatus)\n-\t\tthrow std::runtime_error(\"Agc: no device metadata\");\n+\t\tLOG(RPiAgc, Fatal) << \"Agc: no device metadata\";\n \tcurrent_.shutter = deviceStatus->shutterSpeed;\n \tcurrent_.analogueGain = deviceStatus->analogueGain;\n \tAgcStatus *agcStatus =\ndiff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\nindex 35da336ebc72..7df89445711a 100644\n--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n@@ -54,10 +54,10 @@ static void generateLut(double *lut, boost::property_tree::ptree const ¶ms)\n {\n \tdouble cstrength = params.get<double>(\"corner_strength\", 2.0);\n \tif (cstrength <= 1.0)\n-\t\tthrow std::runtime_error(\"Alsc: corner_strength must be > 1.0\");\n+\t\tLOG(RPiAlsc, Fatal) << \"Alsc: corner_strength must be > 1.0\";\n \tdouble asymmetry = params.get<double>(\"asymmetry\", 1.0);\n \tif (asymmetry < 0)\n-\t\tthrow std::runtime_error(\"Alsc: asymmetry must be >= 0\");\n+\t\tLOG(RPiAlsc, Fatal) << \"Alsc: asymmetry must be >= 0\";\n \tdouble f1 = cstrength - 1, f2 = 1 + sqrt(cstrength);\n \tdouble R2 = X * Y / 4 * (1 + asymmetry * asymmetry);\n \tint num = 0;\n@@ -79,12 +79,11 @@ static void readLut(double *lut, boost::property_tree::ptree const ¶ms)\n \tconst int maxNum = XY;\n \tfor (auto &p : params) {\n \t\tif (num == maxNum)\n-\t\t\tthrow std::runtime_error(\n-\t\t\t\t\"Alsc: too many entries in LSC table\");\n+\t\t\tLOG(RPiAlsc, Fatal) << \"Alsc: too many entries in LSC table\";\n \t\tlut[num++] = p.second.get_value<double>();\n \t}\n \tif (num < maxNum)\n-\t\tthrow std::runtime_error(\"Alsc: too few entries in LSC table\");\n+\t\tLOG(RPiAlsc, Fatal) << \"Alsc: too few entries in LSC table\";\n }\n \n static void readCalibrations(std::vector<AlscCalibration> &calibrations,\n@@ -96,9 +95,8 @@ static void readCalibrations(std::vector<AlscCalibration> &calibrations,\n \t\tfor (auto &p : params.get_child(name)) {\n \t\t\tdouble ct = p.second.get<double>(\"ct\");\n \t\t\tif (ct <= lastCt)\n-\t\t\t\tthrow std::runtime_error(\n-\t\t\t\t\t\"Alsc: entries in \" + name +\n-\t\t\t\t\t\" must be in increasing ct order\");\n+\t\t\t\tLOG(RPiAlsc, Fatal)\n+\t\t\t\t\t<< \"Alsc: entries in \" << name << \" must be in increasing ct order\";\n \t\t\tAlscCalibration calibration;\n \t\t\tcalibration.ct = lastCt = ct;\n \t\t\tboost::property_tree::ptree const &table =\n@@ -106,17 +104,14 @@ static void readCalibrations(std::vector<AlscCalibration> &calibrations,\n \t\t\tint num = 0;\n \t\t\tfor (auto it = table.begin(); it != table.end(); it++) {\n \t\t\t\tif (num == XY)\n-\t\t\t\t\tthrow std::runtime_error(\n-\t\t\t\t\t\t\"Alsc: too many values for ct \" +\n-\t\t\t\t\t\tstd::to_string(ct) + \" in \" +\n-\t\t\t\t\t\tname);\n+\t\t\t\t\tLOG(RPiAlsc, Fatal)\n+\t\t\t\t\t\t<< \"Alsc: too many values for ct \" << ct << \" in \" << name;\n \t\t\t\tcalibration.table[num++] =\n \t\t\t\t\tit->second.get_value<double>();\n \t\t\t}\n \t\t\tif (num != XY)\n-\t\t\t\tthrow std::runtime_error(\n-\t\t\t\t\t\"Alsc: too few values for ct \" +\n-\t\t\t\t\tstd::to_string(ct) + \" in \" + name);\n+\t\t\t\tLOG(RPiAlsc, Fatal)\n+\t\t\t\t\t<< \"Alsc: too few values for ct \" << ct << \" in \" << name;\n \t\t\tcalibrations.push_back(calibration);\n \t\t\tLOG(RPiAlsc, Debug)\n \t\t\t\t<< \"Read \" << name << \" calibration for ct \" << ct;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex a20a09e987af..c379e6b92649 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -46,18 +46,15 @@ static void readCtCurve(Pwl &ctR, Pwl &ctB,\n \t\tdouble ct = it->second.get_value<double>();\n \t\tassert(it == params.begin() || ct != ctR.domain().end);\n \t\tif (++it == params.end())\n-\t\t\tthrow std::runtime_error(\n-\t\t\t\t\"AwbConfig: incomplete CT curve entry\");\n+\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: incomplete CT curve entry\";\n \t\tctR.append(ct, it->second.get_value<double>());\n \t\tif (++it == params.end())\n-\t\t\tthrow std::runtime_error(\n-\t\t\t\t\"AwbConfig: incomplete CT curve entry\");\n+\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: incomplete CT curve entry\";\n \t\tctB.append(ct, it->second.get_value<double>());\n \t\tnum++;\n \t}\n \tif (num < 2)\n-\t\tthrow std::runtime_error(\n-\t\t\t\"AwbConfig: insufficient points in CT curve\");\n+\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: insufficient points in CT curve\";\n }\n \n void AwbConfig::read(boost::property_tree::ptree const ¶ms)\n@@ -74,12 +71,11 @@ void AwbConfig::read(boost::property_tree::ptree const ¶ms)\n \t\t\tAwbPrior prior;\n \t\t\tprior.read(p.second);\n \t\t\tif (!priors.empty() && prior.lux <= priors.back().lux)\n-\t\t\t\tthrow std::runtime_error(\"AwbConfig: Prior must be ordered in increasing lux value\");\n+\t\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: Prior must be ordered in increasing lux value\";\n \t\t\tpriors.push_back(prior);\n \t\t}\n \t\tif (priors.empty())\n-\t\t\tthrow std::runtime_error(\n-\t\t\t\t\"AwbConfig: no AWB priors configured\");\n+\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: no AWB priors configured\";\n \t}\n \tif (params.get_child_optional(\"modes\")) {\n \t\tfor (auto &p : params.get_child(\"modes\")) {\n@@ -88,7 +84,7 @@ void AwbConfig::read(boost::property_tree::ptree const ¶ms)\n \t\t\t\tdefaultMode = &modes[p.first];\n \t\t}\n \t\tif (defaultMode == nullptr)\n-\t\t\tthrow std::runtime_error(\"AwbConfig: no AWB modes configured\");\n+\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: no AWB modes configured\";\n \t}\n \tminPixels = params.get<double>(\"min_pixels\", 16.0);\n \tminG = params.get<uint16_t>(\"min_G\", 32);\n@@ -98,7 +94,7 @@ void AwbConfig::read(boost::property_tree::ptree const ¶ms)\n \ttransversePos = params.get<double>(\"transverse_pos\", 0.01);\n \ttransverseNeg = params.get<double>(\"transverse_neg\", 0.01);\n \tif (transversePos <= 0 || transverseNeg <= 0)\n-\t\tthrow std::runtime_error(\"AwbConfig: transverse_pos/neg must be > 0\");\n+\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: transverse_pos/neg must be > 0\";\n \tsensitivityR = params.get<double>(\"sensitivity_r\", 1.0);\n \tsensitivityB = params.get<double>(\"sensitivity_b\", 1.0);\n \tif (bayes) {\ndiff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\nindex 8095c42dc0c8..cf0c85d26cf9 100644\n--- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n@@ -45,11 +45,11 @@ void Matrix::read(boost::property_tree::ptree const ¶ms)\n \tint n = 0;\n \tfor (auto it = params.begin(); it != params.end(); it++) {\n \t\tif (n++ == 9)\n-\t\t\tthrow std::runtime_error(\"Ccm: too many values in CCM\");\n+\t\t\tLOG(RPiCcm, Fatal) << \"Ccm: too many values in CCM\";\n \t\t*ptr++ = it->second.get_value<double>();\n \t}\n \tif (n < 9)\n-\t\tthrow std::runtime_error(\"Ccm: too few values in CCM\");\n+\t\tLOG(RPiCcm, Fatal) << \"Ccm: too few values in CCM\";\n }\n \n Ccm::Ccm(Controller *controller)\n@@ -70,12 +70,11 @@ void Ccm::read(boost::property_tree::ptree const ¶ms)\n \t\tctCcm.ccm.read(p.second.get_child(\"ccm\"));\n \t\tif (!config_.ccms.empty() &&\n \t\t ctCcm.ct <= config_.ccms.back().ct)\n-\t\t\tthrow std::runtime_error(\n-\t\t\t\t\"Ccm: CCM not in increasing colour temperature order\");\n+\t\t\tLOG(RPiCcm, Fatal) << \"Ccm: CCM not in increasing colour temperature order\";\n \t\tconfig_.ccms.push_back(std::move(ctCcm));\n \t}\n \tif (config_.ccms.empty())\n-\t\tthrow std::runtime_error(\"Ccm: no CCMs specified\");\n+\t\tLOG(RPiCcm, Fatal) << \"Ccm: no CCMs specified\";\n }\n \n void Ccm::setSaturation(double saturation)\ndiff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\nindex 9cd78abe28d6..d5d784e7ca64 100644\n--- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n@@ -35,7 +35,7 @@ void Dpc::read(boost::property_tree::ptree const ¶ms)\n {\n \tconfig_.strength = params.get<int>(\"strength\", 1);\n \tif (config_.strength < 0 || config_.strength > 2)\n-\t\tthrow std::runtime_error(\"Dpc: bad strength value\");\n+\t\tLOG(RPiDpc, Fatal) << \"Dpc: bad strength value\";\n }\n \n void Dpc::prepare(Metadata *imageMetadata)\ndiff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\nindex 4e8ed696851b..696da4aeea59 100644\n--- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n@@ -40,7 +40,7 @@ void Geq::read(boost::property_tree::ptree const ¶ms)\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+\t\tLOG(RPiGeq, Fatal) << \"Geq: bad slope value\";\n \tif (params.get_child_optional(\"strength\"))\n \t\tconfig_.strength.read(params.get_child(\"strength\"));\n }\n", "prefixes": [ "libcamera-devel", "15/17" ] }