[{"id":38986,"web_url":"https://patchwork.libcamera.org/comment/38986/","msgid":"<178048692224.815980.6982005945126072414@ping.linuxembedded.co.uk>","date":"2026-06-03T11:42:02","subject":"Re: [PATCH] ipa: libipa: Handle missing YAML nodes in Interpolator","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Shaunak Datar (2026-05-28 08:19:09)\n> Interpolator::readYaml() currently logs an error when passed an empty\n> YAML object because it expects the node to always be a list.\n> \n> Optional tuning parameters such as colourGains in the AWB Grey algorithm\n> may be absent from the tuning files. rkisp1 uses tuning files without a\n> colourGains section.\n> \n> Return -ENOENT for empty YAML nodes before validating the node to avoid\n> ERROR logs while still reporting a warning to the caller.\n\nThis sounds quite reasonable to me so far, but it's hard for me to\nvisualise if this means we'll ignore different errors.\n\nThough - now I see issue #323 shows me what I was missing!\n\n> Fixes: #323\n\n\n\nThis should be:\n\nCloses: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/323\n\nBut we can update that while applying.\n\n\nSo this works for me, I'd be happy to hear if anyone who dabbles more in\nthe IPA has any concerns about this ... Stefan ?\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>\n> ---\n>  src/ipa/libipa/interpolator.h | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/ipa/libipa/interpolator.h b/src/ipa/libipa/interpolator.h\n> index cc4b27b5..01bd8140 100644\n> --- a/src/ipa/libipa/interpolator.h\n> +++ b/src/ipa/libipa/interpolator.h\n> @@ -46,6 +46,9 @@ public:\n>                 data_.clear();\n>                 lastInterpolatedKey_.reset();\n>  \n> +               if (yaml.isEmpty())\n> +                       return -ENOENT;\n> +\n>                 if (!yaml.isList()) {\n>                         LOG(Interpolator, Error) << \"yaml object must be a list\";\n>                         return -EINVAL;\n> -- \n> 2.54.0\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 66364C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Jun 2026 11:42:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F451630BB;\n\tWed,  3 Jun 2026 13:42:07 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5B61262FE1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jun 2026 13:42:05 +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 4C55BDF3;\n\tWed,  3 Jun 2026 13:41:41 +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=\"JEDi9rHT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1780486901;\n\tbh=v6VrcF3lVeoK10SCQKHAbTg6QokcoBrNQ6909gWkAqM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=JEDi9rHTCgRqDDFD+9fG7ZAotI2n4HoEp/stpbc7MZdKyx68STSVq2iGC7SOEt6tc\n\tszqg/GORzpabfnig0lVTbV9uj+8zxu7i6nof9qKQpUIL4J8zTmtAFgCF2rzKX12Ydw\n\thz709yQcmUf1Kp9Q+NpUXSPJFi1MCp2pq/k+mzGQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260528071909.547179-1-shaunakkdatar@gmail.com>","References":"<20260528071909.547179-1-shaunakkdatar@gmail.com>","Subject":"Re: [PATCH] ipa: libipa: Handle missing YAML nodes in Interpolator","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Shaunak Datar <shaunakkdatar@gmail.com>","To":"Shaunak Datar <shaunakkdatar@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 03 Jun 2026 12:42:02 +0100","Message-ID":"<178048692224.815980.6982005945126072414@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>"}}]