From patchwork Thu Sep 8 02:31:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37751 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp24607pzh; Wed, 7 Sep 2022 19:32:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6pwQaJy8QytY/gVtEWs1w1bkE6deaGCu/FzA/wxNWtoNKr2ZXT7kAQLjwtHa1INHJF4/ce X-Received: by 2002:a17:907:3d90:b0:741:346a:6e46 with SMTP id he16-20020a1709073d9000b00741346a6e46mr4298908ejc.279.1662604337682; Wed, 07 Sep 2022 19:32:17 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id le1-20020a170907170100b0073d7de9711dsi986748ejc.650.2022.09.07.19.32.15; Wed, 07 Sep 2022 19:32:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=DfgZ66HF; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9393168B98D; Thu, 8 Sep 2022 05:32:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068014.outbound.protection.outlook.com [40.92.68.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0189B68B35D for ; Thu, 8 Sep 2022 05:32:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jgLp692VfQsA1cv3c7vQj48WM43U4ye9UPcnb0Obc7RdQd3ZXZNAJKOUQNpEwsNyk+UNem61XzfepzeBb3OGsEHCd0tnrSUwKrYGwHLxzOH19T/RTxFFycO50L5P6KMPoT+RZEDI3UoBjALoQ7ESJ2NailA7bKD0UDJjHEDTGn+nl6cl9dwSR4FRbJIBDlizSOa24Yv+Qw2QpqUxjYoonLwLXEhDAPQHzj5nk/T4IFBKbtLwGt2xhBm2jHgMrddBwU3lC3IVpaJyandg3Chpjo2KUzEElszK/bHVxhBKXT0E2Orrzrl4LrgEOQVRGmKeh8wOZ/ilckpRN/h0yCotbw== 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=z3zbAW85RHAsZkkWQWdKnR/V6hXZUJPPX4l6gedA2D4=; b=Zw/AnMGJ3/cB0NyOFgRBvDlE4D6ze1PiaDM+rIHgPtC2kL0avnHIJAaGI0bUge9UXQX36QKCToDQyjWifRntglPHBkHzQlJfj+PNuS+JjnOSdByYzpIjwD+DMJjIWwkGuaiyD9n+D4dL37yW09nOfP/Wm+bciKna6HH2TT9f29kxOcvKi/PBSWMg21mlhEwqDHN1Ug52hWxP+zNyF3Lhhp9Mwb5bGxpVyK0K/PbeFCGTJ9Zf7gsn/SfLL8CgA1IsEXUW+zYNyZ7W1ILllkBxgJvr1/85kRL4gCJvRNrobjQx5uJoj9KhZHDwVNbyJK2c1jYWLQ0x9XQk+vGtxDeVXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z3zbAW85RHAsZkkWQWdKnR/V6hXZUJPPX4l6gedA2D4=; b=DfgZ66HFexmmynma/IPqR66CFflU1htlc8oH8c66DuW7G+764wrFUSdWHXqiPSP/gUhpmuqH6rX2/9+BZd3GPxRTFvcY3A1FCqv1NjpwKvoI2tHWP7Txiuq8AVf10CMU0QJMxj1fxs4JxHkk0u4QjSzuytNULxTNFhXoPviLAOidfyaWgq2cESdOAUuVTMbhogAwXXQSXEKCDgeo2QHCPujXxTFbN4LKBTksmUsSq5q4GTGtkHWgo99U1dEEAr5fiN7yWybOQxKD2O0qx+Aj8lAR/3TcbT+TjcQ8Y3VKEhRslmAIF5Fs8VVAYrxl/A0edw4jzDZ0SPLi10iPfPmVCg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0252.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.15; Thu, 8 Sep 2022 02:32:01 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab%8]) with mapi id 15.20.5588.018; Thu, 8 Sep 2022 02:32:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Sep 2022 04:31:55 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [8ya4pvn/Gg23KC/YZDKpVBHbCX5B1Nog8xHHIzyWfoc=] X-ClientProxiedBy: ZR0P278CA0066.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::17) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220908023156.2210710-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c7065a9-a229-4923-aa83-08da91424ec6 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmp16suNY6DpRD31ZauPJnPpN0uJ9LIbfPt0w0jhhi6lIHSR0kGMPu02ES+YBJ0z8jiz/EDKgXspYk6UcFUp7YjuqXVn/W8nUXqgOs9CMKQCMEJFt9iyMbWCdoqCRVp/diTMO9Rzf3+SLFArJrJAalO7FGWPEUZOrjrVIHVxX8Mc92H+sW1yCe+u7Vd8bYq0SHqlDLNexEAEZcwaYDTOdmVg2D0vytj3SFt/58StYqAV6bxcXB9vidbovb7ugv91WkpM1iUlWtSU7h2POiCyn7nGDD1BJTu/Qc0Vi4eApN0tsxSiMT4YTj70WI+jCcQnQJp2wni7QZmDcl124DfmKlMIv5s3x6Rgkn8Cc9AnrxpDq8XyToWhhAaG9eLjYBexlp46Ewg3S0XRh4imuC+2rIxDUtpffyqgDJygSOHfyuArxDiI4MwvTn/rKmUGmiMsm7dv5oZ+ra8OmnlMm1CQlXMOisY9zED5MZ0JK9vFyL+pzsCZc6h0i87rWkdO8mS/Ecw1AVYfXiZ37hqIUEYnWw/PbtqQMcG5gExYDR5AfDwxzK7n04VbKM1vuhoa+5vNT3MSTLaUIZk6UpWV1C+p9HW1NximK31NWDc8o1Xe78ABYX7g6QTvdzaEGKDLyNVw/DMm0Fv16cEsm1+IX8QzLsSzWowDZLZz5iUuYQdcHrYu2H7xPREqpDs5PnFnlX/ZwBL6wuuBq9FxtYOfL+O7J2WTYSTWJ3jEp8Fakk7fy116OKZuQxDALqu19+gpkXb4Vxg= X-MS-TrafficTypeDiagnostic: AS8P250MB0252:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P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Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 02:32:01.0606 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0252 Subject: [FFmpeg-devel] [PATCH 1/2] swscale/input: Remove spec-incompliant '; ' X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8SIcNrn18zVO These macros are definitions, not only declarations and therefore should not contain a semicolon. Such a semicolon is actually spec-incompliant, but compilers happen to accept them. Signed-off-by: Andreas Rheinhardt --- libswscale/input.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index be8f3940e1..88e318e664 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -583,8 +583,8 @@ static void yvy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con AV_WN16(dst + i * 2, AV_RL16(src + i * 4) >> shift); \ } -y21xle_wrapper(10, 6); -y21xle_wrapper(12, 4); +y21xle_wrapper(10, 6) +y21xle_wrapper(12, 4) static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused, void *opq) @@ -828,9 +828,9 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, } \ p01x_uv_wrapper(bits, shift) -p01x_wrapper(10, 6); -p01x_wrapper(12, 4); -p01x_uv_wrapper(16, 0); +p01x_wrapper(10, 6) +p01x_wrapper(12, 4) +p01x_uv_wrapper(16, 0) #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos)) From patchwork Thu Sep 8 02:38:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37752 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp26505pzh; Wed, 7 Sep 2022 19:38:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR45C6AEe9/tkRETiVQ75yxFvspzbxdd1fVjl2zDfG21BEkhzHApRdQP81YSfROpE5FNDKWZ X-Received: by 2002:a17:906:cc5d:b0:741:38a8:a50a with SMTP id mm29-20020a170906cc5d00b0074138a8a50amr4284208ejb.650.1662604708635; Wed, 07 Sep 2022 19:38:28 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u11-20020a170906c40b00b0073d97252ac7si799240ejz.49.2022.09.07.19.38.28; Wed, 07 Sep 2022 19:38:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=ByDfZhCd; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3931168B9B0; Thu, 8 Sep 2022 05:38:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2012.outbound.protection.outlook.com [40.92.90.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1060368B989 for ; Thu, 8 Sep 2022 05:38:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YQ2gaOetmm/PznddE4IimSFuZzkMEyvHfHYE8q5dCsgmrJrUmXVb+fyybLfEw6iqCEpLTW5c0Hr9o3OiKT3F3pNgCag9Kpq9AYK3XIgKWz1NMeRsG276jrIzuRJ45k32+enBRwuOQkNoo3Sm1bwZQ+Ws2Av7WXfkGheU0Z9YPBQAjUBAAbYo+Ka4/ekfA3pnIE0UMgpxmF4V4cVumri3XQ8fhALPZdvbY9hl21HjpIAAsp6ha7AKoWmPZC/W8mAUaUn4C0WO6V/p6d/RKId/E/OTRjUeXF35okwxyZT40nErB97ctBvtpiSvzB+QxXa0DiI9xV2hfPy8o5M11fUCaA== 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=FuWtqZJUTcyq24634WyfrI+2ZuGsGXvJllUG40a3x7g=; b=KKU6RcbI3Z2TsfG4tfqQlRPR4QRLvGpFIjFOaBF0ZrxjEmYHcwskm1mMJuAa4GrcindYy7YXLMPIQaCS0qZSmD7yDT7EqRJNcUaFVCACCFUXjbEyaWVAuyZ5S4UxXN8qes5eOJGX65Hlc4n7+LHWiY/fdviWcRC/aeqCJMPZdyty96WsuOOIQ7fOX0mJcBkIUTXm5wGwhgaymPiRF6xIvDArsXNLWTdd9jY1WHg/h76sXW6OLFaLc9smzdTwLuryXvhbYEpHfZMs8+XkUKYg+4Z/KUCinpzhhhyJh4caqg8R+KTEblMiCNLIW4dkHXTKQv4uykNmDJm9xWnHZR3WoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FuWtqZJUTcyq24634WyfrI+2ZuGsGXvJllUG40a3x7g=; b=ByDfZhCd99+eS5P+ndykoIHPmiSFEf3x7351lmxdg/snsgwGL0nwZO55upZhui9xCNPX/zMK0sy4bDZ9czKL676Wfi7+IyuXneUM1ThVs76pmbLYEas4tWuOg4e9LaGWS85nlPpOSdGD8hEbeThYFvziOGD1B3qTn6iCqlIUJnsRiW3zB75oiYedt8pcoG4OMe0KrUuri81efqCo/X1UH8Ds4RU8kEk0JCQcAOIKyGz9gHlngwsdnDu4SmOwOGyq2VC2gVbRUlDoX0X8lTxBPESkZShuZ/9rfSnSpCFruS4R52OFyi23DZcgGftARsnoKK9fbgcRokePlqvJmni8lg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU0P250MB0484.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:34c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 02:38:15 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab%8]) with mapi id 15.20.5588.018; Thu, 8 Sep 2022 02:38:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Sep 2022 04:38:11 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [nnMnn+L/wLDSbU2OyBj8WZ8PHtahf1Yvy2cw8d14Ep0=] X-ClientProxiedBy: ZR0P278CA0028.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220908023811.2210738-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31470487-8e54-453c-a540-08da91432e5e X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmp16suNY6DpRD31ZauPJnPpvhrbO7h5BExicRwLmBoSTm4K96mizwewaHUgPtODmuNEBZtFp3ADxnwMwGPELORgKNujPceOMal8437+lqZmTxR5fJTE0MFn9oQCAcf9fF0MwKSAS/yNnPSxvusLzrwxXQixRrTjigDNovwRnFdZUPRWGSOkaueJlLBQqWKPtoSLJBQnhF1FZBU2G95ppqEZ6T+vkquNoUTovIkqgHnzbRyKCrMxLui4jetErb4MtuUCkM04m6/3+0K43tRCaISVSFkIpiWzEQ18vKyf9duEfqE74aB/UtpnL7LnDe7joWMgRD+K68SodjAKs88APsMUCcVb6Qx387QyYk9r161SXPdGBeXjtxzIEVPDJqQEQ/2uQ7VP0no0ANk7RKMLFwQsgLZgukYC4tUp9oe2ONHKogRSQQmlcyBXnMjlRU6aujlmrhAbmryS+7dvOzPe8WnfkeHggfFwtu4X/r/wNmoo4rWNMQaWkjJg88cBzvh7f6imoM+Uc7YYkPYKLa9vkenKqJDp74rXB5CBMTIcxZT2rtgHUaGx+h0HJlLjueI0Yqt4rzlm/v3df4VOO683uQpmsy9ujwxzjHE6LX8mj8CVG/58CFmVuKjTUAAE6gcyl58Y2NzCkrb9B+fpfj66JfFhPjUPgVYQ+kegz+ZwoFZmcp0SKcsC+YoAfIyHbjcUypNLyCHbcrro4uL1bFkr96aqyawO+s0LsbJlS28SbrMaKHp+PyFwrM025AXfYQW8lTg= X-MS-TrafficTypeDiagnostic: DU0P250MB0484:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LoOAXhkPK4w9n/AEaaJTMzrx04s6eVPcdDQ7V9nClJpD10/UanmmsNOHI+YayZF1h4dS48ct6nzyf4LlSldXSMI+MPoiL9Uxzvs46sgqB378kqtWQ/LMlt2dalPql1/iP7D+Js9yC3HOOV/i3qJLIA4h0NESP5ep74j9NiQmcAZvxG++kmbDIaeHAjQb68UjDqF5PNACE1ZP/MhO5uiobZMfR2ezWubLwBkt7n8Kwjz3fwNEERW8MBzppfzsv4tKTypegNGkDvXw6wZX/GQ0E+f59TVe3uqsvaS2aO03VlsdbnAWyqmeXiNNWnVt6pZjGXhmGo8MQG5DaciIQ37nHmhxxtx5zbJSs+hpV6Ns2D08vyjTpOJIKd5Lm/xg/ojEJBRqB4DMr90uvY0tE5xOX57C3IEufqXyCmCNC5ceZOyq5LRVZxi+Wq2f5ukqIoXWpkP5pk8Y3hRUW4/ZYSMDYs0+iU2Wp7qKjgCzfBmRMFBpvctmdTTzAaCtfbN3y00xytZBnnA/Ijz6NVwk7cpEz1RxpC6/avwSnookOHWvugJ+7gmA0/hvk2Ur1rVSt02qtCSJ3GpW8ln+tqaEoimmmXjiTSJSitL3Ei4757gDhE9audiYkf22oCAj6MZlEZhP6LpJgLbxR3cnKoPkoLrXpw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gl7OX7S0XIYVTQ6pTcgkbyF7vWDksF2Bl/cjZSMuajsfvCKJXWqjd8KAaFuEgYYtpWJLRZRFDefCW25ObhSQXawAPt3xDHhsrj9K9yFR3WmvfFNfCy3J3qiPvRPc/cTKZBDvwV/BRZcIQsvvF83ZqCHu2512aNiZcvCR0WlIg38F80ZjnCi7lZmQqE7vFslfOMvHGPc6MC7rMo8lOVhQRrvxlQi6t4WmXtaaEaW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QzcbRlHc7BYQneTi8p7sOl7 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31470487-8e54-453c-a540-08da91432e5e X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 02:38:15.5168 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0P250MB0484 Subject: [FFmpeg-devel] [PATCH 2/2] swscale/input: Avoid calls to av_pix_fmt_desc_get() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qe8ZIRj2WQ8o Up until now, libswscale/input.c used a macro to read an input pixel which involved a call to av_pix_fmt_desc_get() to find out whether the input pixel format is BE or LE despite this being known at compile-time (there are templates per pixfmt). Even worse, these calls are made in a loop, so that e.g. there are six calls to av_pix_fmt_desc_get() for every pair of UV pixel processed in rgb64ToUV_half_c_template(). This commit modifies these macros to ensure that isBE() is evaluated at compile-time. This saved 9743B of .text for me (GCC 11.2, -O3). Signed-off-by: Andreas Rheinhardt --- output.c suffers from the same issue (and according to coverage is responsible for quite a large chunk of the calls to av_pix_fmt_desc_get() (144699832 of 321342234)), so I will be looking into this tomorrow. libswscale/input.c | 96 +++++++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index 88e318e664..4144ff81a9 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -28,14 +28,19 @@ #include "config.h" #include "swscale_internal.h" -#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos)) +#define input_pixel(pos) (is_be ? AV_RB16(pos) : AV_RL16(pos)) + +#define IS_BE_LE 0 +#define IS_BE_BE 1 +#define IS_BE_ 0 +#define IS_BE(BE_LE) IS_BE_ ## BE_LE #define r ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == AV_PIX_FMT_BGRA64LE) ? b_r : r_b) #define b ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == AV_PIX_FMT_BGRA64LE) ? r_b : b_r) static av_always_inline void rgb64ToY_c_template(uint16_t *dst, const uint16_t *src, int width, - enum AVPixelFormat origin, int32_t *rgb2yuv) + enum AVPixelFormat origin, int32_t *rgb2yuv, int is_be) { int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX]; int i; @@ -51,7 +56,7 @@ rgb64ToY_c_template(uint16_t *dst, const uint16_t *src, int width, static av_always_inline void rgb64ToUV_c_template(uint16_t *dstU, uint16_t *dstV, const uint16_t *src1, const uint16_t *src2, - int width, enum AVPixelFormat origin, int32_t *rgb2yuv) + int width, enum AVPixelFormat origin, int32_t *rgb2yuv, int is_be) { int i; int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; @@ -70,7 +75,7 @@ rgb64ToUV_c_template(uint16_t *dstU, uint16_t *dstV, static av_always_inline void rgb64ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV, const uint16_t *src1, const uint16_t *src2, - int width, enum AVPixelFormat origin, int32_t *rgb2yuv) + int width, enum AVPixelFormat origin, int32_t *rgb2yuv, int is_be) { int i; int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; @@ -92,7 +97,7 @@ static void pattern ## 64 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src, { \ const uint16_t *src = (const uint16_t *) _src; \ uint16_t *dst = (uint16_t *) _dst; \ - rgb64ToY_c_template(dst, src, width, origin, rgb2yuv); \ + rgb64ToY_c_template(dst, src, width, origin, rgb2yuv, IS_BE(BE_LE)); \ } \ \ static void pattern ## 64 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \ @@ -102,7 +107,7 @@ static void pattern ## 64 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \ const uint16_t *src1 = (const uint16_t *) _src1, \ *src2 = (const uint16_t *) _src2; \ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \ - rgb64ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \ + rgb64ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv, IS_BE(BE_LE)); \ } \ \ static void pattern ## 64 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, \ @@ -112,7 +117,7 @@ static void pattern ## 64 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV const uint16_t *src1 = (const uint16_t *) _src1, \ *src2 = (const uint16_t *) _src2; \ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \ - rgb64ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \ + rgb64ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv, IS_BE(BE_LE)); \ } rgb64funcs(rgb, LE, AV_PIX_FMT_RGBA64LE) @@ -123,7 +128,7 @@ rgb64funcs(bgr, BE, AV_PIX_FMT_BGRA64BE) static av_always_inline void rgb48ToY_c_template(uint16_t *dst, const uint16_t *src, int width, enum AVPixelFormat origin, - int32_t *rgb2yuv) + int32_t *rgb2yuv, int is_be) { int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX]; int i; @@ -142,7 +147,7 @@ static av_always_inline void rgb48ToUV_c_template(uint16_t *dstU, const uint16_t *src2, int width, enum AVPixelFormat origin, - int32_t *rgb2yuv) + int32_t *rgb2yuv, int is_be) { int i; int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; @@ -164,7 +169,7 @@ static av_always_inline void rgb48ToUV_half_c_template(uint16_t *dstU, const uint16_t *src2, int width, enum AVPixelFormat origin, - int32_t *rgb2yuv) + int32_t *rgb2yuv, int is_be) { int i; int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX]; @@ -197,7 +202,7 @@ static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, \ { \ const uint16_t *src = (const uint16_t *)_src; \ uint16_t *dst = (uint16_t *)_dst; \ - rgb48ToY_c_template(dst, src, width, origin, rgb2yuv); \ + rgb48ToY_c_template(dst, src, width, origin, rgb2yuv, IS_BE(BE_LE));\ } \ \ static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, \ @@ -213,7 +218,7 @@ static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, \ *src2 = (const uint16_t *)_src2; \ uint16_t *dstU = (uint16_t *)_dstU, \ *dstV = (uint16_t *)_dstV; \ - rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \ + rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv, IS_BE(BE_LE)); \ } \ \ static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, \ @@ -229,7 +234,7 @@ static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, \ *src2 = (const uint16_t *)_src2; \ uint16_t *dstU = (uint16_t *)_dstU, \ *dstV = (uint16_t *)_dstV; \ - rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \ + rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv, IS_BE(BE_LE)); \ } rgb48funcs(rgb, LE, AV_PIX_FMT_RGB48LE) @@ -245,7 +250,7 @@ rgb48funcs(bgr, BE, AV_PIX_FMT_BGR48BE) : ((origin == AV_PIX_FMT_X2RGB10LE || \ origin == AV_PIX_FMT_X2BGR10LE) \ ? AV_RL32(&src[(i) * 4]) \ - : (isBE(origin) ? AV_RB16(&src[(i) * 2]) \ + : (is_be ? AV_RB16(&src[(i) * 2]) \ : AV_RL16(&src[(i) * 2])))) static av_always_inline void rgb16_32ToY_c_template(int16_t *dst, @@ -257,7 +262,7 @@ static av_always_inline void rgb16_32ToY_c_template(int16_t *dst, int maskr, int maskg, int maskb, int rsh, int gsh, int bsh, int S, - int32_t *rgb2yuv) + int32_t *rgb2yuv, int is_be) { const int ry = rgb2yuv[RY_IDX]< X-Patchwork-Id: 37753 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp42314pzh; Wed, 7 Sep 2022 20:32:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR5R8J8TaZtI/LwT7q51RFq6CEeqlzrlG0DasqZsRMqNKBYGhzi0XwgDhWEHIyFVbE85SuLK X-Received: by 2002:a17:907:762b:b0:771:5755:82b7 with SMTP id jy11-20020a170907762b00b00771575582b7mr2495853ejc.684.1662607932774; Wed, 07 Sep 2022 20:32:12 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cb4-20020a170906a44400b00741559ff58dsi998500ejb.787.2022.09.07.20.32.12; Wed, 07 Sep 2022 20:32:12 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=Q+bf3DB4; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7DBFA68B991; Thu, 8 Sep 2022 06:32:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2066.outbound.protection.outlook.com [40.92.89.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9C12B68B74D for ; Thu, 8 Sep 2022 06:32:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c+Emh/NkqvgQspPDzP2d/6CuvcDWv54OknDYmulJoIZ78oNxKWVs7gQ31jnW+ElcNXfLnKTXxwbl8Hte8+ccPS3VIBYOTx1Ew5h9Rmsm5Q1+csyALjI9hjPziBCtoK8vqo1XamyYo922BjFnddcUlXaYp5Usa8AwVgQx+dXCZg1kP0LjYrZdeeKio3h1SMioswTk9f+O9NgS+C2yTX9ZmRzc0YTVjmPE//oWJiZDcg47M9d6HviFc/IFD8dQBUNs7up8uezOvNtnLkwI1CCWbuVijPzND3epztbKxxnT5iva5CuhVV/MA06OezpuCZcQdQun9XdhHglK+gKa0M3Kcw== 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=8dhgewNX8pUlRjjxEW/1xedDY/qiUj409npBRIvMT/4=; b=G/KNxHbnf9cFtQYuQpdr1O2hJhI/hsy5Q5Kaf22a9D5/pas83edOED7FfO1bgVBqHIUJLnBA2Um+Vuve+H9e9Q0jPUHPBEvNTC8WkDVIf747RzktHdsjUMyiAdy4+fNNk2KskoP2l8PgGl19J91gUfaDmo044Lr562WY+KEbqmYf/C94R90DzI61mlzOANiTw2qsi7HPHphYn69EIkauz3YJRWK4XARqimBqs6EIPW6qx/zuQJTHI8p8GSZkOLWcbGnXeNFg+HKbz7B4uoJlB1W1BgGiz89Wm3osaBCNYlqD2GOm6MaXKXbLiUbXgmWYng9JmCE3+wQiVcd6SZ6ZFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8dhgewNX8pUlRjjxEW/1xedDY/qiUj409npBRIvMT/4=; b=Q+bf3DB4BxoRxxQv//Opm/HZOxowqHmKFfk7UMhEBTJQaGbJ06X9f7SyjBuuDf+50UOAkz6uDt7iIUCZZdUbmuaPlcCDkRrBPlcMJURY404DmsqT2MFCfvUM/PLEVaL4VoFxD2hfO2vjlHaCK2E7sMaKQ92nc32JGDy57VX2lO7AHkaGASVCNmuyRl+RbILIhZAiEUt8T2ab6ON2m0tRT3L4v+Bwdr4wnT9ImrrkJOxWNq8kM6hWJTue+IOjNVacYrHhdy0MsH5+OVSW2qCswEKVGwipp/rUijx4H0r5YojBF6Cc0T4DAlfqNnX3yDjV0HHsjzc1QZCZWN6R/eZyRA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV2P250MB0755.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:7f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.15; Thu, 8 Sep 2022 03:31:59 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::c3af:c609:301f:beab%8]) with mapi id 15.20.5588.018; Thu, 8 Sep 2022 03:31:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Sep 2022 05:31:49 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Wf1BILBZuKvORqp6T5/oyLLyUrfWwIqREzNU/QXrAyc=] X-ClientProxiedBy: ZR0P278CA0026.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::13) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220908033149.2505176-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fe91e62-8763-4db3-f06e-08da914aafe1 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmp16suNY6DpRD31ZauPJnPpaqxef3ywspjSx3XylKcvs6LR9LBJ4JOiqhzv9w20lsWg3l3BhqWfQhUzPk9PRYTPc+QgJQ4zaX55dLLilXEs0k0p7RBFwviihRJ80muECtronnDhM2XqcyAtQrxlSf03balSTOQsRira3EcLBSqplnIeWnUlbpdhvBrE5/XtQVRXW2UF10OaNJD+8jDelUkXJEb2sPEnTGUruBrNsIYR9KTICmgmYsPRP0EGFt4K+2uwnCE+XkabcF37gkD9vJbas8iAacaJY5lalC55I86nZvNDlFcOT7RUzFsSrk+tNyIinKh135xST08uaNkj6DbM2wy5zyEig8ouPRkZ1dNYOKxCD+LT4cwrLbsLCY8ogZZ7WSSLshsh2Zmi+hXcxwGq5FDkjIyZoNJc5xq4SMXcyW5PhfIBKOc6UZQGPH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MW8tbF+035dkuvv6TA6LgyPfi8oTfhLYt9nsGVLke+dG5bFub14rXYkkmwqstPyPEPRUqVdk1RWLxXrYQj+Xad8ZyglhZCayGQPc+LEp2DXEiAw/+4kWkW436+TDHBhvtINKEwF6fBcLl7vZfxYTjIKrQtciemVLGWTJHcGhvDvaQRKAkOGJ0XiCKkSEeaCOfMpOTP+U6xYfEcr4MNTGA32W3qc07jjbw/BJALG1HUzsbz0IyDSXQNGH70Lezl9hYBx2TqVrZ5911fJx2NVquiTFKFjbBYfmigEDvt5tEDD X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fe91e62-8763-4db3-f06e-08da914aafe1 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 03:31:59.3273 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2P250MB0755 Subject: [FFmpeg-devel] [PATCH 3/3] swscale/output: Don't call av_pix_fmt_desc_get() in a loop X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: C8WFR6yDpy/I Up until now, libswscale/output.c used a macro to write an output pixel which involved a call to av_pix_fmt_desc_get() to find out whether the input pixel format is BE or LE despite this being known at compile-time (there are templates per pixfmt). Even worse, these calls are made in a loop, so that e.g. there are eight calls to av_pix_fmt_desc_get() for every pixel processed in yuv2rgba64_X_c_template() for 64bit RGB formats. This commit modifies these macros to ensure that isBE() is evaluated at compile-time. This saved 41184B of .text for me (GCC 11.2, -O3). Signed-off-by: Andreas Rheinhardt --- This must be the lowest-hanging fruit in the whole codebase. Two other question: Why do all these functions in swscale_internal.h take an enum AVPixelFormat instead of accepting an AVPixFmtDescriptor? And would making av_pix_fmt_desc_get() av_const be beneficial? libswscale/output.c | 101 +++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 43 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 40a4476c6d..590334eb57 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -919,7 +919,7 @@ YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, AV_PIX_FMT_UYVY422) #define R_B ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE || target == AV_PIX_FMT_RGBA64LE || target == AV_PIX_FMT_RGBA64BE) ? R : B) #define B_R ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE || target == AV_PIX_FMT_RGBA64LE || target == AV_PIX_FMT_RGBA64BE) ? B : R) #define output_pixel(pos, val) \ - if (isBE(target)) { \ + if (is_be) { \ AV_WB16(pos, val); \ } else { \ AV_WL16(pos, val); \ @@ -931,7 +931,8 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter, const int16_t *chrFilter, const int32_t **unused_chrUSrc, const int32_t **unused_chrVSrc, int unused_chrFilterSize, const int32_t **alpSrc, uint16_t *dest, int dstW, - int y, enum AVPixelFormat target, int unused_hasAlpha, int unused_eightbytes) + int y, enum AVPixelFormat target, + int unused_hasAlpha, int unused_eightbytes, int is_be) { int hasAlpha = !!alpSrc; int i; @@ -968,7 +969,8 @@ yuv2ya16_2_c_template(SwsContext *c, const int32_t *buf[2], const int32_t *unused_ubuf[2], const int32_t *unused_vbuf[2], const int32_t *abuf[2], uint16_t *dest, int dstW, int yalpha, int unused_uvalpha, int y, - enum AVPixelFormat target, int unused_hasAlpha, int unused_eightbytes) + enum AVPixelFormat target, int unused_hasAlpha, + int unused_eightbytes, int is_be) { int hasAlpha = abuf && abuf[0] && abuf[1]; const int32_t *buf0 = buf[0], *buf1 = buf[1], @@ -999,7 +1001,8 @@ static av_always_inline void yuv2ya16_1_c_template(SwsContext *c, const int32_t *buf0, const int32_t *unused_ubuf[2], const int32_t *unused_vbuf[2], const int32_t *abuf0, uint16_t *dest, int dstW, - int unused_uvalpha, int y, enum AVPixelFormat target, int unused_hasAlpha, int unused_eightbytes) + int unused_uvalpha, int y, enum AVPixelFormat target, + int unused_hasAlpha, int unused_eightbytes, int is_be) { int hasAlpha = !!abuf0; int i; @@ -1027,7 +1030,8 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter, const int16_t *chrFilter, const int32_t **chrUSrc, const int32_t **chrVSrc, int chrFilterSize, const int32_t **alpSrc, uint16_t *dest, int dstW, - int y, enum AVPixelFormat target, int hasAlpha, int eightbytes) + int y, enum AVPixelFormat target, int hasAlpha, int eightbytes, + int is_be) { int i; int A1 = 0xffff<<14, A2 = 0xffff<<14; @@ -1108,7 +1112,8 @@ yuv2rgba64_2_c_template(SwsContext *c, const int32_t *buf[2], const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf[2], uint16_t *dest, int dstW, int yalpha, int uvalpha, int y, - enum AVPixelFormat target, int hasAlpha, int eightbytes) + enum AVPixelFormat target, int hasAlpha, int eightbytes, + int is_be) { const int32_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], @@ -1172,7 +1177,8 @@ static av_always_inline void yuv2rgba64_1_c_template(SwsContext *c, const int32_t *buf0, const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf0, uint16_t *dest, int dstW, - int uvalpha, int y, enum AVPixelFormat target, int hasAlpha, int eightbytes) + int uvalpha, int y, enum AVPixelFormat target, + int hasAlpha, int eightbytes, int is_be) { const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; int i; @@ -1277,7 +1283,8 @@ yuv2rgba64_full_X_c_template(SwsContext *c, const int16_t *lumFilter, const int16_t *chrFilter, const int32_t **chrUSrc, const int32_t **chrVSrc, int chrFilterSize, const int32_t **alpSrc, uint16_t *dest, int dstW, - int y, enum AVPixelFormat target, int hasAlpha, int eightbytes) + int y, enum AVPixelFormat target, int hasAlpha, + int eightbytes, int is_be) { int i; int A = 0xffff<<14; @@ -1340,7 +1347,8 @@ yuv2rgba64_full_2_c_template(SwsContext *c, const int32_t *buf[2], const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf[2], uint16_t *dest, int dstW, int yalpha, int uvalpha, int y, - enum AVPixelFormat target, int hasAlpha, int eightbytes) + enum AVPixelFormat target, int hasAlpha, int eightbytes, + int is_be) { const int32_t *buf0 = buf[0], *buf1 = buf[1], *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], @@ -1391,7 +1399,8 @@ static av_always_inline void yuv2rgba64_full_1_c_template(SwsContext *c, const int32_t *buf0, const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf0, uint16_t *dest, int dstW, - int uvalpha, int y, enum AVPixelFormat target, int hasAlpha, int eightbytes) + int uvalpha, int y, enum AVPixelFormat target, + int hasAlpha, int eightbytes, int is_be) { const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; int i; @@ -1468,7 +1477,11 @@ yuv2rgba64_full_1_c_template(SwsContext *c, const int32_t *buf0, #undef r_b #undef b_r -#define YUV2PACKED16WRAPPER(name, base, ext, fmt, hasAlpha, eightbytes) \ +#define IS_BE_LE 0 +#define IS_BE_BE 1 +#define IS_BE(BE_LE) IS_BE_ ## BE_LE + +#define YUV2PACKED16WRAPPER_0(name, base, ext, fmt, is_be, hasAlpha, eightbytes) \ static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ const int16_t **_lumSrc, int lumFilterSize, \ const int16_t *chrFilter, const int16_t **_chrUSrc, \ @@ -1483,7 +1496,7 @@ static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ uint16_t *dest = (uint16_t *) _dest; \ name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \ chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ - alpSrc, dest, dstW, y, fmt, hasAlpha, eightbytes); \ + alpSrc, dest, dstW, y, fmt, hasAlpha, eightbytes, is_be); \ } \ \ static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \ @@ -1497,7 +1510,7 @@ static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \ **abuf = (const int32_t **) _abuf; \ uint16_t *dest = (uint16_t *) _dest; \ name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \ - dest, dstW, yalpha, uvalpha, y, fmt, hasAlpha, eightbytes); \ + dest, dstW, yalpha, uvalpha, y, fmt, hasAlpha, eightbytes, is_be); \ } \ \ static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ @@ -1511,36 +1524,38 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ *abuf0 = (const int32_t *) _abuf0; \ uint16_t *dest = (uint16_t *) _dest; \ name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \ - dstW, uvalpha, y, fmt, hasAlpha, eightbytes); \ -} - -YUV2PACKED16WRAPPER(yuv2, rgba64, rgb48be, AV_PIX_FMT_RGB48BE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64, rgb48le, AV_PIX_FMT_RGB48LE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgr48be, AV_PIX_FMT_BGR48BE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgr48le, AV_PIX_FMT_BGR48LE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64be, AV_PIX_FMT_RGBA64BE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64le, AV_PIX_FMT_RGBA64LE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64be, AV_PIX_FMT_RGBA64BE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64le, AV_PIX_FMT_RGBA64LE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgra64be, AV_PIX_FMT_BGRA64BE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgra64le, AV_PIX_FMT_BGRA64LE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgrx64be, AV_PIX_FMT_BGRA64BE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64, bgrx64le, AV_PIX_FMT_BGRA64LE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, ya16, ya16be, AV_PIX_FMT_YA16BE, 1, 0) -YUV2PACKED16WRAPPER(yuv2, ya16, ya16le, AV_PIX_FMT_YA16LE, 1, 0) - -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgb48be_full, AV_PIX_FMT_RGB48BE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgb48le_full, AV_PIX_FMT_RGB48LE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgr48be_full, AV_PIX_FMT_BGR48BE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgr48le_full, AV_PIX_FMT_BGR48LE, 0, 0) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgba64be_full, AV_PIX_FMT_RGBA64BE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgba64le_full, AV_PIX_FMT_RGBA64LE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgbx64be_full, AV_PIX_FMT_RGBA64BE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgbx64le_full, AV_PIX_FMT_RGBA64LE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgra64be_full, AV_PIX_FMT_BGRA64BE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgra64le_full, AV_PIX_FMT_BGRA64LE, 1, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgrx64be_full, AV_PIX_FMT_BGRA64BE, 0, 1) -YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgrx64le_full, AV_PIX_FMT_BGRA64LE, 0, 1) + dstW, uvalpha, y, fmt, hasAlpha, eightbytes, is_be); \ +} +#define YUV2PACKED16WRAPPER(name, base, ext, fmt, endianness, hasAlpha, eightbytes) \ + YUV2PACKED16WRAPPER_0(name, base, ext, fmt ## endianness, IS_BE(endianness), hasAlpha, eightbytes) + +YUV2PACKED16WRAPPER(yuv2, rgba64, rgb48be, AV_PIX_FMT_RGB48, BE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64, rgb48le, AV_PIX_FMT_RGB48, LE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgr48be, AV_PIX_FMT_BGR48, BE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgr48le, AV_PIX_FMT_BGR48, LE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64be, AV_PIX_FMT_RGBA64, BE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64le, AV_PIX_FMT_RGBA64, LE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64be, AV_PIX_FMT_RGBA64, BE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64le, AV_PIX_FMT_RGBA64, LE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgra64be, AV_PIX_FMT_BGRA64, BE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgra64le, AV_PIX_FMT_BGRA64, LE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgrx64be, AV_PIX_FMT_BGRA64, BE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64, bgrx64le, AV_PIX_FMT_BGRA64, LE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, ya16, ya16be, AV_PIX_FMT_YA16, BE, 1, 0) +YUV2PACKED16WRAPPER(yuv2, ya16, ya16le, AV_PIX_FMT_YA16, LE, 1, 0) + +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgb48be_full, AV_PIX_FMT_RGB48, BE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgb48le_full, AV_PIX_FMT_RGB48, LE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgr48be_full, AV_PIX_FMT_BGR48, BE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgr48le_full, AV_PIX_FMT_BGR48, LE, 0, 0) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgba64be_full, AV_PIX_FMT_RGBA64, BE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgba64le_full, AV_PIX_FMT_RGBA64, LE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgbx64be_full, AV_PIX_FMT_RGBA64, BE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, rgbx64le_full, AV_PIX_FMT_RGBA64, LE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgra64be_full, AV_PIX_FMT_BGRA64, BE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgra64le_full, AV_PIX_FMT_BGRA64, LE, 1, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgrx64be_full, AV_PIX_FMT_BGRA64, BE, 0, 1) +YUV2PACKED16WRAPPER(yuv2, rgba64_full, bgrx64le_full, AV_PIX_FMT_BGRA64, LE, 0, 1) /* * Write out 2 RGB pixels in the target pixel format. This function takes a