[{"id":38695,"web_url":"https://patchwork.libcamera.org/comment/38695/","msgid":"<98c37d93-0dff-47ca-9e58-e8ea01d83e8f@ideasonboard.com>","date":"2026-05-04T08:48:37","subject":"Re: [PATCH 2/2] treewide: Use utils::defopt","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 05. 04. 0:53 keltezéssel, Laurent Pinchart írta:\n> Calling std::optional::value_or() constructs the value passed as an\n> argument to the function, even if the std::optional already contains a\n> valus. This can be fairly inefficient when using values whose default\n> constructor is expensive. Fix it by using utils::defopt.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n\nLooks ok to me.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/android/camera_capabilities.cpp      | 5 +++--\n>   src/ipa/libipa/agc_mean_luminance.cpp    | 6 ++++--\n>   src/ipa/libipa/awb_bayes.cpp             | 6 ++++--\n>   src/ipa/mali-c55/algorithms/lsc.cpp      | 8 +++++---\n>   src/ipa/rkisp1/algorithms/agc.cpp        | 2 +-\n>   src/ipa/rkisp1/algorithms/dpf.cpp        | 7 ++++---\n>   src/ipa/rkisp1/algorithms/gsl.cpp        | 8 ++++----\n>   src/ipa/rkisp1/algorithms/lsc.cpp        | 4 ++--\n>   src/libcamera/ipa_manager.cpp            | 2 +-\n>   src/libcamera/ipa_proxy.cpp              | 4 ++--\n>   src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +-\n>   src/v4l2/v4l2_compat_manager.cpp         | 2 +-\n>   test/value-node.cpp                      | 4 ++--\n>   13 files changed, 34 insertions(+), 26 deletions(-)\n> \n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index b161bc6b3ed6..6b58dd554873 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -17,6 +17,7 @@\n>   #include <hardware/camera3.h>\n>   \n>   #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n>   \n>   #include <libcamera/control_ids.h>\n>   #include <libcamera/controls.h>\n> @@ -1064,7 +1065,7 @@ int CameraCapabilities::initializeStaticMetadata()\n>   \t/* Sensor static metadata. */\n>   \tstd::array<int32_t, 2> pixelArraySize;\n>   \t{\n> -\t\tconst Size &size = properties.get(properties::PixelArraySize).value_or(Size{});\n> +\t\tconst Size &size = properties.get(properties::PixelArraySize).value_or(utils::defopt);\n>   \t\tpixelArraySize[0] = size.width;\n>   \t\tpixelArraySize[1] = size.height;\n>   \t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,\n> @@ -1083,7 +1084,7 @@ int CameraCapabilities::initializeStaticMetadata()\n>   \n>   \t{\n>   \t\tconst Span<const Rectangle> rects =\n> -\t\t\tproperties.get(properties::PixelArrayActiveAreas).value_or(Span<const Rectangle>{});\n> +\t\t\tproperties.get(properties::PixelArrayActiveAreas).value_or(utils::defopt);\n>   \t\tstd::vector<int32_t> data{\n>   \t\t\tstatic_cast<int32_t>(rects[0].x),\n>   \t\t\tstatic_cast<int32_t>(rects[0].y),\n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index 1d385551adc6..c226dd23552c 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -11,6 +11,8 @@\n>   #include <cmath>\n>   \n>   #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>   #include <libcamera/control_ids.h>\n>   \n>   #include \"exposure_mode_helper.h\"\n> @@ -288,9 +290,9 @@ int AgcMeanLuminance::parseExposureModes(const ValueNode &tuningData)\n>   \t\t\t}\n>   \n>   \t\t\tstd::vector<uint32_t> exposureTimes =\n> -\t\t\t\tmodeValues[\"exposureTime\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n> +\t\t\t\tmodeValues[\"exposureTime\"].get<std::vector<uint32_t>>().value_or(utils::defopt);\n>   \t\t\tstd::vector<double> gains =\n> -\t\t\t\tmodeValues[\"gain\"].get<std::vector<double>>().value_or(std::vector<double>{});\n> +\t\t\t\tmodeValues[\"gain\"].get<std::vector<double>>().value_or(utils::defopt);\n>   \n>   \t\t\tif (exposureTimes.size() != gains.size()) {\n>   \t\t\t\tLOG(AgcMeanLuminance, Error)\n> diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp\n> index a1412c8bd2b5..9fd85e5a4505 100644\n> --- a/src/ipa/libipa/awb_bayes.cpp\n> +++ b/src/ipa/libipa/awb_bayes.cpp\n> @@ -16,6 +16,8 @@\n>   #include <vector>\n>   \n>   #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>   #include <libcamera/control_ids.h>\n>   \n>   #include \"colours.h\"\n> @@ -211,9 +213,9 @@ int AwbBayes::readPriors(const ValueNode &tuningData)\n>   \t\t}\n>   \n>   \t\tstd::vector<uint32_t> temperatures =\n> -\t\t\tp[\"ct\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n> +\t\t\tp[\"ct\"].get<std::vector<uint32_t>>().value_or(utils::defopt);\n>   \t\tstd::vector<double> probabilities =\n> -\t\t\tp[\"probability\"].get<std::vector<double>>().value_or(std::vector<double>{});\n> +\t\t\tp[\"probability\"].get<std::vector<double>>().value_or(utils::defopt);\n>   \n>   \t\tif (temperatures.size() != probabilities.size()) {\n>   \t\t\tLOG(Awb, Error)\n> diff --git a/src/ipa/mali-c55/algorithms/lsc.cpp b/src/ipa/mali-c55/algorithms/lsc.cpp\n> index fe230fdff418..36e50163aecc 100644\n> --- a/src/ipa/mali-c55/algorithms/lsc.cpp\n> +++ b/src/ipa/mali-c55/algorithms/lsc.cpp\n> @@ -7,6 +7,8 @@\n>   \n>   #include \"lsc.h\"\n>   \n> +#include <libcamera/base/utils.h>\n> +\n>   #include \"libcamera/internal/value_node.h\"\n>   \n>   namespace libcamera {\n> @@ -48,11 +50,11 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const ValueNode &tuningData)\n>   \t\t}\n>   \n>   \t\tstd::vector<uint8_t> rTable =\n> -\t\t\tyamlSet[\"r\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\t\t\tyamlSet[\"r\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>   \t\tstd::vector<uint8_t> gTable =\n> -\t\t\tyamlSet[\"g\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\t\t\tyamlSet[\"g\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>   \t\tstd::vector<uint8_t> bTable =\n> -\t\t\tyamlSet[\"b\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\t\t\tyamlSet[\"b\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>   \n>   \t\t/*\n>   \t\t * Some validation to do; only 16x16 and 32x32 tables of\n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 523930488a3b..9bb9d943163f 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 ValueNode &tuningData)\n>   \t\t}\n>   \n>   \t\tstd::vector<uint8_t> weights =\n> -\t\t\tvalue.get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\t\t\tvalue.get<std::vector<uint8_t>>().value_or(utils::defopt);\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 << \"'\";\n> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\n> index 5c5b539f1ee8..b2c9ec568b97 100644\n> --- a/src/ipa/rkisp1/algorithms/dpf.cpp\n> +++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n> @@ -12,6 +12,7 @@\n>   #include <vector>\n>   \n>   #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n>   \n>   #include <libcamera/control_ids.h>\n>   \n> @@ -72,7 +73,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\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\tvalues = dFObject[\"g\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\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 +109,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\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +\tvalues = dFObject[\"rb\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\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 +138,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n>   \tconst ValueNode &rFObject = tuningData[\"NoiseLevelFunction\"];\n>   \n>   \tstd::vector<uint16_t> nllValues;\n> -\tnllValues = rFObject[\"coeff\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\tnllValues = rFObject[\"coeff\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>   \tif (nllValues.size() != RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS) {\n>   \t\tLOG(RkISP1Dpf, Error)\n>   \t\t\t<< \"Invalid 'RangeFilter:coeff': expected \"\n> diff --git a/src/ipa/rkisp1/algorithms/gsl.cpp b/src/ipa/rkisp1/algorithms/gsl.cpp\n> index d6272f3a39ef..d83aab8506f3 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 ValueNode &tuningData)\n>   {\n>   \tstd::vector<uint16_t> xIntervals =\n> -\t\ttuningData[\"x-intervals\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\t\ttuningData[\"x-intervals\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\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\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\tcurveYr_ = yObject[\"red\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\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\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\tcurveYg_ = yObject[\"green\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\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\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\tcurveYb_ = yObject[\"blue\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>   \tif (curveYb_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n>   \t\tLOG(RkISP1Gsl, Error)\n>   \t\t\t<< \"Invalid 'y:blue' coordinates: expected \"\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index 54e374bd9c3c..25f7c512b35c 100644\n> --- a/src/ipa/rkisp1/algorithms/lsc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n> @@ -317,7 +317,7 @@ std::vector<uint16_t> LscTableLoader::parseTable(const ValueNode &tuningData,\n>   \t\tRKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX;\n>   \n>   \tstd::vector<uint16_t> table =\n> -\t\ttuningData[prop].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +\t\ttuningData[prop].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>   \tif (table.size() != kLscNumSamples) {\n>   \t\tLOG(RkISP1Lsc, Error)\n>   \t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\n> @@ -333,7 +333,7 @@ std::vector<double> parseSizes(const ValueNode &tuningData,\n>   \t\t\t       const char *prop)\n>   {\n>   \tstd::vector<double> sizes =\n> -\t\ttuningData[prop].get<std::vector<double>>().value_or(std::vector<double>{});\n> +\t\ttuningData[prop].get<std::vector<double>>().value_or(utils::defopt);\n>   \tif (sizes.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n>   \t\tLOG(RkISP1Lsc, Error)\n>   \t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index a351f4f7b581..41918e4c2934 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -123,7 +123,7 @@ IPAManager::IPAManager(const CameraManager &cm)\n>   \t/* User-specified paths take precedence. */\n>   \tconst auto modulePaths =\n>   \t\tconfiguration.listOption({ \"ipa\", \"module_paths\" })\n> -\t\t\t.value_or(std::vector<std::string>());\n> +\t\t\t.value_or(utils::defopt);\n>   \tfor (const auto &dir : modulePaths) {\n>   \t\tif (dir.empty())\n>   \t\t\tcontinue;\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index bc8ff090fa86..83efe1dc6368 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -125,9 +125,9 @@ IPAProxy::IPAProxy(IPAModule *ipam, const CameraManager &cm)\n>   \tconst GlobalConfiguration &configuration = cm._d()->configuration();\n>   \n>   \tconfigPaths_ = configuration.listOption({ \"ipa\", \"config_paths\" })\n> -\t\t\t\t    .value_or(std::vector<std::string>());\n> +\t\t\t\t    .value_or(utils::defopt);\n>   \texecPaths_ = configuration.listOption({ \"ipa\", \"proxy_paths\" })\n> -\t\t\t\t  .value_or(std::vector<std::string>());\n> +\t\t\t\t  .value_or(utils::defopt);\n>   }\n>   \n>   IPAProxy::~IPAProxy()\n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index c7799f2b4bd9..cc7e32c32337 100644\n> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> @@ -2190,7 +2190,7 @@ int PiSPCameraData::configureEntities(V4L2SubdeviceFormat sensorFormat,\n>   \t};\n>   \tconst V4L2Subdevice::Stream embeddedDataStream{\n>   \t\tcsiVideoSinkPad,\n> -\t\tsensor_->embeddedDataStream().value_or(V4L2Subdevice::Stream{}).stream\n> +\t\tsensor_->embeddedDataStream().value_or(utils::defopt).stream\n>   \t};\n>   \n>   \tV4L2Subdevice::Routing routing;\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index a92f2e2944fc..1a0ba5fef3ca 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -117,7 +117,7 @@ int V4L2CompatManager::getCameraIndex(int fd)\n>   \tfor (auto [index, camera] : utils::enumerate(cameras)) {\n>   \t\tSpan<const int64_t> devices = camera->properties()\n>   \t\t\t\t\t\t      .get(properties::SystemDevices)\n> -\t\t\t\t\t\t      .value_or(Span<int64_t>{});\n> +\t\t\t\t\t\t      .value_or(utils::defopt);\n>   \n>   \t\t/*\n>   \t\t * While there may be multiple cameras that could reference the\n> diff --git a/test/value-node.cpp b/test/value-node.cpp\n> index 3b6466e75b13..a6977d5429c8 100644\n> --- a/test/value-node.cpp\n> +++ b/test/value-node.cpp\n> @@ -509,7 +509,7 @@ protected:\n>   \t\t\t\t},\n>   \n>   \t\t\t\t[&](const Size &arg) -> int {\n> -\t\t\t\t\tif (node.get<Size>().value_or(Size{}) != arg ||\n> +\t\t\t\t\tif (node.get<Size>().value_or(utils::defopt) != arg ||\n>   \t\t\t\t\t    node.get<Size>(Size{}) != arg) {\n>   \t\t\t\t\t\tstd::cerr\n>   \t\t\t\t\t\t\t<< \"Invalid node size value\"\n> @@ -521,7 +521,7 @@ protected:\n>   \t\t\t\t},\n>   \n>   \t\t\t\t[&](const std::string &arg) -> int {\n> -\t\t\t\t\tif (node.get<std::string>().value_or(std::string{}) != arg ||\n> +\t\t\t\t\tif (node.get<std::string>().value_or(utils::defopt) != arg ||\n>   \t\t\t\t\t    node.get<std::string>(std::string{}) != arg) {\n>   \t\t\t\t\t\tstd::cerr\n>   \t\t\t\t\t\t\t<< \"Invalid node string value\"","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 A8424BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 May 2026 08:48:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 57B9063024;\n\tMon,  4 May 2026 10:48:43 +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 08A0162DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 10:48:42 +0200 (CEST)","from [192.168.33.78] (185.221.140.217.nat.pool.zt.hu\n\t[185.221.140.217])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 35A98175;\n\tMon,  4 May 2026 10:48:39 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nZWD/iyp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1777884520;\n\tbh=wbLhtjEfWQpdmjmfnSBhjWBsTC6zveTeR0BGTF8Pmxc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=nZWD/iyp6RL/GVuANrzODYaw2ss4WUSJN9c3qKu6e+qvACIJQFT+Vj263ipPOdE0T\n\tgsNqee9P2alIScgsWV7UPLvjDJQdEwxoBhPGn+V7RImRAaBiEAJ7YvIsazK3/6LW9A\n\t92F22pCjes3etMv/TG+U6EBn98y3yoLbKvGiCJ+k=","Message-ID":"<98c37d93-0dff-47ca-9e58-e8ea01d83e8f@ideasonboard.com>","Date":"Mon, 4 May 2026 10:48:37 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 2/2] treewide: Use utils::defopt","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260503225315.1272813-1-laurent.pinchart@ideasonboard.com>\n\t<20260503225315.1272813-2-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260503225315.1272813-2-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":38698,"web_url":"https://patchwork.libcamera.org/comment/38698/","msgid":"<177788474116.45302.6003093673939518095@ping.linuxembedded.co.uk>","date":"2026-05-04T08:52:21","subject":"Re: [PATCH 2/2] treewide: Use utils::defopt","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-05-03 23:53:15)\n> Calling std::optional::value_or() constructs the value passed as an\n> argument to the function, even if the std::optional already contains a\n> valus. This can be fairly inefficient when using values whose default\n> constructor is expensive. Fix it by using utils::defopt.\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/android/camera_capabilities.cpp      | 5 +++--\n>  src/ipa/libipa/agc_mean_luminance.cpp    | 6 ++++--\n>  src/ipa/libipa/awb_bayes.cpp             | 6 ++++--\n>  src/ipa/mali-c55/algorithms/lsc.cpp      | 8 +++++---\n>  src/ipa/rkisp1/algorithms/agc.cpp        | 2 +-\n>  src/ipa/rkisp1/algorithms/dpf.cpp        | 7 ++++---\n>  src/ipa/rkisp1/algorithms/gsl.cpp        | 8 ++++----\n>  src/ipa/rkisp1/algorithms/lsc.cpp        | 4 ++--\n>  src/libcamera/ipa_manager.cpp            | 2 +-\n>  src/libcamera/ipa_proxy.cpp              | 4 ++--\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +-\n>  src/v4l2/v4l2_compat_manager.cpp         | 2 +-\n>  test/value-node.cpp                      | 4 ++--\n>  13 files changed, 34 insertions(+), 26 deletions(-)\n> \n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index b161bc6b3ed6..6b58dd554873 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -17,6 +17,7 @@\n>  #include <hardware/camera3.h>\n>  \n>  #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n>  \n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n> @@ -1064,7 +1065,7 @@ int CameraCapabilities::initializeStaticMetadata()\n>         /* Sensor static metadata. */\n>         std::array<int32_t, 2> pixelArraySize;\n>         {\n> -               const Size &size = properties.get(properties::PixelArraySize).value_or(Size{});\n> +               const Size &size = properties.get(properties::PixelArraySize).value_or(utils::defopt);\n>                 pixelArraySize[0] = size.width;\n>                 pixelArraySize[1] = size.height;\n>                 staticMetadata_->addEntry(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,\n> @@ -1083,7 +1084,7 @@ int CameraCapabilities::initializeStaticMetadata()\n>  \n>         {\n>                 const Span<const Rectangle> rects =\n> -                       properties.get(properties::PixelArrayActiveAreas).value_or(Span<const Rectangle>{});\n> +                       properties.get(properties::PixelArrayActiveAreas).value_or(utils::defopt);\n>                 std::vector<int32_t> data{\n>                         static_cast<int32_t>(rects[0].x),\n>                         static_cast<int32_t>(rects[0].y),\n> diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\n> index 1d385551adc6..c226dd23552c 100644\n> --- a/src/ipa/libipa/agc_mean_luminance.cpp\n> +++ b/src/ipa/libipa/agc_mean_luminance.cpp\n> @@ -11,6 +11,8 @@\n>  #include <cmath>\n>  \n>  #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  \n>  #include \"exposure_mode_helper.h\"\n> @@ -288,9 +290,9 @@ int AgcMeanLuminance::parseExposureModes(const ValueNode &tuningData)\n>                         }\n>  \n>                         std::vector<uint32_t> exposureTimes =\n> -                               modeValues[\"exposureTime\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n> +                               modeValues[\"exposureTime\"].get<std::vector<uint32_t>>().value_or(utils::defopt);\n>                         std::vector<double> gains =\n> -                               modeValues[\"gain\"].get<std::vector<double>>().value_or(std::vector<double>{});\n> +                               modeValues[\"gain\"].get<std::vector<double>>().value_or(utils::defopt);\n>  \n>                         if (exposureTimes.size() != gains.size()) {\n>                                 LOG(AgcMeanLuminance, Error)\n> diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp\n> index a1412c8bd2b5..9fd85e5a4505 100644\n> --- a/src/ipa/libipa/awb_bayes.cpp\n> +++ b/src/ipa/libipa/awb_bayes.cpp\n> @@ -16,6 +16,8 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  \n>  #include \"colours.h\"\n> @@ -211,9 +213,9 @@ int AwbBayes::readPriors(const ValueNode &tuningData)\n>                 }\n>  \n>                 std::vector<uint32_t> temperatures =\n> -                       p[\"ct\"].get<std::vector<uint32_t>>().value_or(std::vector<uint32_t>{});\n> +                       p[\"ct\"].get<std::vector<uint32_t>>().value_or(utils::defopt);\n>                 std::vector<double> probabilities =\n> -                       p[\"probability\"].get<std::vector<double>>().value_or(std::vector<double>{});\n> +                       p[\"probability\"].get<std::vector<double>>().value_or(utils::defopt);\n>  \n>                 if (temperatures.size() != probabilities.size()) {\n>                         LOG(Awb, Error)\n> diff --git a/src/ipa/mali-c55/algorithms/lsc.cpp b/src/ipa/mali-c55/algorithms/lsc.cpp\n> index fe230fdff418..36e50163aecc 100644\n> --- a/src/ipa/mali-c55/algorithms/lsc.cpp\n> +++ b/src/ipa/mali-c55/algorithms/lsc.cpp\n> @@ -7,6 +7,8 @@\n>  \n>  #include \"lsc.h\"\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/value_node.h\"\n>  \n>  namespace libcamera {\n> @@ -48,11 +50,11 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const ValueNode &tuningData)\n>                 }\n>  \n>                 std::vector<uint8_t> rTable =\n> -                       yamlSet[\"r\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +                       yamlSet[\"r\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>                 std::vector<uint8_t> gTable =\n> -                       yamlSet[\"g\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +                       yamlSet[\"g\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>                 std::vector<uint8_t> bTable =\n> -                       yamlSet[\"b\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +                       yamlSet[\"b\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>  \n>                 /*\n>                  * Some validation to do; only 16x16 and 32x32 tables of\n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 523930488a3b..9bb9d943163f 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 ValueNode &tuningData)\n>                 }\n>  \n>                 std::vector<uint8_t> weights =\n> -                       value.get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +                       value.get<std::vector<uint8_t>>().value_or(utils::defopt);\n>                 if (weights.size() != context.hw.numHistogramWeights) {\n>                         LOG(RkISP1Agc, Warning)\n>                                 << \"Failed to read metering mode'\" << key << \"'\";\n> diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\n> index 5c5b539f1ee8..b2c9ec568b97 100644\n> --- a/src/ipa/rkisp1/algorithms/dpf.cpp\n> +++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n> @@ -12,6 +12,7 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n>  \n>  #include <libcamera/control_ids.h>\n>  \n> @@ -72,7 +73,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n>          *    +---------|--------> X\n>          *     -4....-1 0 1 2 3 4\n>          */\n> -       values = dFObject[\"g\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +       values = dFObject[\"g\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>         if (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS) {\n>                 LOG(RkISP1Dpf, Error)\n>                         << \"Invalid 'DomainFilter:g': expected \"\n> @@ -108,7 +109,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n>          * For a 9x9 kernel, columns -6 and 6 are dropped, so coefficient\n>          * number 6 is not used.\n>          */\n> -       values = dFObject[\"rb\"].get<std::vector<uint8_t>>().value_or(std::vector<uint8_t>{});\n> +       values = dFObject[\"rb\"].get<std::vector<uint8_t>>().value_or(utils::defopt);\n>         if (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS &&\n>             values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - 1) {\n>                 LOG(RkISP1Dpf, Error)\n> @@ -137,7 +138,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n>         const ValueNode &rFObject = tuningData[\"NoiseLevelFunction\"];\n>  \n>         std::vector<uint16_t> nllValues;\n> -       nllValues = rFObject[\"coeff\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +       nllValues = rFObject[\"coeff\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (nllValues.size() != RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS) {\n>                 LOG(RkISP1Dpf, Error)\n>                         << \"Invalid 'RangeFilter:coeff': expected \"\n> diff --git a/src/ipa/rkisp1/algorithms/gsl.cpp b/src/ipa/rkisp1/algorithms/gsl.cpp\n> index d6272f3a39ef..d83aab8506f3 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>                                    const ValueNode &tuningData)\n>  {\n>         std::vector<uint16_t> xIntervals =\n> -               tuningData[\"x-intervals\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +               tuningData[\"x-intervals\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (xIntervals.size() != kDegammaXIntervals) {\n>                 LOG(RkISP1Gsl, Error)\n>                         << \"Invalid 'x' coordinates: expected \"\n> @@ -83,7 +83,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n>                 return -EINVAL;\n>         }\n>  \n> -       curveYr_ = yObject[\"red\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +       curveYr_ = yObject[\"red\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (curveYr_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n>                 LOG(RkISP1Gsl, Error)\n>                         << \"Invalid 'y:red' coordinates: expected \"\n> @@ -92,7 +92,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n>                 return -EINVAL;\n>         }\n>  \n> -       curveYg_ = yObject[\"green\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +       curveYg_ = yObject[\"green\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (curveYg_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n>                 LOG(RkISP1Gsl, Error)\n>                         << \"Invalid 'y:green' coordinates: expected \"\n> @@ -101,7 +101,7 @@ int GammaSensorLinearization::init([[maybe_unused]] IPAContext &context,\n>                 return -EINVAL;\n>         }\n>  \n> -       curveYb_ = yObject[\"blue\"].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +       curveYb_ = yObject[\"blue\"].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (curveYb_.size() != RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE) {\n>                 LOG(RkISP1Gsl, Error)\n>                         << \"Invalid 'y:blue' coordinates: expected \"\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index 54e374bd9c3c..25f7c512b35c 100644\n> --- a/src/ipa/rkisp1/algorithms/lsc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n> @@ -317,7 +317,7 @@ std::vector<uint16_t> LscTableLoader::parseTable(const ValueNode &tuningData,\n>                 RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX;\n>  \n>         std::vector<uint16_t> table =\n> -               tuningData[prop].get<std::vector<uint16_t>>().value_or(std::vector<uint16_t>{});\n> +               tuningData[prop].get<std::vector<uint16_t>>().value_or(utils::defopt);\n>         if (table.size() != kLscNumSamples) {\n>                 LOG(RkISP1Lsc, Error)\n>                         << \"Invalid '\" << prop << \"' values: expected \"\n> @@ -333,7 +333,7 @@ std::vector<double> parseSizes(const ValueNode &tuningData,\n>                                const char *prop)\n>  {\n>         std::vector<double> sizes =\n> -               tuningData[prop].get<std::vector<double>>().value_or(std::vector<double>{});\n> +               tuningData[prop].get<std::vector<double>>().value_or(utils::defopt);\n>         if (sizes.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n>                 LOG(RkISP1Lsc, Error)\n>                         << \"Invalid '\" << prop << \"' values: expected \"\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index a351f4f7b581..41918e4c2934 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -123,7 +123,7 @@ IPAManager::IPAManager(const CameraManager &cm)\n>         /* User-specified paths take precedence. */\n>         const auto modulePaths =\n>                 configuration.listOption({ \"ipa\", \"module_paths\" })\n> -                       .value_or(std::vector<std::string>());\n> +                       .value_or(utils::defopt);\n>         for (const auto &dir : modulePaths) {\n>                 if (dir.empty())\n>                         continue;\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index bc8ff090fa86..83efe1dc6368 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -125,9 +125,9 @@ IPAProxy::IPAProxy(IPAModule *ipam, const CameraManager &cm)\n>         const GlobalConfiguration &configuration = cm._d()->configuration();\n>  \n>         configPaths_ = configuration.listOption({ \"ipa\", \"config_paths\" })\n> -                                   .value_or(std::vector<std::string>());\n> +                                   .value_or(utils::defopt);\n>         execPaths_ = configuration.listOption({ \"ipa\", \"proxy_paths\" })\n> -                                 .value_or(std::vector<std::string>());\n> +                                 .value_or(utils::defopt);\n>  }\n>  \n>  IPAProxy::~IPAProxy()\n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index c7799f2b4bd9..cc7e32c32337 100644\n> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> @@ -2190,7 +2190,7 @@ int PiSPCameraData::configureEntities(V4L2SubdeviceFormat sensorFormat,\n>         };\n>         const V4L2Subdevice::Stream embeddedDataStream{\n>                 csiVideoSinkPad,\n> -               sensor_->embeddedDataStream().value_or(V4L2Subdevice::Stream{}).stream\n> +               sensor_->embeddedDataStream().value_or(utils::defopt).stream\n>         };\n>  \n>         V4L2Subdevice::Routing routing;\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index a92f2e2944fc..1a0ba5fef3ca 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -117,7 +117,7 @@ int V4L2CompatManager::getCameraIndex(int fd)\n>         for (auto [index, camera] : utils::enumerate(cameras)) {\n>                 Span<const int64_t> devices = camera->properties()\n>                                                       .get(properties::SystemDevices)\n> -                                                     .value_or(Span<int64_t>{});\n> +                                                     .value_or(utils::defopt);\n>  \n>                 /*\n>                  * While there may be multiple cameras that could reference the\n> diff --git a/test/value-node.cpp b/test/value-node.cpp\n> index 3b6466e75b13..a6977d5429c8 100644\n> --- a/test/value-node.cpp\n> +++ b/test/value-node.cpp\n> @@ -509,7 +509,7 @@ protected:\n>                                 },\n>  \n>                                 [&](const Size &arg) -> int {\n> -                                       if (node.get<Size>().value_or(Size{}) != arg ||\n> +                                       if (node.get<Size>().value_or(utils::defopt) != arg ||\n>                                             node.get<Size>(Size{}) != arg) {\n>                                                 std::cerr\n>                                                         << \"Invalid node size value\"\n> @@ -521,7 +521,7 @@ protected:\n>                                 },\n>  \n>                                 [&](const std::string &arg) -> int {\n> -                                       if (node.get<std::string>().value_or(std::string{}) != arg ||\n> +                                       if (node.get<std::string>().value_or(utils::defopt) != arg ||\n>                                             node.get<std::string>(std::string{}) != arg) {\n>                                                 std::cerr\n>                                                         << \"Invalid node string value\"\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 2BDB9BDCB5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 May 2026 08:52:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE6FA63025;\n\tMon,  4 May 2026 10:52:25 +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 44D0F6271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 10:52:24 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7DB80175;\n\tMon,  4 May 2026 10:52:22 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Sdrvvvmq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1777884742;\n\tbh=JA9X9YAl5nmksYetwbiDn2zjAGJU6noHYiuT/XR9zHk=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=Sdrvvvmqg8ybVrIlM1oBS2Ne0OlYYA9cvc2LmE9AdE/UxT2X3VjFhiJeg3yqe5MOq\n\tQvrZcowD91AEG+csIpWsKGzjYWHpTK5bidObabDPmF8TGQ8UBShVu2uZF0CcWcPws0\n\t3ajCa59AVkbOrnW32l3j0e9HX43WBrfsPDr/sXlU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260503225315.1272813-2-laurent.pinchart@ideasonboard.com>","References":"<20260503225315.1272813-1-laurent.pinchart@ideasonboard.com>\n\t<20260503225315.1272813-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 2/2] treewide: Use utils::defopt","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 04 May 2026 09:52:21 +0100","Message-ID":"<177788474116.45302.6003093673939518095@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]