diff mbox series

[FFmpeg-devel,30/41] avcodec/x86/hpeldsp_vp3_init: Disable overridden functions on x64

Message ID DB6PR0101MB2214D32EC645497CB4033D598FA79@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Superseded
Headers show
Series Stop including superseded functions for x64 | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 9, 2022, 11:55 p.m. UTC
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 <andreas.rheinhardt@outlook.com>
 libavcodec/x86/hpeldsp_vp3.asm    | 4 ++++
 libavcodec/x86/hpeldsp_vp3_init.c | 2 ++
 2 files changed, 6 insertions(+)
diff mbox series


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
+%if ARCH_X86_32
 INIT_MMX 3dnow
 ; 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
+%if ARCH_X86_32
 INIT_MMX 3dnow
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;
     if (EXTERNAL_MMXEXT(cpu_flags)) {
         if (flags & AV_CODEC_FLAG_BITEXACT) {