From patchwork Thu Jun 9 23:55:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 36134 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp656246pzj; Thu, 9 Jun 2022 17:02:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE47E/W14hoVRMRuaQdCnoZAJ6NNYNe+HDElHOWfrFHvgs7GACd4nqo1F5GyqokfuBpgAZ X-Received: by 2002:a17:906:58d2:b0:6fd:daa7:3a6e with SMTP id e18-20020a17090658d200b006fddaa73a6emr38103692ejs.0.1654819324613; Thu, 09 Jun 2022 17:02:04 -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 s1-20020a17090699c100b0070b60b92455si6758896ejn.240.2022.06.09.17.02.03; Thu, 09 Jun 2022 17:02:04 -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=QpPyTdJ7; 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 2293568B92F; Fri, 10 Jun 2022 02:57:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073052.outbound.protection.outlook.com [40.92.73.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 869AE68B937 for ; Fri, 10 Jun 2022 02:57:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLRfLZvfRHs02seBnKok0qs5yjTEXEx/jKN5vV5GSABTUbpkPkb2axoillbEXdF5sr5ZxiMSuVdaICKt7NuepneUDIkJc9R27xjJiqF4U1IOrQH+Ssxro7yekGWVTxcZYqYtLbOTaKNzuuWQIGBPqAGx4bmLKGx4dG7vjooXCZ3WmxmZL4K2v6ZTKibXcSNDomjlvLX/tUkV9nc9WE7HZsU9BXIcolX2Z6yksNwkziBfqk5MBdZEul50uOkZhuqkdelBANKure7POwYOWpN8qpQlLveJp0n3hV6aZi1vWsahcoOpfV5eIrZSBQcX1X2xlmP1+avxqeVrwSRpkE2OlA== 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=xHVEnHzjzqMUacivAbnh39H58n/KLfJsRKRtqTLIRDs=; b=e4B35iKLxx6ygSI/cwjLkzNxxtpBbt83Pr1WCdBQ15+JQJIpTVRseFKH5CjBOMdMTXIaBN/obKbvS/IDuh13ZV3Gyc22ybIlm8MUOdlAW7oieujQOn5lFkWhMgCsFli1dkrK2W6IVJv7a+QUbDOlo0VFEmYmO8Mk3KpVwIKEJYyGdGvDDWE9Ba2YprbrmFQF/F+LW+s6wJt0C3oukZDogPhDeEn65cvl3Gc/DJ4NqkdM4gTyhlVcImFXzaT8bAp1VCWoaJHmI97fT3MbZqUTB1vMBL3rgLmIDi/QTLhomrN/dMhfILyfB8qmcCasoGrgpAv6FXWLU0xU6CzL7fTO1Q== 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=xHVEnHzjzqMUacivAbnh39H58n/KLfJsRKRtqTLIRDs=; b=QpPyTdJ7EHlOZg75L7naAGwWsYkdLzaJ8+GjEsVaQYXol8tABBZhYrx0APWDnGRqk7FxftPdnnYjEbll84fLjT+iFRlEpeHvp4TlT/6EvDOnHimRegPnBgpVPV1ovu+9tQQXlW5cKvnNfSub+xC6W2JmlNghL099dCPg9ajAYwCMYYxNw12MNU1pWbRegX1WsGFtW3MZYQnKzRbkANPcNxnKraSJSrlyBRwrNpihuSC9iiiktxkBRG5I1igAKKfPQwylEje01P6KpneHdySKlrDqDJdCEuGN0fb1qvwMmbpd/p8GBUZ/2uXTwJVCTZy74Z5EY4uL2emY5wodAVXLlw== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by DB6PR01MB3862.eurprd01.prod.exchangelabs.com (2603:10a6:6:48::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.15; Thu, 9 Jun 2022 23:57:31 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%10]) with mapi id 15.20.5332.013; Thu, 9 Jun 2022 23:57:31 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 10 Jun 2022 01:55:18 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [GkPxjhOVBhMt1LbXRHNlZDYJWby1vEr0] X-ClientProxiedBy: AM5PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:206:1::18) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220609235523.458689-36-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb955a58-97e6-4bd1-7223-08da4a73d0e5 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTijo6adWu98SHbtEySq1lKLkAYCmHAduU3v4IIh4OQCKCyJ2tdAL8wnJAwzLYzxgoweCt7+kBiJtfrzycGSj/zf56SgcrBpq0DuqH731u6vOcGoT3W6fxyfYnktiLx9Y/Uw11AtejranVI4Ll6VfDK0r+a1uEBCEme3HWn8f85TLHAmjxFGOLD86Tv9jzHVRyJOEOT2/3pgkVjAqdWwO/qFKPS4WyskkXUBetKniDi1Ysk7+EoGa232+eVbgCMAMg8BnFJZbwIHA7lpYI/VUc2vc4Cvue7gP2dcW9lPpOMToxnazo9hbiJrPIEOINxTq7r70ujsQEKmmac0pwsBaI7Aa/5VVgVziTTyZCfEjIoyudX5TNKbF/37mhdGNiJJAmda9AIJrLnnekt0RGPHCEZhm25FjEv7hpUWQ9cGCArnfpGr8vYK7ybJO7pZhPU7XZ0hD68gO3WC9tx1KfRcwu+XdY9CXwjFamEzGH19BLaM1F+NCzstJxRyxG84oHHk9sODp2kUzl5z9q7PBtNsuBiSZz6RidHEKLOddzV4mhWgOQxYKyfZgU3j4veXnzVWUAFyCZta6DLujIuUlXAnwt8h73dU4sp3ZwqNHnjQc81nJ1kA//SpAgkBGGTFF1EEjZQ9PR2Vy4CTrjSXeMVjkVE24Eu4Ut67oRYs32rWnTj5/NgBn/iRlTp0IsyJrCPXUpMODy5vHEiJCTxQCVLpI9QQUAxRDbA+B9fG8dQR8mmpxAI8uCOk28O+qRYNidg39M= X-MS-TrafficTypeDiagnostic: DB6PR01MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fA1u3BiWc4qeRP5RR29o8IIFDYxe0EoX4JGm1n7Sk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4bd1-7223-08da4a73d0e5 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2022 23:57:31.5082 (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: DB6PR01MB3862 Subject: [FFmpeg-devel] [PATCH 36/41] swresample/x86/rematrix_init: Disable overridden functions on x64 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: bMWuy6F04IwT x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT, SSE and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2). This commit therefore disables the MMX implementation (which is overridden by the SSE2 specific implementation) at compile-time for x64. Signed-off-by: Andreas Rheinhardt --- libswresample/x86/rematrix.asm | 2 ++ libswresample/x86/rematrix_init.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libswresample/x86/rematrix.asm b/libswresample/x86/rematrix.asm index 7984b9a729..1c657ff72f 100644 --- a/libswresample/x86/rematrix.asm +++ b/libswresample/x86/rematrix.asm @@ -223,11 +223,13 @@ mix_2_1_int16_u_int %+ SUFFIX: %endmacro +%if ARCH_X86_32 INIT_MMX mmx MIX1_INT16 u MIX1_INT16 a MIX2_INT16 u MIX2_INT16 a +%endif INIT_XMM sse MIX2_FLT u diff --git a/libswresample/x86/rematrix_init.c b/libswresample/x86/rematrix_init.c index 0608c74e7f..3981de4277 100644 --- a/libswresample/x86/rematrix_init.c +++ b/libswresample/x86/rematrix_init.c @@ -43,10 +43,12 @@ av_cold int swri_rematrix_init_x86(struct SwrContext *s){ s->mix_2_1_simd = NULL; if (s->midbuf.fmt == AV_SAMPLE_FMT_S16P){ +#if ARCH_X86_32 if(EXTERNAL_MMX(mm_flags)) { s->mix_1_1_simd = ff_mix_1_1_a_int16_mmx; s->mix_2_1_simd = ff_mix_2_1_a_int16_mmx; } +#endif if(EXTERNAL_SSE2(mm_flags)) { s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2; s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;