From patchwork Thu Jun 9 23:55:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 36126 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp655543pzj; Thu, 9 Jun 2022 17:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4nykvfPXTaZiaV6MwM3r4iJ6hmRCICsCttmyzc+3EKoVjE5XiKr1PY0swBxcsW/uIFg5K X-Received: by 2002:a17:906:84b:b0:70c:d506:7817 with SMTP id f11-20020a170906084b00b0070cd5067817mr35422648ejd.206.1654819227149; Thu, 09 Jun 2022 17:00:27 -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 qk44-20020a1709077fac00b006e8baf14cc8si24837518ejc.927.2022.06.09.17.00.26; Thu, 09 Jun 2022 17:00:27 -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=kPvWhSVD; 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 6022268B8F9; Fri, 10 Jun 2022 02:57:09 +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-oln040092073108.outbound.protection.outlook.com [40.92.73.108]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00B4368B86F for ; Fri, 10 Jun 2022 02:57:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UEXUNp2T14hBvjSr7GwQvTklKwM7qlVdkCx5aV2Fxbuei0Zjxu8Pw+5IEc4ee9r2Dd3phrcbP88JK3bFNdWirl9CLcJoT/+/JhsDM3xwFAh5TaEHVqW8A+rKTCLnWRes+9lPM1UzthOGp9cpbrENn0kOVji4fJzQCibW8TMsvjNjkKjG+Pl4gJpuNpIEfiLfewkbrS0qj7kgwPVrKaLzGWsdiHT4t+psbxQA28W8kHYCLIpbgLynfOI6Eh3ELuwtG23kM89a0sITNdk5PkMSgxiCaai1egpyRnFy92qIG4mZASvjb9xZEJ++Rul4LfCpfofH/qTMqnhedWdwTUsaVw== 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=8Q/kQuAY4LLL0yjPc4M6jZC4DDJ1kp5JuPYtGQepfr0=; b=drjI5hx5ZJWAQNJoYVTo7y0EA2448CYELlT4fAvLLQMENo2KkJAQzppmkQiAqJj+w3A1BZfEFqLhiJzRtBjedoMmvc5vBbgbSovfv//c/1DXEYAvK7fqg1JuOTUFxPB6vlSfkRKxGcou+/TvzcVyg2uFd9NYURHpcQgJLg7hqd/oyzXDs7Un/M0Hrra5vKRO+JPuh+phO0tsQ7NV13gnskB/W8UtGv9PW+8RuTTlOOzqcwaeYCfirxxx220lA0CLxhOrkHZnNTndjSrOifkJzmLCrHuGI1ll6wc6GVHq1lFRkZuHeB334eDSpWWMMcCbUCPXU/ayJ068027FgAVfvA== 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=8Q/kQuAY4LLL0yjPc4M6jZC4DDJ1kp5JuPYtGQepfr0=; b=kPvWhSVDMKpce6GhccwPEm6x1QjHoynBNTHlAl7Hw7NQDVOgYL11tp50VTL3e/Oo+VhmqRdela7cKc9RGbG/px0FtV2gNX4HpfY7/LxLzQwVTTAejBawFSePf3O/yGqgpbEksT0G079oppwA2p83gMpwD1QJBkW5IhMhGPkRf0ZP0aTTolqV4NMF5HTcyuyBfG/28IxLatJmAeISX0TFzUvRM961CqVRR3unQ/eTMGutuWHsIofNxAC9mrViIYTGZhGOxaWA7UuyjoJKaqF/W2xkOWODCYBidcgYV57YSr8RG90Df7TbUu6VEqdb8GpNlL9JlVITYXYuuulDfC0U7Q== 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:01 +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:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 10 Jun 2022 01:55:10 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [vu4b9CWpFYnKb6RQK05YHOSqmSCrtpxi] 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-28-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 670aa999-b180-48af-d3d9-08da4a73bf16 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTijo6adWu98SHbtEySq1lKry91Qzc+7yrqqC4Hgj5YvOeZ1w4qHksJ4pVb7E9znD8Ya5oVPlZyYo70WR538sjT9QERSMSUpC2h3DN7j8ypJPOgETryUbNzTpd0jhJ/NVz2QIYhuwYWUKGlWMM8lE9QDw4IJyleRJOVSjt428siGaleyIBH6n1VDoX1FgpO2dmPnR6pJPrESv+QItEdEh/T0skXU41xeXZrttxqdW5ei7v0QBK8YkfeesWK2j+Hd/cYW3DNlUg7wULzdcr8VAmx5WbjjnyvcHB7l9CVeT74S9KlA1fl9oYC5SZ2BTkN/+tEdhpb6nr0Gg3o/MLTbf4x/KPmomPqoWki1UW/WFZtby94qIJqwAJE0OnWD1WLalV0DqZxQj/m/Y2gE4ix7PcemuONYVRY2e9TA9+J1JiTHwgQTxOyzgk5tCiu8VZHaStBS65DWIt05cJRQnlBFRdf2mYHi3ahSntmycjTS4ZQsgSiLBSuV8t/OR7bzNE4cQA2RrhHgCiyZ2v9SHLIHXEQ2o/p3nu0A9iCBu9Hcb0scOLb2vSEqZICKO81Zsk4Oh8WYHrxHXYzRrRDsRfcsBJ8hqumsiBTWWRjqkE2D8hSlvhqm3ZMPvx13eQpoeenK5rO8Nj9isdZ4Plv7reyDUGecz3Hvnl1lm/Ppl5ChbNCRU1gf8GVJNs1rkCHW94SUpPYBtMibtD3wW784l0Vb2RSE1bp5Fgv/bZ1AzRUJ+fGsAOKKU1kcUy2MAvy6anpwpY= X-MS-TrafficTypeDiagnostic: DB6PR01MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RHbZ+ai0kMBkndJOR6Pu3JjFvK1bLurDl7nojlzBj6cW0I1Fz6Jy9CNzcWQ4vnM0kC92pGFyV/CItJ2Pa+jybLHY/F797K9afPG952HYSedC1AnenGj2mC66dkREu7QUnBQ9pvEOyXvtjMQldszgLAi3CeH3gdPXOJ3EMiUjLIHLrgUtHG83gY0b14IRByI34amim4PdbD++7baMOl04gF7msrR+s6+QxgVBuzsaWALhufvPJ8Qfe1RxCKKTTkES0kFCODcPJy3zugk3hT9xBNgCP+k3foshnCC8qmYCvTY5eWJ+QyJYWUIKz3dknEEeCcRYeOP6s4GWmGRBvemlfN+lSclKWrDZOzFc+nRgpKb+KNkbdzW1jNDLbwGkzsxqsxGl1bYOqB1VwbuGfN64Uy9SDM6iLVHNpIm9AQWaryc1ZALjaCBMiynWYWK9j9+klmoPMdiXl/FU6w0WbIvl+2r5pDLfPd1SwOzgLB2o0BioosTH95OC+fE9ou0jhjEQOcNPvYxjharszgDZBCux+k5NNU7RQCM9SDstgqd63Koep61SA6B/9jRUFwdQ5yRdjsICSI89PRdiHiE8yv4qPg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vvHWEjMP11O3J97JCdgFaLTdFchRO8d12PgenUpQhywV9BpIwaygvT0ZYgURbT/wKgMVOQsEolIdibrKhVvZe8UCmYZKhqLNEZKSLfhY+ONfecMXqM3jqfQmHH+CHF0denzQfqmshbCpr82GGftTInuI4epn7KvxZygCPg9Nxp+7E0tw0zWzvhhhkys+7uJhw2hmD0M1ZwgLVVkQt1tal5WSwcjE/AWJsbNXcn1WqGO3TOQx4hv4E56dsuMngStHoVehRxvEEgsjhYIEiaXGFKdvNujsweTqeN4FJcs53ec9fAO1QtMHzqNvx9RUSddHgFKPjlJeGucdknCP56+ZH8qeRfTQvvwDXlGYwFlTCOWsunsiAKZ28lJ2+J5QnOPF7lsyAWh2/J1McBIPjNufmNe4V9ILF56uFAdOcO4ghNkycyc/EhM6p3IMPoNtGaCT2Ok4HC6YuCcvnRzHOKR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a73bf16 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:01.6172 (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 28/41] avcodec/x86/svq1enc_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: ZIP16rRKggem 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 --- libavcodec/x86/svq1enc.asm | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libavcodec/x86/svq1enc.asm b/libavcodec/x86/svq1enc.asm index a87632836d..a43d3b4029 100644 --- a/libavcodec/x86/svq1enc.asm +++ b/libavcodec/x86/svq1enc.asm @@ -55,7 +55,9 @@ cglobal ssd_int8_vs_int16, 3, 3, 3, pix1, pix2, size RET %endmacro +%if ARCH_X86_32 INIT_MMX mmx SSD_INT8_VS_INT16 +%endif INIT_XMM sse2 SSD_INT8_VS_INT16 diff --git a/libavcodec/x86/svq1enc_init.c b/libavcodec/x86/svq1enc_init.c index 40b4b0e183..aaebbb92cc 100644 --- a/libavcodec/x86/svq1enc_init.c +++ b/libavcodec/x86/svq1enc_init.c @@ -33,9 +33,11 @@ av_cold void ff_svq1enc_init_x86(SVQ1EncContext *c) { int cpu_flags = av_get_cpu_flags(); +#if ARCH_X86_32 if (EXTERNAL_MMX(cpu_flags)) { c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_mmx; } +#endif if (EXTERNAL_SSE2(cpu_flags)) { c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_sse2; }