From patchwork Fri Jul 15 15:16:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 16654 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 30D34BE173 for ; Fri, 15 Jul 2022 15:16:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 91DF76330E; Fri, 15 Jul 2022 17:16:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657898184; bh=WCBUiLjuoPoP6f9yUcnSft+HV9zpUe5Ro395+XrtZu0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZUpv/FHQXbFodqHFydoxweOZD1JI4k4VZplEe8jmarK5YpRrcJo/+Th3Vr1h56OWo ChjZXHcNRKJJmZnDGoD28UP/L09yNz0290T3LMBGQSEE/A5G8aFw68ymD+U/Fz0fN0 dAhO33sDUxL1ajwbzmxH8jId0ydiJZZng69EkRRmyTrHPhEqkxpMzVkZO1C4KSPQ0X Yldhhvd+RBhXPdEudKvRfIjj8U3p25kr109OxDWk0obYPbynU8jURxpLNdqdJLTV5a EXRvFnanyDr5zEbCN2U3R6Yu+rU0mOrNpri6i23QOqHkp0ITeqSeoDNuaVYz/CHJjF x9PpJ72rl86wg== Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2051.outbound.protection.outlook.com [40.107.21.51]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F332A6330A for ; Fri, 15 Jul 2022 17:16:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Gpl29ucI"; dkim-atps=neutral ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iK+8yonYDhsHvS67lJ7eSu/fl5VIJM1pjsSUg72basffQKdnYiBTs0fDqnfh7ph7IKcKairx714dHf4S8BLYVpUlMcBt9qBSEBlp1OPPsxDt57lVIJbzVeweA4L1Ru4TWRqcJNdHIwKzTsrLfhuT7t4AwTZaAmKzVXLHa1CSfrHTs/za1nIOz4i/ZCwDqcDH1xLKt5ZfMHuW/srTKLBRS0IMrsuCksxYa/EyMbjRL4p2EEfDDaW7Lc45++Y8hTaaflgglcarO+EoUXauuLZpiKzpy3xWQm4z1tDuAUZBlDHzdG1MvfJi0v3vTECLYQoV5P217o5qJrXVHPU8CbeDcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iypoVp2Ip/Ev8r5YUH8r4rB0vkuXNhbbX3AlevQEtdA=; b=FDjkZryJ8WEI2Lq7qBor51yEW9/szH5g2GVsA3ZU4eQQ0N0dBODzeyghm9/gTbopWL4puSSqEdvsf80XKkcjs/vMQ4IL71CB15tLrMYttaCnD53bIcS/IrqetEgGHnneNVsRKA8MBW9leSqfEfbgsAXnuSI/5ptPhMaTt5eu6Eig+uRFeQpgdxTVmkE4wLKxuo2uoT+QJQm+rh9AC7rc49hoMzXYZYxqTossaLbegVDrKIF3BahhsOjqGGGFnLF42APE85i1KmagGYIYIOubhme6LpagkFhGJJzD9jMMM3U/mqWEKzgUECY12IRLoc5k5EqR/fXw1P20oE7Kw7tiig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iypoVp2Ip/Ev8r5YUH8r4rB0vkuXNhbbX3AlevQEtdA=; b=Gpl29ucI2JEd2Vooj/eDIqdQnvMAKCUwke/+7SxL8YXhyTl66werj42lnWuJo6kwlzPny5HMl/tUGCe2dln2z8GHzzr8V85mxudL16ovK5gzYOAkjE/112yjm2WML545iTeSAjFgSOBhB50nuFJgVAcflBLFpELQhpYjvEbQKkU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8703.eurprd04.prod.outlook.com (2603:10a6:102:21e::22) by VI1PR04MB5822.eurprd04.prod.outlook.com (2603:10a6:803:de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Fri, 15 Jul 2022 15:16:20 +0000 Received: from PAXPR04MB8703.eurprd04.prod.outlook.com ([fe80::d51c:319c:bf4:199f]) by PAXPR04MB8703.eurprd04.prod.outlook.com ([fe80::d51c:319c:bf4:199f%5]) with mapi id 15.20.5438.012; Fri, 15 Jul 2022 15:16:20 +0000 To: libcamera-devel@lists.libcamera.org Date: Fri, 15 Jul 2022 17:16:07 +0200 Message-Id: <20220715151607.1010433-1-xavier.roumegue@oss.nxp.com> X-Mailer: git-send-email 2.36.1 X-ClientProxiedBy: PR1P264CA0015.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:19e::20) To PAXPR04MB8703.eurprd04.prod.outlook.com (2603:10a6:102:21e::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb92f37d-848a-4138-76d5-08da6674f8cc X-MS-TrafficTypeDiagnostic: VI1PR04MB5822:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1aD9shRuEsShiajVy0LbSoquv8Ow8cgpePA+P/RIy5VEWdPcwt5oEqpoQG7igswXT/uh9G+fL6T1gdrOSaeqKtuHju9CgsZtMmTPIbMqdN9X4unTQ68pI+tmhS4jeZr4xH9RjT80mdkenB+V5UlGBGJ3qVrOXTSQLIh7dtE7vhqLeA6qILzOBqrWqimtPg2dLDgzAoXIYFI9ZxtXwolL/Vli6R766+ZyOlxoqx8kJ4H1DvTIY9N9QIHemAH9EnBH9+HcCuf0Arx8o7Do49IG2Xy/IwqNIzEI6T6QJzztclLm61QTbSD7DscDI8FtWmE/K5Vs+S80AdTdZOnQipg7zvLGlM7+9kzknFQCxtE+F9jOMUjfdR/0TBCSS1iOpSHUnH9adNPH2KWriq3rR0TEzJ8+CzdumI5BhJnlbFZZRSMZZFK/6VvrTElZsS8Nbe8xlL3AnoN6PUzM9ibfLUt4pQzBaAHi+0hUhT792+WDdo3aIwyyv9kaUC0aCAprHZtJvCXHoqZrTkHppsIfly2WTfWmiDY4jygDD97CkmwNSt5F+wsCzDTolNJpCvyGZUwQkDqOzlYosShWm8lCPNisfg5AcAOGKBq3mZLhh3i0t6W2DNE2zLtDKUS4S4HDRMtD60OtHkY1xdG18tMNJC0Y3TtUHXCAOQJKNEUprqRUBvJ8sFMlX1Bri8jgj2wS76izR4vKLnOcC/bQsdyAMGq/Tw5TcFrjuEfjvQpjKtDYDafMg2l+Tbikjz3o9DMMBcBg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8703.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(186003)(6916009)(38100700002)(316002)(6666004)(6486002)(2906002)(8676002)(8936002)(4744005)(66556008)(66476007)(1076003)(478600001)(41300700001)(44832011)(2616005)(66946007)(52116002)(6506007)(6512007)(4326008)(5660300002)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: adbxWIo69p0lF6qSWon1EiZmBWbgsuiZQc9ykvwmPgjZCvs9nrxjG99fZqitpJolZTQoXk1kpgK2243molUjJZsHiHfTTHWesb8NhNZc8+8V1+mnhhSnAqRDXKBv8bdYCt34+GpFfIDRypoUTIEzGVh2JjXeozz1zMP2iTka2VSYewRIOwbF6jzaNZH7TgJPNjOptjfI+Fhij2kfOIEdYfk2jK6mcQc1jfUk/7uS1rEPgNXr+mGDzH44jY2zOVN/QT40wfhYiNUJyhGg6NU75ZQNeUmvxbRuWfl2dZT6+CpEcjLuqhgQAlT/9GKtSytKGUfZq1qtOyJWx1bsWSUHrEN44MoRq96mUZCKZ5cG2OPzB0dAAj4cuNQ7qkBodIRw1JE/lfznmlP+8T52jguUPlp9KiS2U7L/1kj1tVUSr5w3lgMMiyM4qnCf9Sl7L5SvftPOwt9twiFKahggRxLvG6tStalxF5k/S1RZCkEgwbDKy/oBLXaOaHXTWywyWDqZ4iXogVBdziU6g02ZXBUASHBGxPBE17a+ETMCwLKRQYtiwTpRW+pP1vyd0L5FmgNAWu5umXnEJUo8CHXhcbqSfvoTDSd1tfFVSXFB0kVH9Ej6uPJ+R1fxj8514LeMJUBcL57T7SVZ9frUjFx174h6mMc6FDFWYOqH7KbXeY57fEw8h6EhQxCxm2cHjQGrMSjkmlNSoGZobYcZUupmxXstPBmDzzAMK0jDDVBd05YC31l5tg/AjTf5vjP83Wl8/QqGL+10SBpvgsYIdFtJLpjvUrAoPMjp0Z+AH6UafpRpJt5ne/7+VbBu/Rdr64lG0D46Bs/jux9g5ixvxc4cXCA9jMyjXQ2uC81u7D4HmcCzzEXOUh8pK/aOtsMMhs66cQ+3H1Pfv3ueHtNADy5aYH7ibRfcS6sV99h0qL4v9v3pWbqew5HLkSPAQRERFHWUiSGiiGd5qPPrs740DjiSmI8MfuYernP/vNkrc4wpkyRq13bKA3MmBGu+3eakAvTxzXnGbazxbKoJnuCahQaw8sndnQXznRb2hxKjVnxdY3xGCFkmpQF6wzTVPnZ+czLEdUQMnqYq+N0OvTmnh2uBiqlJC0k4PbrelBB8UUDchQARxjuGkviUb/g86VvM43CgDSw9h7nNOB9POCbZGa0dsKulVCUEbYdKBZS5Rsjx0YOodRXY62rOA21/gKaO0efj6pONRpnuJ2z/US2xSugD4nQwgO5oJsvgOvGYU2334B8ScP9smy4jXxl5ok5UNwWwa5AnU3Ny3Xu8KHhGGjWP1FD7q/4oq1F3oUxRAKNW3qzTQNLKnd0lTPNVaNJprm3F2g259uKshVQaxSip4FxzZRQMohuQgMcfY4nimIDUK6trkANsyc5oTYs+ILJJBjnijqiCIyyg8faL50UL/f2NVAL2hN3sSSqKYBohJckJFjWQbmp4zULi2yTRy7b1R1QWf4TD7nz/3HYCn7suqDkqoxCsxvmcOSmgX5HdI1ooTVLtSJchyBl1UfctQZXE5lL5h5/muKt70CGvmyV4OSV6zIP6POoOp+/JJ/lwLecvMNd4AXIoeqlg0zQx7WB5mZpH/dTVhG0OOIJeeYQyqMJ14FDuZkDecN6k4mfZMgoay0BeP+jBQs96ZDubdqiravT1rJ50eg4r5Tjca7FSznyo4/e+8A== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb92f37d-848a-4138-76d5-08da6674f8cc X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8703.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 15:16:20.5091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qgx9vekRTgJUO4zVmjmMewnNSK2APJE4sEiUV2LCAKzeAtfKVELQX5UsoMkIF4NS4EWeGw/u23j7wkw2yUQ4pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5822 Subject: [libcamera-devel] [PATCH] libcamera: pipeline: simple: converter: Handle unsupported input format X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xavier Roumegue via libcamera-devel From: Xavier Roumegue Reply-To: Xavier Roumegue Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" SimpleConverter::formats() should return an empty vector if the input format is not supported by the converter. Signed-off-by: Xavier Roumegue Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera/pipeline/simple/converter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp index 77c44fc8..19134edc 100644 --- a/src/libcamera/pipeline/simple/converter.cpp +++ b/src/libcamera/pipeline/simple/converter.cpp @@ -220,6 +220,12 @@ std::vector SimpleConverter::formats(PixelFormat input) return {}; } + if (v4l2Format.fourcc != V4L2PixelFormat::fromPixelFormat(input)) { + LOG(SimplePipeline, Debug) + << "Input format " << input.toString() << " not supported."; + return {}; + } + std::vector pixelFormats; for (const auto &format : m2m_->capture()->formats()) {