From patchwork Thu Jun 9 23:55:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 36128 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp655727pzj; Thu, 9 Jun 2022 17:00:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzheIwBth1Ak/4w1N9ywmh4/9sO/Qf5rpSLFljaaxzbt6W0cgPhkCpq7cPMv8crkP9GSIPA X-Received: by 2002:a05:6402:139a:b0:431:6b50:11a2 with SMTP id b26-20020a056402139a00b004316b5011a2mr25381537edv.72.1654819251041; Thu, 09 Jun 2022 17:00:51 -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 n6-20020aa7d046000000b0042b4ee1bb64si24494713edo.542.2022.06.09.17.00.50; Thu, 09 Jun 2022 17:00:51 -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=Spfsc5xJ; 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 504FB68B90D; Fri, 10 Jun 2022 02:57:11 +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-oln040092073010.outbound.protection.outlook.com [40.92.73.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C00BA68B8E7 for ; Fri, 10 Jun 2022 02:57:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ylq1X4cynu6nRFhLrdaJllWECRlFK0aEXbPZdVzzA0vqIM8r27HjhOzoepnudKZXSUJA96yRnnxWcx481Z/T4kMC21zvyIxtMz3WvOj7Ys57l3D3WpuTRw0B0S/O+YN8341k+Vu5YD2IgYGP9wORWxDHUhcr5YXsNVuXcNluFGCcQ86RM+9xuRqXvJGkwMzwXtbMT9cprWZg7914S6zgR9XFDgqZy4wTtEdu3RnP3Gfjk6xTy6kL43N7gR0MesNvFHC1VO5t9KYGUEYIqh/yQXpSkj6T5ots+UUE0jA+DTy+EuquheyqzPUSFYp93RShyP66nW0ySNctvYb2BkfwyA== 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=HPW9oyXyefPHDnD6R6zQ7b6fhySKoXxfIL47Kqzby+k=; b=dcElteUP2sA/wgacPGmo9UpdggMe+NgObD5uFqpEUY63lvI4Kaz1vUIGZXDbx51GVhXuTanglT2RhDJTgdxIVsrcr9mvnyCikmccAaSPRw9GR0nzBy/+VzgGh7AT+JgWUg2LWzSXk2gfLRikog1s4CChzswxJ0ls4WPRkOnTSEcw14+nA3mrJB12g1Ek9J+ThTJr7y/jiBhygx8rzuZhZ8bncCx8DB2RlJ/0mXid1jcd2mEu3sWfblKOvl6KthaC/oFxt0Wabzt4W4bC0E2vhcliCHKgDAGuuKfQ8iizIQm7r0m09PJO+XZaa7go6M+4AvD2rwrLl8JMZ23ZpG1XlA== 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=HPW9oyXyefPHDnD6R6zQ7b6fhySKoXxfIL47Kqzby+k=; b=Spfsc5xJcJgYQKEoZwut/FL2jYS0lt0ankrIfBbs6FrRA5034MjsmV6KNHRIjz+UDkpIU5lbLJSa9fVkPXkH77MOkrLi8Lk7hPxFP15ERjim92ZRBQxc/DPR9FduGcDHp/u+yEk6ly85Unc0TTGIcbKNmPOy3v4tubx1OAc0rq01oMiLase2jNXBJ9QYQI706et/JgmZksdlt8V5hLqKSiYqSXfTKCu5PyivZBtchkigUho+oTAl34zJHwZDopDE5EnLaatZDaejmmnDOxoXMG5cPklraMzaBKIZl4GXjsidLDqvvJniK31GSrDbOYxWbAlDYvDCLx6ldGZ1wwOWRQ== 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:07 +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:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 10 Jun 2022 01:55:12 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [sBwF9U4uyzJeGqiUXm3KWBfWyQboO337] 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-30-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcd0dfb1-7bb6-404d-d2eb-08da4a73c2bf X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTijo6adWu98SHbtEySq1lK/K0mVwNAsvs8WUtpenCE7biljDV2vL5bsIqsgRx5KLjjXNx1Dfb9SfWXXihSfIIVk21xMk8Z/u5EZzFPSz7ncGd38VwPXZduFvDTLrMJ3lwJHYT7cDiDoPHF1Q6Yulp0eXarW5NHroMva4QmbTCX3DVcxJPIDn9QyWCGW/zFbr8iSSjEGuf4xuUhYHoTx5tzYcO0imIpnGAJDKZTii/T8cMJmhfs0cvH4EyGT9FeVvaTLmjX3XmueAXyk0ovCETJau8aiBPuETR+YGEohdDlM8OA1R3s4r+HP7vC3n8fLNgMo6LCGYlj49UkKLBXszl9z+W4R/5s0jQw0YRVUZNuJ4i22MWGwEos2TYOESNsS4llqRWdwQvbk5xe0Nst1OOEZDPAn4AZiwkaJ1N95j8jsP806Kr53VAkDCcuiHa12jBm7Qcf8eiTLsiYy/q0Bk8as5+bbYp0wdI2qdHoFXq16AhEsqVL+X56K3hAcKl97g/ZCHuA+tZQGwR64LC7oPNz4cuRh2AwVhCzChKHMrE9NJ7tvPDK5TwTHUFaEPWl9w5R1Sl0fXGMizKRKUQI+wdw0zuloMlasvrL4OrzBVWqPc6lmXKp4YvMV2lPaYVg1qMGDsovU6DaStd7DQrsz23HbDHo4bGrTUXYT0lwFsUSQ9rHYimwLxENCMZW1T/pLEJRSzAE3NnSbfo+ntLIfujMT5F9e/RCRpE4HYjsZvlr07iKQOh/93+Bki+axl1JC+g= X-MS-TrafficTypeDiagnostic: DB6PR01MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zd+mNhsrCj8jzpByKVOFoU01PhGPMg+WukBPLfP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-Message-Id: bcd0dfb1-7bb6-404d-d2eb-08da4a73c2bf 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:07.7736 (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 30/41] avcodec/x86/hpeldsp_vp3_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: /Nx2SoIpEMFl 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 3dnow implementation (which is overridden by the MMXEXT specific implementation) at compile-time for x64. Signed-off-by: Andreas Rheinhardt --- libavcodec/x86/hpeldsp_vp3.asm | 4 ++++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/x86/hpeldsp_vp3.asm b/libavcodec/x86/hpeldsp_vp3.asm index cba96d06cb..284babfd70 100644 --- a/libavcodec/x86/hpeldsp_vp3.asm +++ b/libavcodec/x86/hpeldsp_vp3.asm @@ -65,8 +65,10 @@ cglobal put_no_rnd_pixels8_x2_exact, 4,5 INIT_MMX mmxext PUT_NO_RND_PIXELS8_X2_EXACT +%if ARCH_X86_32 INIT_MMX 3dnow PUT_NO_RND_PIXELS8_X2_EXACT +%endif ; void ff_put_no_rnd_pixels8_y2_exact(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) @@ -107,5 +109,7 @@ cglobal put_no_rnd_pixels8_y2_exact, 4,5 INIT_MMX mmxext PUT_NO_RND_PIXELS8_Y2_EXACT +%if ARCH_X86_32 INIT_MMX 3dnow PUT_NO_RND_PIXELS8_Y2_EXACT +%endif diff --git a/libavcodec/x86/hpeldsp_vp3_init.c b/libavcodec/x86/hpeldsp_vp3_init.c index 5979f4123c..3c52f9d6f4 100644 --- a/libavcodec/x86/hpeldsp_vp3_init.c +++ b/libavcodec/x86/hpeldsp_vp3_init.c @@ -40,12 +40,14 @@ void ff_put_no_rnd_pixels8_y2_exact_3dnow(uint8_t *block, av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags) { +#if ARCH_X86_32 if (EXTERNAL_AMD3DNOW(cpu_flags)) { if (flags & AV_CODEC_FLAG_BITEXACT) { c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow; c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_3dnow; } } +#endif if (EXTERNAL_MMXEXT(cpu_flags)) { if (flags & AV_CODEC_FLAG_BITEXACT) {