[{"id":37469,"web_url":"https://patchwork.libcamera.org/comment/37469/","msgid":"<c47ccb84-96ee-47a3-81fb-5b7109016ff7@ideasonboard.com>","date":"2026-01-05T10:54:50","subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 05. 11:34 keltezéssel, Naushir Patuck írta:\n> The default values for controls::FrameDurationLimits is now an array but\n> the v4l2 proxy is fetching it as a scalar value, causing a runtime\n> error. Fix this by templating the getter with the correct\n> Span<const int64_t, 2> type.\n> \n> Also related, fix the RPi IPA's initial default value for\n> controls::FrameDurationLimits to be an array.\n> \n> Fixes: 4e9be7d11b9df (\"ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls\")\n> Closes: https://github.com/raspberrypi/libcamera/issues/321\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>   src/ipa/rpi/common/ipa_base.cpp | 3 ++-\n>   src/v4l2/v4l2_camera_proxy.cpp  | 4 ++--\n>   2 files changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> index 14aba4500ae4..9f8667a2284a 100644\n> --- a/src/ipa/rpi/common/ipa_base.cpp\n> +++ b/src/ipa/rpi/common/ipa_base.cpp\n> @@ -85,7 +85,8 @@ const ControlInfoMap::Map ipaControls{\n>   \t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n>   \t{ &controls::FrameDurationLimits,\n>   \t  ControlInfo(INT64_C(33333), INT64_C(120000),\n> -\t\t      static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>())) },\n> +\t\t      Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()),\n> +\t\t\t\t\t\tstatic_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } }) },\n\nWhy the hard-coded min/max values if there is `default{Min,Max}FrameDuration` ?\n\nAnd somewhat unrelated and not rpi specific, but why do we want the default value to be a\n\"singleton range\"? Wouldn't it make more sense for the default value to encompass the entire\npossible range so as to give the algorithms the most freedom in choosing the parameters?\n(Admittedly limiting the max to 1-5 fps is probably more in-line with user expectations,\n  but still, setting the default frame duration to a very specific single value does not\n  seem to me to be the most optimal choice.)\n\n\nRegards,\nBarnabás Pőcze\n\n\n>   \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n>   \t{ &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },\n>   };\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index 559ffc6170b1..03cd4810cc05 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -200,9 +200,9 @@ void V4L2CameraProxy::setFmtFromConfig(const StreamConfiguration &streamConfig)\n>   \tconst auto &it = controls.find(&controls::FrameDurationLimits);\n>   \n>   \tif (it != controls.end()) {\n> -\t\tconst int64_t duration = it->second.def().get<int64_t>();\n> +\t\tSpan<const int64_t, 2> duration = it->second.def().get<Span<const int64_t, 2>>();\n>   \n> -\t\tv4l2TimePerFrame_.numerator = duration;\n> +\t\tv4l2TimePerFrame_.numerator = duration[0];\n>   \t\tv4l2TimePerFrame_.denominator = 1000000;\n>   \t} else {\n>   \t\t/*","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 48F3DBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 10:54:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 034D961FBC;\n\tMon,  5 Jan 2026 11:54:55 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73A9261FB9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 11:54:53 +0100 (CET)","from [192.168.33.33] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F79C664;\n\tMon,  5 Jan 2026 11:54:33 +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=\"UJv5uB/I\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767610473;\n\tbh=hpZpIvQcCIDyWLVMSZJIoP3lWTj8LuIXw8RzWXXKsVI=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=UJv5uB/IyArSUl29aCF2weE//1RIVd/j4tS4rm3JLy+OWHAa1WiUY3m83MxaM2YBr\n\teXHnCbc27pJkVhZh8/cL/MxwctIx9dI4OMSNl04a2WbZfQR+8Mf4hgjIh6YTetLt0G\n\to5DZU8cMfD9jNmVbvALMIf7huaPVc3VrgHzJvO84=","Message-ID":"<c47ccb84-96ee-47a3-81fb-5b7109016ff7@ideasonboard.com>","Date":"Mon, 5 Jan 2026 11:54:50 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260105103409.50623-1-naush@raspberrypi.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260105103409.50623-1-naush@raspberrypi.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":37470,"web_url":"https://patchwork.libcamera.org/comment/37470/","msgid":"<CAEmqJPoRj_C8d+Gy8AqM9xPoWb+JnBjZKNPhO0hGVppH03Q-Ow@mail.gmail.com>","date":"2026-01-05T11:04:49","subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 5 Jan 2026 at 10:54, Barnabás Pőcze\n<barnabas.pocze@ideasonboard.com> wrote:\n>\n> 2026. 01. 05. 11:34 keltezéssel, Naushir Patuck írta:\n> > The default values for controls::FrameDurationLimits is now an array but\n> > the v4l2 proxy is fetching it as a scalar value, causing a runtime\n> > error. Fix this by templating the getter with the correct\n> > Span<const int64_t, 2> type.\n> >\n> > Also related, fix the RPi IPA's initial default value for\n> > controls::FrameDurationLimits to be an array.\n> >\n> > Fixes: 4e9be7d11b9df (\"ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls\")\n> > Closes: https://github.com/raspberrypi/libcamera/issues/321\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >   src/ipa/rpi/common/ipa_base.cpp | 3 ++-\n> >   src/v4l2/v4l2_camera_proxy.cpp  | 4 ++--\n> >   2 files changed, 4 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> > index 14aba4500ae4..9f8667a2284a 100644\n> > --- a/src/ipa/rpi/common/ipa_base.cpp\n> > +++ b/src/ipa/rpi/common/ipa_base.cpp\n> > @@ -85,7 +85,8 @@ const ControlInfoMap::Map ipaControls{\n> >       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> >       { &controls::FrameDurationLimits,\n> >         ControlInfo(INT64_C(33333), INT64_C(120000),\n> > -                   static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>())) },\n> > +                   Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()),\n> > +                                             static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } }) },\n>\n> Why the hard-coded min/max values if there is `default{Min,Max}FrameDuration` ?\n\nTBH the min/max here are inconsequential as they do get updated as\nsoon as a camera is configured.  I can update the patch to use the\nsame default constants in the next revision if needed.\n\n>\n> And somewhat unrelated and not rpi specific, but why do we want the default value to be a\n> \"singleton range\"? Wouldn't it make more sense for the default value to encompass the entire\n> possible range so as to give the algorithms the most freedom in choosing the parameters?\n> (Admittedly limiting the max to 1-5 fps is probably more in-line with user expectations,\n>   but still, setting the default frame duration to a very specific single value does not\n>   seem to me to be the most optimal choice.)\n\nI think this is more of a legacy thing and how most users view frame\nrate as a scalar value rather than a range.  If we do want to change\nthis, it should probably be done across all the IPAs.\n\nThanks,\nNaush\n\n>\n>\n> Regards,\n> Barnabás Pőcze\n>\n>\n> >       { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n> >       { &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },\n> >   };\n> > diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> > index 559ffc6170b1..03cd4810cc05 100644\n> > --- a/src/v4l2/v4l2_camera_proxy.cpp\n> > +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> > @@ -200,9 +200,9 @@ void V4L2CameraProxy::setFmtFromConfig(const StreamConfiguration &streamConfig)\n> >       const auto &it = controls.find(&controls::FrameDurationLimits);\n> >\n> >       if (it != controls.end()) {\n> > -             const int64_t duration = it->second.def().get<int64_t>();\n> > +             Span<const int64_t, 2> duration = it->second.def().get<Span<const int64_t, 2>>();\n> >\n> > -             v4l2TimePerFrame_.numerator = duration;\n> > +             v4l2TimePerFrame_.numerator = duration[0];\n> >               v4l2TimePerFrame_.denominator = 1000000;\n> >       } else {\n> >               /*\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 1298FBDCC0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 11:05:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0A97761FB9;\n\tMon,  5 Jan 2026 12:05:28 +0100 (CET)","from mail-ua1-x931.google.com (mail-ua1-x931.google.com\n\t[IPv6:2607:f8b0:4864:20::931])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17AD561F35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 12:05:27 +0100 (CET)","by mail-ua1-x931.google.com with SMTP id\n\ta1e0cc1a2514c-93f5ffaa26fso308933241.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 05 Jan 2026 03:05:26 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Wy4PWRUe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1767611126; x=1768215926;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=YpHyK9mY1GZfxbACMZICU1ta88+IBJi3ZTNhb4sJEik=;\n\tb=Wy4PWRUeXlZL77uzJ69ZUIEQgdlROdwfeuoXEimRzKSkuGQfvHqTNXyOQnT7a6ih6o\n\tuti9Ay0d2X8PaNap7GYGYnHGhBEQ2fWOF4SqDmTJSx5TxmXaA66dVyb9jmyyWLZUwgKP\n\tlfZHUjILA8X+X6emK79xPfTIuZ//DryXmbJoB55kOY8MCyIewLzbpJ3VAx+wzdjd5cns\n\t8mexMivLvexkZLUFJs0bVztuqglXviIVN5ifizvlMdX6PDThXVYgSPNPWi1jRSvLt0Vp\n\tGSqnUc/5iAq8I1IZgPibdQwGs/UQGAySqe9g9Q3lCF1g3YJi05RsWWTOwXey3ehnEsTo\n\teawg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1767611126; x=1768215926;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=YpHyK9mY1GZfxbACMZICU1ta88+IBJi3ZTNhb4sJEik=;\n\tb=X2PESsxY3NsVoVc5GGvsB15v3FUb4kZg1GRHoGVtM/RX1pShBA5IlT23qFWrv3yLQ8\n\tVrMv6Aw1Nl5W4P5R3rZ8e3wdtKGVUqNCZCX/ytQKQNOgU2o+hiJHNwRLxWHDMVwnaEga\n\tIK574MZeSXTP98uAj6c9kcbLBNZWz56EbIkhm6qHoOpmXUn26YwW3TEqjZVqwYBR7P7x\n\txOngfSa7c/Td6pOK3VkDuaf5oP4TRj6hxANbUDjfg1N7TTEPXXKUzrTQITd1q9HYLR/U\n\tZ+/DIVyUd1rUhRAJHeKwbXZ5xpqpOwoTGznqXHQl6JCMi+bsBXhplQROfagZmDfwgser\n\tOhVw==","X-Gm-Message-State":"AOJu0Yxhvj857Zgg0S1u1Vywm8ENZyC3geP3qyRo377sQl3RAmmmqFyQ\n\tBqVZpTnMssGUVW/4Vck8YT5bsAQx8E+t3EFkkB9w87ynqzD2/Ke5/5RzU/1XdM5jINFOhWLreHZ\n\td35+gXo9zbDvYwGuhFi6yGPSYPtkTYT03VgF3OVTSiA==","X-Gm-Gg":"AY/fxX5lWJI2QqcePfbl3T19+BS8wje9xNKpD0JcozpaWDFFY0JChPC98vress/kSKa\n\t6j34A37Xz40lQe5MfS/MSjRoLBYBs4Ioz/HJGe+ojqjogon2tF9rRQuyeR4vL67Ax9qU7QVpSrG\n\tP9GYACPs4YTFF48gZzI8CVgoeKScUOfFD6i4W+6XJ1cBdqnWv3SVUE/nk+rPUM+zi6xrrQqBv8D\n\tVwIxloIooQVcHHvrfaI+cCohY9xvp0z+pujo3v4OJzpna7ZnT5DghqdZjJak0ANRLETgGyjyVAw\n\tOY5ZdiyiaD7K8avCBavNHbwgAOc=","X-Google-Smtp-Source":"AGHT+IENVotLn2lKlAGZF+A1Fty/b1ADNlyGzdWJErWBKDCQANGC/7+JQD44s3CsyIoSlXFWwxg8m1LWn/YHhIi34fw=","X-Received":"by 2002:a05:6102:3f91:b0:5d5:dcc1:3bb1 with SMTP id\n\tada2fe7eead31-5eb1a84245emr9602402137.7.1767611125673;\n\tMon, 05 Jan 2026 03:05:25 -0800 (PST)","MIME-Version":"1.0","References":"<20260105103409.50623-1-naush@raspberrypi.com>\n\t<c47ccb84-96ee-47a3-81fb-5b7109016ff7@ideasonboard.com>","In-Reply-To":"<c47ccb84-96ee-47a3-81fb-5b7109016ff7@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 5 Jan 2026 11:04:49 +0000","X-Gm-Features":"AQt7F2r2anpT6ZrBp7LegEljKvcAWUqvjZXfB2mu6fhHTgsXTHZ56NRUfmdosk8","Message-ID":"<CAEmqJPoRj_C8d+Gy8AqM9xPoWb+JnBjZKNPhO0hGVppH03Q-Ow@mail.gmail.com>","Subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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":37479,"web_url":"https://patchwork.libcamera.org/comment/37479/","msgid":"<9ba13c5e-ca9f-4097-965c-a625c09387ec@ideasonboard.com>","date":"2026-01-05T14:11:01","subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2026. 01. 05. 12:04 keltezéssel, Naushir Patuck írta:\n> On Mon, 5 Jan 2026 at 10:54, Barnabás Pőcze\n> <barnabas.pocze@ideasonboard.com> wrote:\n>>\n>> 2026. 01. 05. 11:34 keltezéssel, Naushir Patuck írta:\n>>> The default values for controls::FrameDurationLimits is now an array but\n>>> the v4l2 proxy is fetching it as a scalar value, causing a runtime\n>>> error. Fix this by templating the getter with the correct\n>>> Span<const int64_t, 2> type.\n>>>\n>>> Also related, fix the RPi IPA's initial default value for\n>>> controls::FrameDurationLimits to be an array.\n>>>\n>>> Fixes: 4e9be7d11b9df (\"ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls\")\n>>> Closes: https://github.com/raspberrypi/libcamera/issues/321\n>>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>>> ---\n>>>    src/ipa/rpi/common/ipa_base.cpp | 3 ++-\n>>>    src/v4l2/v4l2_camera_proxy.cpp  | 4 ++--\n>>>    2 files changed, 4 insertions(+), 3 deletions(-)\n>>>\n>>> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n>>> index 14aba4500ae4..9f8667a2284a 100644\n>>> --- a/src/ipa/rpi/common/ipa_base.cpp\n>>> +++ b/src/ipa/rpi/common/ipa_base.cpp\n>>> @@ -85,7 +85,8 @@ const ControlInfoMap::Map ipaControls{\n>>>        { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n>>>        { &controls::FrameDurationLimits,\n>>>          ControlInfo(INT64_C(33333), INT64_C(120000),\n>>> -                   static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>())) },\n>>> +                   Span<const int64_t, 2>{ { static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()),\n>>> +                                             static_cast<int64_t>(defaultMinFrameDuration.get<std::micro>()) } }) },\n>>\n>> Why the hard-coded min/max values if there is `default{Min,Max}FrameDuration` ?\n> \n> TBH the min/max here are inconsequential as they do get updated as\n> soon as a camera is configured.  I can update the patch to use the\n> same default constants in the next revision if needed.\n\nI think it would be nice if the already defined constants could be used.\n\n\n> \n>>\n>> And somewhat unrelated and not rpi specific, but why do we want the default value to be a\n>> \"singleton range\"? Wouldn't it make more sense for the default value to encompass the entire\n>> possible range so as to give the algorithms the most freedom in choosing the parameters?\n>> (Admittedly limiting the max to 1-5 fps is probably more in-line with user expectations,\n>>    but still, setting the default frame duration to a very specific single value does not\n>>    seem to me to be the most optimal choice.)\n> \n> I think this is more of a legacy thing and how most users view frame\n> rate as a scalar value rather than a range.  If we do want to change\n> this, it should probably be done across all the IPAs.\n> \n> Thanks,\n> Naush\n> \n>>\n>>\n>> Regards,\n>> Barnabás Pőcze\n>>\n>>\n>>>        { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n>>>        { &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },\n>>>    };\n>>> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n>>> index 559ffc6170b1..03cd4810cc05 100644\n>>> --- a/src/v4l2/v4l2_camera_proxy.cpp\n>>> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n>>> @@ -200,9 +200,9 @@ void V4L2CameraProxy::setFmtFromConfig(const StreamConfiguration &streamConfig)\n>>>        const auto &it = controls.find(&controls::FrameDurationLimits);\n>>>\n>>>        if (it != controls.end()) {\n>>> -             const int64_t duration = it->second.def().get<int64_t>();\n>>> +             Span<const int64_t, 2> duration = it->second.def().get<Span<const int64_t, 2>>();\n>>>\n>>> -             v4l2TimePerFrame_.numerator = duration;\n>>> +             v4l2TimePerFrame_.numerator = duration[0];\n\nThis part looks OK. I wanted to suggest using `(duration[0] + duration[1]) / 2`,\nbut I suppose if the maximum is quite large (e.g. seconds), then the simple mean\nis probably less useful than just the minimum. And in any case, this initial value\nis likely inconsequential most of the time.\n\nSo for this part:\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>>>                v4l2TimePerFrame_.denominator = 1000000;\n>>>        } else {\n>>>                /*\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 D4524BDCC0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 14:11:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F0FC461FB9;\n\tMon,  5 Jan 2026 15:11:07 +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 8908C61F35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 15:11:06 +0100 (CET)","from [192.168.33.33] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BF4DD134C;\n\tMon,  5 Jan 2026 15:10:45 +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=\"IRdYP90W\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767622246;\n\tbh=WJnWKRPPRESiZZVs11Qk+zzWs1r0RPwBBCmjXzozqk0=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=IRdYP90Wv9koxE4JyqJsAeInKleBPEJ/W6DaxLQwAL4tZD9tHJPvk19g00AxqOvH3\n\t4Dci6igBkF7/uwuOug/msDKrQRjRmoQkneTPPJNurGU8bAXoo1pICNhI+pwL7r6Z4R\n\tUtE+sr7tEY+Me2Bvr5NMGw32wyLFPKUX2gejmveQ=","Message-ID":"<9ba13c5e-ca9f-4097-965c-a625c09387ec@ideasonboard.com>","Date":"Mon, 5 Jan 2026 15:11:01 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] v4l2_camera_proxy: Fix for getting deafult\n\tcontrols::FrameDurationLimits","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260105103409.50623-1-naush@raspberrypi.com>\n\t<c47ccb84-96ee-47a3-81fb-5b7109016ff7@ideasonboard.com>\n\t<CAEmqJPoRj_C8d+Gy8AqM9xPoWb+JnBjZKNPhO0hGVppH03Q-Ow@mail.gmail.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<CAEmqJPoRj_C8d+Gy8AqM9xPoWb+JnBjZKNPhO0hGVppH03Q-Ow@mail.gmail.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>"}}]