[{"id":36004,"web_url":"https://patchwork.libcamera.org/comment/36004/","msgid":"<85h5wpko1v.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-09-26T19:32:12","subject":"Re: [PATCH v2 5/6] libcamera: software_isp: Add valid flag to\n\tstruct SwIspStats","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Hans,\n\nthank you for the patch.\n\nHans de Goede <hansg@kernel.org> writes:\n\n> Generating statistics for every single frame is not really necessary.\n>\n> However a roundtrip through ipa_->processStats() still need to be done\n> every frame, even if there are no stats to make the IPA generate metadata\n> for every frame.\n>\n> Add a valid flag to the statistics struct to let the IPA know when there\n> are no statistics for the frame being processed and modify the IPA to\n> only generate metadata for frames without valid statistics.\n>\n> This is a preparation patch for skipping statistics generation for some\n> frames.\n>\n> Signed-off-by: Hans de Goede <hansg@kernel.org>\n> ---\n>  include/libcamera/internal/software_isp/swisp_stats.h | 4 ++++\n>  src/ipa/simple/algorithms/agc.cpp                     | 3 +++\n>  src/ipa/simple/algorithms/awb.cpp                     | 3 +++\n>  src/ipa/simple/algorithms/blc.cpp                     | 3 +++\n>  src/ipa/simple/soft_simple.cpp                        | 3 +++\n>  src/libcamera/software_isp/debayer_cpu.cpp            | 2 +-\n>  src/libcamera/software_isp/swstats_cpu.cpp            | 4 +++-\n>  src/libcamera/software_isp/swstats_cpu.h              | 2 +-\n>  8 files changed, 21 insertions(+), 3 deletions(-)\n>\n> diff --git a/include/libcamera/internal/software_isp/swisp_stats.h b/include/libcamera/internal/software_isp/swisp_stats.h\n> index ae11f112..cbcfd351 100644\n> --- a/include/libcamera/internal/software_isp/swisp_stats.h\n> +++ b/include/libcamera/internal/software_isp/swisp_stats.h\n> @@ -20,6 +20,10 @@ namespace libcamera {\n>   * wrap around.\n>   */\n>  struct SwIspStats {\n> +\t/**\n> +\t * \\brief Indicates if the statistics buffer contains valid data\n> +\t */\n> +\tbool valid;\n\nI'd add to the docstring what \"valid\" data is.\n\n>  \t/**\n>  \t * \\brief Holds the sum of all sampled red pixels\n>  \t */\n> diff --git a/src/ipa/simple/algorithms/agc.cpp b/src/ipa/simple/algorithms/agc.cpp\n> index 3471cc88..e4e24113 100644\n> --- a/src/ipa/simple/algorithms/agc.cpp\n> +++ b/src/ipa/simple/algorithms/agc.cpp\n> @@ -107,6 +107,9 @@ void Agc::process(IPAContext &context,\n>  \tmetadata.set(controls::ExposureTime, exposureTime.get<std::micro>());\n>  \tmetadata.set(controls::AnalogueGain, frameContext.sensor.gain);\n>  \n> +\tif (!stats->valid)\n> +\t\treturn;\n> +\n>  \t/*\n>  \t * Calculate Mean Sample Value (MSV) according to formula from:\n>  \t * https://www.araa.asn.au/acra/acra2007/papers/paper84final.pdf\n> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n> index cf567e89..ddd0b791 100644\n> --- a/src/ipa/simple/algorithms/awb.cpp\n> +++ b/src/ipa/simple/algorithms/awb.cpp\n> @@ -61,6 +61,9 @@ void Awb::process(IPAContext &context,\n>  \t};\n>  \tmetadata.set(controls::ColourGains, mdGains);\n>  \n> +\tif (!stats->valid)\n> +\t\treturn;\n> +\n>  \t/*\n>  \t * Black level must be subtracted to get the correct AWB ratios, they\n>  \t * would be off if they were computed from the whole brightness range\n> diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp\n> index 8c1e9ed0..616da0ee 100644\n> --- a/src/ipa/simple/algorithms/blc.cpp\n> +++ b/src/ipa/simple/algorithms/blc.cpp\n> @@ -60,6 +60,9 @@ void BlackLevel::process(IPAContext &context,\n>  \t};\n>  \tmetadata.set(controls::SensorBlackLevels, blackLevels);\n>  \n> +\tif (!stats->valid)\n> +\t\treturn;\n> +\n>  \tif (context.configuration.black.level.has_value())\n>  \t\treturn;\n>  \n> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n> index b147aca2..e1c8e21a 100644\n> --- a/src/ipa/simple/soft_simple.cpp\n> +++ b/src/ipa/simple/soft_simple.cpp\n> @@ -318,6 +318,9 @@ void IPASoftSimple::processStats(const uint32_t frame,\n>  \t\talgo->process(context_, frame, frameContext, stats_, metadata);\n>  \tmetadataReady.emit(frame, metadata);\n>  \n> +\tif (!stats_->valid)\n> +\t\treturn;\n> +\n\nAs discussed in the followup patch, this means the later\n\n  setSensorControls.emit(ctrls);\n\ncall gets skipped, which means SimpleCameraData::setSensorControls is\nskipped and delayedCtrls_ is not updated, resulting in a possibly\ninvalid access in\n\n  frameContext.sensor.exposure =\n          sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();\n\nabove -- sensorControls is taken from delayedCtrls_ for the given frame.\n\n>  \t/* Sanity check */\n>  \tif (!sensorControls.contains(V4L2_CID_EXPOSURE) ||\n>  \t    !sensorControls.contains(V4L2_CID_ANALOGUE_GAIN)) {\n> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n> index 2dc85e5e..bfa60888 100644\n> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n> @@ -851,7 +851,7 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n>  \t *\n>  \t * \\todo Pass real bufferId once stats buffer passing is changed.\n>  \t */\n> -\tstats_->finishFrame(frame, 0);\n> +\tstats_->finishFrame(frame, 0, true);\n>  \toutputBufferReady.emit(output);\n>  \tinputBufferReady.emit(input);\n>  }\n> diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp\n> index 4b77b360..da91f912 100644\n> --- a/src/libcamera/software_isp/swstats_cpu.cpp\n> +++ b/src/libcamera/software_isp/swstats_cpu.cpp\n> @@ -313,11 +313,13 @@ void SwStatsCpu::startFrame(void)\n>   * \\brief Finish statistics calculation for the current frame\n>   * \\param[in] frame The frame number\n>   * \\param[in] bufferId ID of the statistics buffer\n> + * \\param[in] valid Indicates if the statistics for the current frame are valid\n>   *\n>   * This may only be called after a successful setWindow() call.\n>   */\n> -void SwStatsCpu::finishFrame(uint32_t frame, uint32_t bufferId)\n> +void SwStatsCpu::finishFrame(uint32_t frame, uint32_t bufferId, bool valid)\n>  {\n> +\tstats_.valid = valid;\n>  \t*sharedStats_ = stats_;\n>  \tstatsReady.emit(frame, bufferId);\n>  }\n> diff --git a/src/libcamera/software_isp/swstats_cpu.h b/src/libcamera/software_isp/swstats_cpu.h\n> index 26a2f462..6ac3c4de 100644\n> --- a/src/libcamera/software_isp/swstats_cpu.h\n> +++ b/src/libcamera/software_isp/swstats_cpu.h\n> @@ -41,7 +41,7 @@ public:\n>  \tint configure(const StreamConfiguration &inputCfg);\n>  \tvoid setWindow(const Rectangle &window);\n>  \tvoid startFrame();\n> -\tvoid finishFrame(uint32_t frame, uint32_t bufferId);\n> +\tvoid finishFrame(uint32_t frame, uint32_t bufferId, bool valid);\n>  \n>  \tvoid processLine0(unsigned int y, const uint8_t *src[])\n>  \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 C5EB2C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Sep 2025 19:32:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DCF5D6B5F3;\n\tFri, 26 Sep 2025 21:32:19 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4299613AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Sep 2025 21:32:18 +0200 (CEST)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-211-IasdbO21M2GT5HdNy_RaXQ-1; Fri, 26 Sep 2025 15:32:16 -0400","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-46e3dcb36a1so7742345e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Sep 2025 12:32:16 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-46e33baab12sm84508215e9.8.2025.09.26.12.32.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 26 Sep 2025 12:32:13 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"I80uf0Tc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1758915137;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=9AS/ZSZZTQdkTvEkFOIdi8wooHgVfrlSNq6GLbE7KT0=;\n\tb=I80uf0TccpS7xuAZ1a4Hp9N6RbJjBLlk4CDj3tgsb3PXE/FpVgY3magElbDAZBUWdetzBe\n\t5wRaf9/KLwU4U7RmMK41SaDkbsFT57QNNt1GXk/HMkpFmphjXY3xAezrU8qXExiMJKC8wt\n\ttrYsk90oU+jOrnLDgoOsgzh1gwxqmP0=","X-MC-Unique":"IasdbO21M2GT5HdNy_RaXQ-1","X-Mimecast-MFC-AGG-ID":"IasdbO21M2GT5HdNy_RaXQ_1758915135","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1758915134; x=1759519934;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=9AS/ZSZZTQdkTvEkFOIdi8wooHgVfrlSNq6GLbE7KT0=;\n\tb=ifCJa3zVATwABX4btSariqzHJ8T3eS5EIU0iC1EP6SWFBF3zKmI3d10LjdstXFyYRE\n\tE6a/NJy7pd+HM3XZKf9gWaektvdd8Pk7+wgIEgsAla/YfNu/IsiZuMpnjLeTAI5kM5Yc\n\tDiwhrg4qtk1v8PLuKErYqiDyFqmcdbxvwrnw2dRDsHJ20sFKJVmexCpo6anVjxganRfo\n\t5mfDzj3VLarFYh28VcnWQcZi0eQnCB0gP6artIlIkRUVfhsoBdHpUhl2HI4J9k6keCIV\n\t3nPEPSuxM9nVelUvXEAYDzjV3RVD4cbG7x1zZCcMBJyUTZPiJr6S9qnWIk/5e6TuKqEt\n\tGhAA==","X-Gm-Message-State":"AOJu0YycGYZnKUZsd19KmTj5u65rn8WQ8baYyKz3tyILUqFXCGGtnV0f\n\t/EEBW3Pqv0mt9dD5jiPw0NTW7S7dKDUa++OTC4XJG04Q3jJQKikz8Qr2q5FIoITCIKpLdoEZ29e\n\tLGFoosRdSS+9FhNndLZTthBfgoKK3Y25PPC1xWlNAwcNcNpmatGqpLcG9T14CAgOJ8/APoXQhYl\n\tSIhrky+5uu/fhwAK/kXR7ZeJgOJvtfabdzTqFAnw6A/TmSl47j1bb6DCE8FSM=","X-Gm-Gg":"ASbGnctfJThu7tEKy4yOyactAri+fa4DJaYDSx96cX22kDef7a0a3APpdsp876HctJ3\n\tP0qBj8Mdyq8R0IrXEZL/JTuziiIGsklK4hlndOoVAZb2qeGum1+6iXpo9+i4BVU/OZYqru/5BBE\n\tyslzcDA7ORLQzSQfRVcgKu3fJRuQt5dTx5JFBoJxuScEdOezq7mvFJa8GU1T4u2xr10E3YUn7Ef\n\tzuGkFPGuzV0HosbbCHFOXaRhnHSPlFztH/Ptvz+IHN+ypl5lXybRbtptNrO0mdwmaQDzgidjjVh\n\torUKMKw4+VRDApBFLdUivSRleVHNbgWKhnlTYbn2XJqvIj9o9w2rreBP+1dcVaPHSRMixvfweAM\n\tgXSkiS3XgBltDwdjvTA==","X-Received":["by 2002:a05:600c:a07:b0:46e:1a07:7bd5 with SMTP id\n\t5b1f17b1804b1-46e32a3e1e1mr70826525e9.29.1758915134411; \n\tFri, 26 Sep 2025 12:32:14 -0700 (PDT)","by 2002:a05:600c:a07:b0:46e:1a07:7bd5 with SMTP id\n\t5b1f17b1804b1-46e32a3e1e1mr70826315e9.29.1758915133817; \n\tFri, 26 Sep 2025 12:32:13 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IErfBnuEnzvdbJKX8bmYHdcjnY9fvMh+PdamTmT1befCFRjHTdFsPyCRXRqz58reSGQOfbIAA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Hans de Goede <hansg@kernel.org>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 5/6] libcamera: software_isp: Add valid flag to\n\tstruct SwIspStats","In-Reply-To":"<20250925221708.7471-6-hansg@kernel.org> (Hans de Goede's\n\tmessage of \"Fri, 26 Sep 2025 00:17:07 +0200\")","References":"<20250925221708.7471-1-hansg@kernel.org>\n\t<20250925221708.7471-6-hansg@kernel.org>","Date":"Fri, 26 Sep 2025 21:32:12 +0200","Message-ID":"<85h5wpko1v.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"v4dLl_p5hOCIbtl3-1Z3qHXHSUOVMhSLQdoTuZ1C1Zc_1758915135","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":36005,"web_url":"https://patchwork.libcamera.org/comment/36005/","msgid":"<7e6c8134-6373-4ce7-ab1d-6794503b9dd2@kernel.org>","date":"2025-09-27T10:40:50","subject":"Re: [PATCH v2 5/6] libcamera: software_isp: Add valid flag to struct\n\tSwIspStats","submitter":{"id":239,"url":"https://patchwork.libcamera.org/api/people/239/","name":"Hans de Goede","email":"hansg@kernel.org"},"content":"Hi Milan,\n\nOn 26-Sep-25 9:32 PM, Milan Zamazal wrote:\n> Hi Hans,\n> \n> thank you for the patch.\n> \n> Hans de Goede <hansg@kernel.org> writes:\n> \n>> Generating statistics for every single frame is not really necessary.\n>>\n>> However a roundtrip through ipa_->processStats() still need to be done\n>> every frame, even if there are no stats to make the IPA generate metadata\n>> for every frame.\n>>\n>> Add a valid flag to the statistics struct to let the IPA know when there\n>> are no statistics for the frame being processed and modify the IPA to\n>> only generate metadata for frames without valid statistics.\n>>\n>> This is a preparation patch for skipping statistics generation for some\n>> frames.\n>>\n>> Signed-off-by: Hans de Goede <hansg@kernel.org>\n>> ---\n>>  include/libcamera/internal/software_isp/swisp_stats.h | 4 ++++\n>>  src/ipa/simple/algorithms/agc.cpp                     | 3 +++\n>>  src/ipa/simple/algorithms/awb.cpp                     | 3 +++\n>>  src/ipa/simple/algorithms/blc.cpp                     | 3 +++\n>>  src/ipa/simple/soft_simple.cpp                        | 3 +++\n>>  src/libcamera/software_isp/debayer_cpu.cpp            | 2 +-\n>>  src/libcamera/software_isp/swstats_cpu.cpp            | 4 +++-\n>>  src/libcamera/software_isp/swstats_cpu.h              | 2 +-\n>>  8 files changed, 21 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/include/libcamera/internal/software_isp/swisp_stats.h b/include/libcamera/internal/software_isp/swisp_stats.h\n>> index ae11f112..cbcfd351 100644\n>> --- a/include/libcamera/internal/software_isp/swisp_stats.h\n>> +++ b/include/libcamera/internal/software_isp/swisp_stats.h\n>> @@ -20,6 +20,10 @@ namespace libcamera {\n>>   * wrap around.\n>>   */\n>>  struct SwIspStats {\n>> +\t/**\n>> +\t * \\brief Indicates if the statistics buffer contains valid data\n>> +\t */\n>> +\tbool valid;\n> \n> I'd add to the docstring what \"valid\" data is.\n\nAck will fix for v3.\n\n>>  \t/**\n>>  \t * \\brief Holds the sum of all sampled red pixels\n>>  \t */\n>> diff --git a/src/ipa/simple/algorithms/agc.cpp b/src/ipa/simple/algorithms/agc.cpp\n>> index 3471cc88..e4e24113 100644\n>> --- a/src/ipa/simple/algorithms/agc.cpp\n>> +++ b/src/ipa/simple/algorithms/agc.cpp\n>> @@ -107,6 +107,9 @@ void Agc::process(IPAContext &context,\n>>  \tmetadata.set(controls::ExposureTime, exposureTime.get<std::micro>());\n>>  \tmetadata.set(controls::AnalogueGain, frameContext.sensor.gain);\n>>  \n>> +\tif (!stats->valid)\n>> +\t\treturn;\n>> +\n>>  \t/*\n>>  \t * Calculate Mean Sample Value (MSV) according to formula from:\n>>  \t * https://www.araa.asn.au/acra/acra2007/papers/paper84final.pdf\n>> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp\n>> index cf567e89..ddd0b791 100644\n>> --- a/src/ipa/simple/algorithms/awb.cpp\n>> +++ b/src/ipa/simple/algorithms/awb.cpp\n>> @@ -61,6 +61,9 @@ void Awb::process(IPAContext &context,\n>>  \t};\n>>  \tmetadata.set(controls::ColourGains, mdGains);\n>>  \n>> +\tif (!stats->valid)\n>> +\t\treturn;\n>> +\n>>  \t/*\n>>  \t * Black level must be subtracted to get the correct AWB ratios, they\n>>  \t * would be off if they were computed from the whole brightness range\n>> diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp\n>> index 8c1e9ed0..616da0ee 100644\n>> --- a/src/ipa/simple/algorithms/blc.cpp\n>> +++ b/src/ipa/simple/algorithms/blc.cpp\n>> @@ -60,6 +60,9 @@ void BlackLevel::process(IPAContext &context,\n>>  \t};\n>>  \tmetadata.set(controls::SensorBlackLevels, blackLevels);\n>>  \n>> +\tif (!stats->valid)\n>> +\t\treturn;\n>> +\n>>  \tif (context.configuration.black.level.has_value())\n>>  \t\treturn;\n>>  \n>> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n>> index b147aca2..e1c8e21a 100644\n>> --- a/src/ipa/simple/soft_simple.cpp\n>> +++ b/src/ipa/simple/soft_simple.cpp\n>> @@ -318,6 +318,9 @@ void IPASoftSimple::processStats(const uint32_t frame,\n>>  \t\talgo->process(context_, frame, frameContext, stats_, metadata);\n>>  \tmetadataReady.emit(frame, metadata);\n>>  \n>> +\tif (!stats_->valid)\n>> +\t\treturn;\n>> +\n> \n> As discussed in the followup patch, this means the later\n> \n>   setSensorControls.emit(ctrls);\n> \n> call gets skipped, which means SimpleCameraData::setSensorControls is\n> skipped and delayedCtrls_ is not updated, resulting in a possibly\n> invalid access in\n> \n>   frameContext.sensor.exposure =\n>           sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();\n> \n> above -- sensorControls is taken from delayedCtrls_ for the given frame.\n\nAh, that is too bad I was sorta expecting that the delayedCtrls_ code\nwould hang on to the last set of controls if it ran out of history\nbecause we were not feeding it any new values. Ah well.\n\nI'll drop this \"if (!stats_->valid)\" addition then. That will cause\nunchanged gain + expo to get pushed to the delayed controls for frames\nwithout statistics, which should fix the delayedCtrls underrun.\n\nRegards,\n\nHans","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 80B71BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 27 Sep 2025 10:40:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 16D3D6B5F3;\n\tSat, 27 Sep 2025 12:40:56 +0200 (CEST)","from tor.source.kernel.org (tor.source.kernel.org\n\t[IPv6:2600:3c04:e001:324:0:1991:8:25])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65EE26B5A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Sep 2025 12:40:54 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby tor.source.kernel.org (Postfix) with ESMTP id 12E9860228;\n\tSat, 27 Sep 2025 10:40:53 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 3C5DDC4CEE7;\n\tSat, 27 Sep 2025 10:40:52 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"GYTrMpJw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1758969652;\n\tbh=+hzfKy+CINBFA/9kHEsv66ivNw8Qb95Z9EQizQ+1QPw=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=GYTrMpJwDtmShs6gq0WEVzB24k2nlUjiuvnnHufVb1+lp0IWxnrZ5gua1p0U/Rzmd\n\t02yNxCQSCyUxHlupSeKWbNCH05WpNXEhvuwbLyvVo1eG0Namgf+4SbqP35HYZRwwiq\n\tTVBx7SPmGk+hnq7V1oObUdvTuA6WM4YUa4ZqksvSqNSVLr4XGgj5xBYHIE+o2OZbB2\n\txqCsRw1qCbtD+AUDRSb/XtZkTzxFonMP9b6y7AEYBPmwv1yOHcOjl9mLqpzohvjHRX\n\th/oxjz9gyNthEisHh7CzuZNoi5J6W1mMPbtLSD+1iAeTg2KDgIPMMgztlLEADBJ632\n\tiqTmzvgus/YdQ==","Message-ID":"<7e6c8134-6373-4ce7-ab1d-6794503b9dd2@kernel.org>","Date":"Sat, 27 Sep 2025 12:40:50 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 5/6] libcamera: software_isp: Add valid flag to struct\n\tSwIspStats","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250925221708.7471-1-hansg@kernel.org>\n\t<20250925221708.7471-6-hansg@kernel.org>\n\t<85h5wpko1v.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","From":"Hans de Goede <hansg@kernel.org>","Content-Language":"en-US, nl","In-Reply-To":"<85h5wpko1v.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","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>"}}]