{"id":20689,"url":"https://patchwork.libcamera.org/api/patches/20689/?format=json","web_url":"https://patchwork.libcamera.org/patch/20689/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240717100913.16640-4-jacopo.mondi@ideasonboard.com>","date":"2024-07-17T10:09:06","name":"[RFC,3/9] libcamera: converter: Allow registering with feature","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"88a08ff8768e7804b7f1038ca14487754726c04e","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20689/mbox/","series":[{"id":4455,"url":"https://patchwork.libcamera.org/api/series/4455/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4455","date":"2024-07-17T10:09:03","name":"Handle Converter features differently","version":1,"mbox":"https://patchwork.libcamera.org/series/4455/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20689/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20689/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 AA50ABDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Jul 2024 10:09:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3BB9663383;\n\tWed, 17 Jul 2024 12:09:34 +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 2BE6C63369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Jul 2024 12:09:28 +0200 (CEST)","from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 34768ABE;\n\tWed, 17 Jul 2024 12:08:50 +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=\"C7BTKLe6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1721210930;\n\tbh=xqXoeB7ybBMidkZKEB9nnUbEtQ8XMotOtU/aedcAEG8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=C7BTKLe6ATdgIf/BcQBeWmmD+zmzS3tWspxCj8tQaGCOPc4WW2c9nlLeX63ZsOSQe\n\tlO0fUiPmhkGgZYfE1Gej3Xa91es/T8tnOEkuEVtWC010EAnd4xJRKBh7CXurIiOciL\n\tHy4BBrg9IjhlrbfaS55uGo8Ap8kJ3JwB6Se6BKfg=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[RFC 3/9] libcamera: converter: Allow registering with feature","Date":"Wed, 17 Jul 2024 12:09:06 +0200","Message-ID":"<20240717100913.16640-4-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.45.2","In-Reply-To":"<20240717100913.16640-1-jacopo.mondi@ideasonboard.com>","References":"<20240717100913.16640-1-jacopo.mondi@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":"Provide a way to overload the REGISTER_CONVERTER() macro to allow\nit to be called with or without an optional set of features.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n include/libcamera/internal/converter.h | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)","diff":"diff --git a/include/libcamera/internal/converter.h b/include/libcamera/internal/converter.h\nindex ead465170d01..035e6ffff135 100644\n--- a/include/libcamera/internal/converter.h\n+++ b/include/libcamera/internal/converter.h\n@@ -116,8 +116,17 @@ public:\n \t}\n };\n \n-#define REGISTER_CONVERTER(name, converter, compatibles) \\\n+#define __REGISTER_CONVERTER(name, converter, compatibles, features) \\\n \tstatic ConverterFactory<converter> global_##converter##Factory(name, compatibles, \\\n-\t\t\t\t\t\t\t\t       Converter::Feature::None);\n+\t\t\t\t\t\t\t\t       features);\n+#define __REGISTER_CONVERTER_NO_FEAT(name, converter, compatibles) \\\n+\t__REGISTER_CONVERTER(name, converter, compatibles, Converter::Feature::None);\n+\n+#define __register_converter_expand(_1, _2, _3, _4, EXT, ...)\t\t\\\n+\t__REGISTER_CONVERTER ## EXT\n+\n+#define REGISTER_CONVERTER(name, converter, compatibles, ...)\t\t\t\t\t\t\\\n+\t__register_converter_expand(name, converter, compatibles, ##__VA_ARGS__, , _NO_FEAT)\t\t\\\n+\t\t\t\t   (name, converter, compatibles, ##__VA_ARGS__)\n \n } /* namespace libcamera */\n","prefixes":["RFC","3/9"]}