Show a patch.

GET /api/1.1/patches/25731/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 25731,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25731/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25731/",
    "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": "<20260113000808.15395-12-laurent.pinchart@ideasonboard.com>",
    "date": "2026-01-13T00:07:43",
    "name": "[11/36] libcamera: yaml_parser: Replace getList() with get() specializations",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "164105b136c60285e7eb59e13440aa713a9d8993",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25731/mbox/",
    "series": [
        {
            "id": 5703,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5703/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5703",
            "date": "2026-01-13T00:07:32",
            "name": "libcamera: Global configuration file improvements",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5703/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25731/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25731/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 9787FC32AF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jan 2026 00:08:48 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3765161FDC;\n\tTue, 13 Jan 2026 01:08:48 +0100 (CET)",
            "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 7FA1861FCC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:46 +0100 (CET)",
            "from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi\n\t[81.175.209.152])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id CA019E01\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:20 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"FSV8muXB\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768262901;\n\tbh=G59KHYcrFik9PcmZ2gs4s2WjPMsap3MCsa/y+r88hHE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=FSV8muXB2OVctKaJnc95NR3WN6Imx9LaN6f9/MecBiUQrOuMS3gAT8d7XkD4ruTLo\n\tYTtQH94PW9Gzr+XBFBHnMukuKxu/UUq6wX/F9PlFT89S7zpf+vdbKvKoH7/i022t8M\n\tHOkUz0TXC9hmVU4cn6xqj4YsYAMn9qIuSA6gzHyE=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH 11/36] libcamera: yaml_parser: Replace getList() with get()\n\tspecializations",
        "Date": "Tue, 13 Jan 2026 02:07:43 +0200",
        "Message-ID": "<20260113000808.15395-12-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.51.2",
        "In-Reply-To": "<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The YamlObject class has two member function templates to get values:\nthe get() function gets a scalar value, while the getList() function\ngets a vector of scalar values.\n\nAs get() is a function template, we can provide specializations for\nvector types. This makes the code more systematic, and therefore more\nreadable. Replace all getList() occurrences, and drop the getList()\nfunction.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/yaml_parser.h      |  19 ----\n src/ipa/libipa/agc_mean_luminance.cpp         |   4 +-\n src/ipa/libipa/awb_bayes.cpp                  |   4 +-\n src/ipa/mali-c55/algorithms/lsc.cpp           |   6 +-\n src/ipa/rkisp1/algorithms/agc.cpp             |   2 +-\n src/ipa/rkisp1/algorithms/dpf.cpp             |   6 +-\n src/ipa/rkisp1/algorithms/gsl.cpp             |   8 +-\n src/ipa/rkisp1/algorithms/lsc.cpp             |   4 +-\n src/ipa/rpi/controller/rpi/agc_channel.cpp    |   4 +-\n src/ipa/rpi/controller/rpi/hdr.cpp            |   8 +-\n src/libcamera/converter/converter_dw100.cpp   |   2 +-\n src/libcamera/global_configuration.cpp        |   2 +-\n .../pipeline/virtual/config_parser.cpp        |   2 +-\n src/libcamera/yaml_parser.cpp                 | 102 ++++++++----------\n test/yaml-parser.cpp                          |   4 +-\n 15 files changed, 75 insertions(+), 102 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h\nindex 0ff026706682..7953befe11e2 100644\n--- a/include/libcamera/internal/yaml_parser.h\n+++ b/include/libcamera/internal/yaml_parser.h\n@@ -182,25 +182,6 @@ public:\n \t\treturn get<T>().value_or(std::forward<U>(defaultValue));\n \t}\n \n-#ifndef __DOXYGEN__\n-\ttemplate<typename T,\n-\t\t std::enable_if_t<\n-\t\t\t std::is_same_v<bool, T> ||\n-\t\t\t std::is_same_v<float, T> ||\n-\t\t\t std::is_same_v<double, T> ||\n-\t\t\t std::is_same_v<int8_t, T> ||\n-\t\t\t std::is_same_v<uint8_t, T> ||\n-\t\t\t std::is_same_v<int16_t, T> ||\n-\t\t\t std::is_same_v<uint16_t, T> ||\n-\t\t\t std::is_same_v<int32_t, T> ||\n-\t\t\t std::is_same_v<uint32_t, T> ||\n-\t\t\t std::is_same_v<std::string, T> ||\n-\t\t\t std::is_same_v<Size, T>> * = nullptr>\n-#else\n-\ttemplate<typename T>\n-#endif\n-\tstd::optional<std::vector<T>> getList() const;\n-\n \tDictAdapter asDict() const { return DictAdapter{ list_ }; }\n \tListAdapter asList() const { return ListAdapter{ list_ }; }\n \ndiff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\nindex 564d4143d363..72988096d384 100644\n--- a/src/ipa/libipa/agc_mean_luminance.cpp\n+++ b/src/ipa/libipa/agc_mean_luminance.cpp\n@@ -288,9 +288,9 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData)\n \t\t\t}\n \n \t\t\tstd::vector<uint32_t> exposureTimes =\n-\t\t\t\tmodeValues[\"exposureTime\"].getList<uint32_t>().value_or(std::vector<uint32_t>{});\n+\t\t\t\tmodeValues[\"exposureTime\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n \t\t\tstd::vector<double> gains =\n-\t\t\t\tmodeValues[\"gain\"].getList<double>().value_or(std::vector<double>{});\n+\t\t\t\tmodeValues[\"gain\"].get<std::vector<double>>().value_or(std::vector<double>{});\n \n \t\t\tif (exposureTimes.size() != gains.size()) {\n \t\t\t\tLOG(AgcMeanLuminance, Error)\ndiff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp\nindex d2bcbd83d7f8..595bd0705732 100644\n--- a/src/ipa/libipa/awb_bayes.cpp\n+++ b/src/ipa/libipa/awb_bayes.cpp\n@@ -211,9 +211,9 @@ int AwbBayes::readPriors(const YamlObject &tuningData)\n \t\t}\n \n \t\tstd::vector<uint32_t> temperatures =\n-\t\t\tp[\"ct\"].getList<uint32_t>().value_or(std::vector<uint32_t>{});\n+\t\t\tp[\"ct\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n \t\tstd::vector<double> probabilities =\n-\t\t\tp[\"probability\"].getList<double>().value_or(std::vector<double>{});\n+\t\t\tp[\"probability\"].get<std::vector<double>>().value_or(std::vector<double>{});\n \n \t\tif (temperatures.size() != probabilities.size()) {\n \t\t\tLOG(Awb, Error)\ndiff --git a/src/ipa/mali-c55/algorithms/lsc.cpp b/src/ipa/mali-c55/algorithms/lsc.cpp\nindex 5b042c757bc7..f75b9cd7b7b8 100644\n--- a/src/ipa/mali-c55/algorithms/lsc.cpp\n+++ b/src/ipa/mali-c55/algorithms/lsc.cpp\n@@ -48,11 +48,11 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData\n \t\t}\n \n \t\tstd::vector<uint8_t> rTable =\n-\t\t\tyamlSet[\"r\"].getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\t\t\tyamlSet[\"r\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \t\tstd::vector<uint8_t> gTable =\n-\t\t\tyamlSet[\"g\"].getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\t\t\tyamlSet[\"g\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \t\tstd::vector<uint8_t> bTable =\n-\t\t\tyamlSet[\"b\"].getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\t\t\tyamlSet[\"b\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \n \t\t/*\n \t\t * Some validation to do; only 16x16 and 32x32 tables of\ndiff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 1ecaff680978..7cc06f91ac2b 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -55,7 +55,7 @@ int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData)\n \t\t}\n \n \t\tstd::vector<uint8_t> weights =\n-\t\t\tvalue.getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\t\t\tvalue.get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \t\tif (weights.size() != context.hw.numHistogramWeights) {\n \t\t\tLOG(RkISP1Agc, Warning)\n \t\t\t\t<< \"Failed to read metering mode'\" << key << \"'\";\ndiff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\nindex 39f3e461f313..ec989bc2421f 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.cpp\n+++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n@@ -72,7 +72,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n \t *    +---------|--------> X\n \t *     -4....-1 0 1 2 3 4\n \t */\n-\tvalues = dFObject[\"g\"].getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\tvalues = dFObject[\"g\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \tif (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS) {\n \t\tLOG(RkISP1Dpf, Error)\n \t\t\t<< \"Invalid 'DomainFilter:g': expected \"\n@@ -108,7 +108,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n \t * For a 9x9 kernel, columns -6 and 6 are dropped, so coefficient\n \t * number 6 is not used.\n \t */\n-\tvalues = dFObject[\"rb\"].getList<uint8_t>().value_or(std::vector<uint8_t>{});\n+\tvalues = dFObject[\"rb\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n \tif (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS &&\n \t    values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - 1) {\n \t\tLOG(RkISP1Dpf, Error)\n@@ -137,7 +137,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n \tconst YamlObject &rFObject = tuningData[\"NoiseLevelFunction\"];\n \n \tstd::vector<uint16_t> nllValues;\n-\tnllValues = rFObject[\"coeff\"].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\tnllValues = rFObject[\"coeff\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \tif (nllValues.size() != RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS) {\n \t\tLOG(RkISP1Dpf, Error)\n \t\t\t<< \"Invalid 'RangeFilter:coeff': expected \"\ndiff --git a/src/ipa/rkisp1/algorithms/gsl.cpp b/src/ipa/rkisp1/algorithms/gsl.cpp\nindex 9604c0ac001a..7ac5dc215850 100644\n--- a/src/ipa/rkisp1/algorithms/gsl.cpp\n+++ b/src/ipa/rkisp1/algorithms/gsl.cpp\n@@ -59,7 +59,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n \t\t\t\t   const YamlObject &tuningData)\n {\n \tstd::vector<uint16_t> xIntervals =\n-\t\ttuningData[\"x-intervals\"].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\t\ttuningData[\"x-intervals\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \tif (xIntervals.size() != kDegammaXIntervals) {\n \t\tLOG(RkISP1Gsl, Error)\n \t\t\t<< \"Invalid 'x' coordinates: expected \"\n@@ -83,7 +83,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n \t\treturn -EINVAL;\n \t}\n \n-\tcurveYr_ = yObject[\"red\"].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\tcurveYr_ = yObject[\"red\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \tif (curveYr_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n \t\tLOG(RkISP1Gsl, Error)\n \t\t\t<< \"Invalid 'y:red' coordinates: expected \"\n@@ -92,7 +92,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n \t\treturn -EINVAL;\n \t}\n \n-\tcurveYg_ = yObject[\"green\"].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\tcurveYg_ = yObject[\"green\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \tif (curveYg_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n \t\tLOG(RkISP1Gsl, Error)\n \t\t\t<< \"Invalid 'y:green' coordinates: expected \"\n@@ -101,7 +101,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n \t\treturn -EINVAL;\n \t}\n \n-\tcurveYb_ = yObject[\"blue\"].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\tcurveYb_ = yObject[\"blue\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \tif (curveYb_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n \t\tLOG(RkISP1Gsl, Error)\n \t\t\t<< \"Invalid 'y:blue' coordinates: expected \"\ndiff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex e7301bfec863..429565a0b51f 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.cpp\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -252,7 +252,7 @@ private:\n \t\t\tRKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX;\n \n \t\tstd::vector<uint16_t> table =\n-\t\t\ttuningData[prop].getList<uint16_t>().value_or(std::vector<uint16_t>{});\n+\t\t\ttuningData[prop].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n \t\tif (table.size() != kLscNumSamples) {\n \t\t\tLOG(RkISP1Lsc, Error)\n \t\t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\n@@ -269,7 +269,7 @@ static std::vector<double> parseSizes(const YamlObject &tuningData,\n \t\t\t\t      const char *prop)\n {\n \tstd::vector<double> sizes =\n-\t\ttuningData[prop].getList<double>().value_or(std::vector<double>{});\n+\t\ttuningData[prop].get<std::vector<double>>().value_or(std::vector<double>{});\n \tif (sizes.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n \t\tLOG(RkISP1Lsc, Error)\n \t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\ndiff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp\nindex 154551dfacc2..c6cf1f8903f1 100644\n--- a/src/ipa/rpi/controller/rpi/agc_channel.cpp\n+++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp\n@@ -66,13 +66,13 @@ readMeteringModes(std::map<std::string, AgcMeteringMode> &metering_modes,\n \n int AgcExposureMode::read(const libcamera::YamlObject &params)\n {\n-\tauto value = params[\"shutter\"].getList<double>();\n+\tauto value = params[\"shutter\"].get<std::vector<double>>();\n \tif (!value)\n \t\treturn -EINVAL;\n \tstd::transform(value->begin(), value->end(), std::back_inserter(exposureTime),\n \t\t       [](double v) { return v * 1us; });\n \n-\tvalue = params[\"gain\"].getList<double>();\n+\tvalue = params[\"gain\"].get<std::vector<double>>();\n \tif (!value)\n \t\treturn -EINVAL;\n \tgain = std::move(*value);\ndiff --git a/src/ipa/rpi/controller/rpi/hdr.cpp b/src/ipa/rpi/controller/rpi/hdr.cpp\nindex f3da8291bf5d..06400ea79a95 100644\n--- a/src/ipa/rpi/controller/rpi/hdr.cpp\n+++ b/src/ipa/rpi/controller/rpi/hdr.cpp\n@@ -29,7 +29,7 @@ void HdrConfig::read(const libcamera::YamlObject &params, const std::string &mod\n \n \tif (!params.contains(\"cadence\"))\n \t\tLOG(RPiHdr, Fatal) << \"No cadence for HDR mode \" << name;\n-\tcadence = params[\"cadence\"].getList<unsigned int>().value();\n+\tcadence = params[\"cadence\"].get<std::vector<unsigned int>>().value();\n \tif (cadence.empty())\n \t\tLOG(RPiHdr, Fatal) << \"Empty cadence in HDR mode \" << name;\n \n@@ -69,14 +69,14 @@ void HdrConfig::read(const libcamera::YamlObject &params, const std::string &mod\n \t\ttonemap = params[\"tonemap\"].get<ipa::Pwl>(ipa::Pwl{});\n \tspeed = params[\"speed\"].get<double>(1.0);\n \tif (params.contains(\"hi_quantile_targets\")) {\n-\t\thiQuantileTargets = params[\"hi_quantile_targets\"].getList<double>().value();\n+\t\thiQuantileTargets = params[\"hi_quantile_targets\"].get<std::vector<double>>().value();\n \t\tif (hiQuantileTargets.empty() || hiQuantileTargets.size() % 2)\n \t\t\tLOG(RPiHdr, Fatal) << \"hi_quantile_targets much be even and non-empty\";\n \t} else\n \t\thiQuantileTargets = { 0.95, 0.65, 0.5, 0.28, 0.3, 0.25 };\n \thiQuantileMaxGain = params[\"hi_quantile_max_gain\"].get<double>(1.6);\n \tif (params.contains(\"quantile_targets\")) {\n-\t\tquantileTargets = params[\"quantile_targets\"].getList<double>().value();\n+\t\tquantileTargets = params[\"quantile_targets\"].get<std::vector<double>>().value();\n \t\tif (quantileTargets.empty() || quantileTargets.size() % 2)\n \t\t\tLOG(RPiHdr, Fatal) << \"quantile_targets much be even and non-empty\";\n \t} else\n@@ -84,7 +84,7 @@ void HdrConfig::read(const libcamera::YamlObject &params, const std::string &mod\n \tpowerMin = params[\"power_min\"].get<double>(0.65);\n \tpowerMax = params[\"power_max\"].get<double>(1.0);\n \tif (params.contains(\"contrast_adjustments\")) {\n-\t\tcontrastAdjustments = params[\"contrast_adjustments\"].getList<double>().value();\n+\t\tcontrastAdjustments = params[\"contrast_adjustments\"].get<std::vector<double>>().value();\n \t} else\n \t\tcontrastAdjustments = { 0.5, 0.75 };\n \ndiff --git a/src/libcamera/converter/converter_dw100.cpp b/src/libcamera/converter/converter_dw100.cpp\nindex df5155cfdc93..5782cd0b21b7 100644\n--- a/src/libcamera/converter/converter_dw100.cpp\n+++ b/src/libcamera/converter/converter_dw100.cpp\n@@ -126,7 +126,7 @@ int ConverterDW100Module::init(const YamlObject &params)\n \t\treturn -EINVAL;\n \t}\n \n-\tconst auto coeffs = coefficients.getList<double>();\n+\tconst auto coeffs = coefficients.get<std::vector<double>>();\n \tif (!coeffs) {\n \t\tLOG(Converter, Error) << \"Dewarp parameters 'coefficients' value is not a list\";\n \t\treturn -EINVAL;\ndiff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp\nindex e086246d6856..99d16e7c38c6 100644\n--- a/src/libcamera/global_configuration.cpp\n+++ b/src/libcamera/global_configuration.cpp\n@@ -152,7 +152,7 @@ std::optional<std::vector<std::string>> GlobalConfiguration::listOption(\n \t\tif (!*c)\n \t\t\treturn {};\n \t}\n-\treturn c->getList<std::string>();\n+\treturn c->get<std::vector<std::string>>();\n }\n \n /**\ndiff --git a/src/libcamera/pipeline/virtual/config_parser.cpp b/src/libcamera/pipeline/virtual/config_parser.cpp\nindex 1d3d9ba87ec0..fdc729509371 100644\n--- a/src/libcamera/pipeline/virtual/config_parser.cpp\n+++ b/src/libcamera/pipeline/virtual/config_parser.cpp\n@@ -115,7 +115,7 @@ int ConfigParser::parseSupportedFormats(const YamlObject &cameraConfigData,\n \t\t\tstd::vector<int64_t> frameRates;\n \t\t\tif (supportedResolution.contains(\"frame_rates\")) {\n \t\t\t\tauto frameRatesList =\n-\t\t\t\t\tsupportedResolution[\"frame_rates\"].getList<int>();\n+\t\t\t\t\tsupportedResolution[\"frame_rates\"].get<std::vector<int>>();\n \t\t\t\tif (!frameRatesList || (frameRatesList->size() != 1 &&\n \t\t\t\t\t\t\tframeRatesList->size() != 2)) {\n \t\t\t\t\tLOG(Virtual, Error) << \"Invalid frame_rates: either one or two values\";\ndiff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp\nindex a21e589fdd86..2b3723287051 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -109,12 +109,16 @@ std::size_t YamlObject::size() const\n \n /**\n  * \\fn template<typename T> YamlObject::get<T>() const\n+ * \\tparam T Type of the value\n  * \\brief Parse the YamlObject as a \\a T value\n  *\n  * This function parses the value of the YamlObject as a \\a T object, and\n  * returns the value. If parsing fails (usually because the YamlObject doesn't\n  * store a \\a T value), std::nullopt is returned.\n  *\n+ * If the type \\a T is an std::vector, the YamlObject will be parsed as a list\n+ * of values.\n+ *\n  * \\return The YamlObject value, or std::nullopt if parsing failed\n  */\n \n@@ -127,6 +131,9 @@ std::size_t YamlObject::size() const\n  * returns the value. If parsing fails (usually because the YamlObject doesn't\n  * store a \\a T value), the \\a defaultValue is returned.\n  *\n+ * Unlike the get() function, this overload does not support std::vector for the\n+ * type \\a T.\n+ *\n  * \\return The YamlObject value, or \\a defaultValue if parsing failed\n  */\n \n@@ -239,65 +246,50 @@ YamlObject::Accessor<Size>::get(const YamlObject &obj) const\n \treturn Size(*width, *height);\n }\n \n-#endif /* __DOXYGEN__ */\n-\n-/**\n- * \\fn template<typename T> YamlObject::getList<T>() const\n- * \\brief Parse the YamlObject as a list of \\a T\n- *\n- * This function parses the value of the YamlObject as a list of \\a T objects,\n- * and returns the value as a \\a std::vector<T>. If parsing fails, std::nullopt\n- * is returned.\n- *\n- * \\return The YamlObject value as a std::vector<T>, or std::nullopt if parsing\n- * failed\n- */\n-\n-#ifndef __DOXYGEN__\n-\n-template<typename T,\n-\t std::enable_if_t<\n-\t\t std::is_same_v<bool, T> ||\n-\t\t std::is_same_v<float, T> ||\n-\t\t std::is_same_v<double, T> ||\n-\t\t std::is_same_v<int8_t, T> ||\n-\t\t std::is_same_v<uint8_t, T> ||\n-\t\t std::is_same_v<int16_t, T> ||\n-\t\t std::is_same_v<uint16_t, T> ||\n-\t\t std::is_same_v<int32_t, T> ||\n-\t\t std::is_same_v<uint32_t, T> ||\n-\t\t std::is_same_v<std::string, T> ||\n-\t\t std::is_same_v<Size, T>> *>\n-std::optional<std::vector<T>> YamlObject::getList() const\n+template<typename T>\n+struct YamlObject::Accessor<std::vector<T>, std::enable_if_t<\n+\tstd::is_same_v<bool, T> ||\n+\tstd::is_same_v<float, T> ||\n+\tstd::is_same_v<double, T> ||\n+\tstd::is_same_v<int8_t, T> ||\n+\tstd::is_same_v<uint8_t, T> ||\n+\tstd::is_same_v<int16_t, T> ||\n+\tstd::is_same_v<uint16_t, T> ||\n+\tstd::is_same_v<int32_t, T> ||\n+\tstd::is_same_v<uint32_t, T> ||\n+\tstd::is_same_v<std::string, T> ||\n+\tstd::is_same_v<Size, T>>>\n {\n-\tif (type_ != Type::List)\n-\t\treturn std::nullopt;\n-\n-\tstd::vector<T> values;\n-\tvalues.reserve(list_.size());\n-\n-\tfor (const YamlObject &entry : asList()) {\n-\t\tconst auto value = entry.get<T>();\n-\t\tif (!value)\n+\tstd::optional<std::vector<T>> get(const YamlObject &obj) const\n+\t{\n+\t\tif (obj.type_ != Type::List)\n \t\t\treturn std::nullopt;\n-\t\tvalues.emplace_back(*value);\n+\n+\t\tstd::vector<T> values;\n+\t\tvalues.reserve(obj.list_.size());\n+\n+\t\tfor (const YamlObject &entry : obj.asList()) {\n+\t\t\tconst auto value = entry.get<T>();\n+\t\t\tif (!value)\n+\t\t\t\treturn std::nullopt;\n+\t\t\tvalues.emplace_back(*value);\n+\t\t}\n+\n+\t\treturn values;\n \t}\n+};\n \n-\treturn values;\n-}\n-\n-template std::optional<std::vector<bool>> YamlObject::getList<bool>() const;\n-template std::optional<std::vector<float>> YamlObject::getList<float>() const;\n-template std::optional<std::vector<double>> YamlObject::getList<double>() const;\n-template std::optional<std::vector<int8_t>> YamlObject::getList<int8_t>() const;\n-template std::optional<std::vector<uint8_t>> YamlObject::getList<uint8_t>() const;\n-template std::optional<std::vector<int16_t>> YamlObject::getList<int16_t>() const;\n-template std::optional<std::vector<uint16_t>> YamlObject::getList<uint16_t>() const;\n-template std::optional<std::vector<int32_t>> YamlObject::getList<int32_t>() const;\n-template std::optional<std::vector<uint32_t>> YamlObject::getList<uint32_t>() const;\n-template std::optional<std::vector<std::string>> YamlObject::getList<std::string>() const;\n-template std::optional<std::vector<Size>> YamlObject::getList<Size>() const;\n-\n+template struct YamlObject::Accessor<std::vector<bool>>;\n+template struct YamlObject::Accessor<std::vector<float>>;\n+template struct YamlObject::Accessor<std::vector<double>>;\n+template struct YamlObject::Accessor<std::vector<int8_t>>;\n+template struct YamlObject::Accessor<std::vector<uint8_t>>;\n+template struct YamlObject::Accessor<std::vector<int16_t>>;\n+template struct YamlObject::Accessor<std::vector<uint16_t>>;\n+template struct YamlObject::Accessor<std::vector<int32_t>>;\n+template struct YamlObject::Accessor<std::vector<uint32_t>>;\n+template struct YamlObject::Accessor<std::vector<std::string>>;\n+template struct YamlObject::Accessor<std::vector<Size>>;\n #endif /* __DOXYGEN__ */\n \n /**\ndiff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp\nindex 1b22c87b72f1..566401afcab6 100644\n--- a/test/yaml-parser.cpp\n+++ b/test/yaml-parser.cpp\n@@ -587,9 +587,9 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tconst auto &values = firstElement.getList<uint16_t>();\n+\t\tconst auto &values = firstElement.get<std::vector<uint16_t>>();\n \t\tif (!values || values->size() != 2 || (*values)[0] != 1 || (*values)[1] != 2) {\n-\t\t\tcerr << \"getList() failed to return correct vector\" << std::endl;\n+\t\t\tcerr << \"get() failed to return correct vector\" << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n",
    "prefixes": [
        "11/36"
    ]
}