From 5e332fe35cd336a5c7718d5e9a5a93ece0e61a3a Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 20 Jun 2022 07:08:31 +0200 Subject: [PATCH] avcodec/x86/dirac_dwt: Remove obsolete MMX functions The only systems which benefit from these are truely ancient 32bit x86s as all other systems use at least the SSE2 versions (this includes all x64 cpus (which is why this code is restricted to x86-32)). Signed-off-by: Andreas Rheinhardt --- libavcodec/x86/dirac_dwt.asm | 8 -------- libavcodec/x86/dirac_dwt_init.c | 31 ------------------------------- 2 files changed, 39 deletions(-) diff --git a/libavcodec/x86/dirac_dwt.asm b/libavcodec/x86/dirac_dwt.asm index 22a5c2bbbb..6c8b3c0d88 100644 --- a/libavcodec/x86/dirac_dwt.asm +++ b/libavcodec/x86/dirac_dwt.asm @@ -293,14 +293,6 @@ cglobal horizontal_compose_dd97i_ssse3, 3,6,8, b, tmp, w, x, w2, b_w2 REP_RET -%if ARCH_X86_64 == 0 -INIT_MMX -COMPOSE_VERTICAL mmx -HAAR_HORIZONTAL mmx, 0 -HAAR_HORIZONTAL mmx, 1 -%endif - -;;INIT_XMM INIT_XMM COMPOSE_VERTICAL sse2 HAAR_HORIZONTAL sse2, 0 diff --git a/libavcodec/x86/dirac_dwt_init.c b/libavcodec/x86/dirac_dwt_init.c index 49a6380add..9200618283 100644 --- a/libavcodec/x86/dirac_dwt_init.c +++ b/libavcodec/x86/dirac_dwt_init.c @@ -134,9 +134,6 @@ static void horizontal_compose_haar1i##ext(uint8_t *_b, uint8_t *_tmp, int w)\ \ #if HAVE_X86ASM -#if !ARCH_X86_64 -COMPOSE_VERTICAL(_mmx, 4) -#endif COMPOSE_VERTICAL(_sse2, 8) @@ -163,34 +160,6 @@ void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type) #if HAVE_X86ASM int mm_flags = av_get_cpu_flags(); -#if !ARCH_X86_64 - if (!(mm_flags & AV_CPU_FLAG_MMX)) - return; - - switch (type) { - case DWT_DIRAC_DD9_7: - d->vertical_compose_l0 = (void*)vertical_compose53iL0_mmx; - d->vertical_compose_h0 = (void*)vertical_compose_dd97iH0_mmx; - break; - case DWT_DIRAC_LEGALL5_3: - d->vertical_compose_l0 = (void*)vertical_compose53iL0_mmx; - d->vertical_compose_h0 = (void*)vertical_compose_dirac53iH0_mmx; - break; - case DWT_DIRAC_DD13_7: - d->vertical_compose_l0 = (void*)vertical_compose_dd137iL0_mmx; - d->vertical_compose_h0 = (void*)vertical_compose_dd97iH0_mmx; - break; - case DWT_DIRAC_HAAR0: - d->vertical_compose = (void*)vertical_compose_haar_mmx; - d->horizontal_compose = horizontal_compose_haar0i_mmx; - break; - case DWT_DIRAC_HAAR1: - d->vertical_compose = (void*)vertical_compose_haar_mmx; - d->horizontal_compose = horizontal_compose_haar1i_mmx; - break; - } -#endif - if (!(mm_flags & AV_CPU_FLAG_SSE2)) return;