diff mbox series

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

Message ID DB6PR0101MB2214319C5EDB3EFDBDA733FE8FA79@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:54 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 such diracdsp functions
at compile-time.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/x86/diracdsp_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
index 8baacf3129..c9dca58f1b 100644
--- a/libavcodec/x86/diracdsp_init.c
+++ b/libavcodec/x86/diracdsp_init.c
@@ -87,9 +87,11 @@  static void OPNAME ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5
+#if !ARCH_X86_64
 DIRAC_PIXOP(put, mmx)
 DIRAC_PIXOP(avg, mmx)
 DIRAC_PIXOP(avg, mmxext)
 DIRAC_PIXOP(put, sse2)
 DIRAC_PIXOP(avg, sse2)
@@ -114,13 +116,13 @@  void ff_diracdsp_init_x86(DiracDSPContext* c)
         c->dirac_hpel_filter = dirac_hpel_filter_mmx;
         c->add_rect_clamped = ff_add_rect_clamped_mmx;
         c->put_signed_rect_clamped[0] = (void *)ff_put_signed_rect_clamped_mmx;
         PIXFUNC(put, 0, mmx);
         PIXFUNC(avg, 0, mmx);
     if (EXTERNAL_MMXEXT(mm_flags)) {
         PIXFUNC(avg, 0, mmxext);
     if (EXTERNAL_SSE2(mm_flags)) {