1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

avcodec/x86/me_cmp: Remove MMX sse functions

They are overridden by SSE2 and no longer needed by the no longer
existing nsse MMX functions. Saves 240B here.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-11-02 21:36:25 +01:00
parent 3f596ec478
commit 8157aa1a3f
2 changed files with 6 additions and 31 deletions

View File

@@ -282,8 +282,8 @@ INIT_XMM ssse3
%define ABS_SUM_8x8 ABS_SUM_8x8_64
HADAMARD8_DIFF 9
; int ff_sse*_*(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
; ptrdiff_t line_size, int h)
; int ff_sse*_sse2(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
; ptrdiff_t line_size, int h)
%macro SUM_SQUARED_ERRORS 1
cglobal sse%1, 5,5,%1 < mmsize ? 6 : 8, v, pix1, pix2, lsize, h
@@ -305,15 +305,10 @@ cglobal sse%1, 5,5,%1 < mmsize ? 6 : 8, v, pix1, pix2, lsize, h
pmaddwd m1, m1
pmaddwd m3, m3
%else
movu m1, [pix1q] ; m1 = pix1[0][0-15], [0-7] for mmx
movu m2, [pix2q] ; m2 = pix2[0][0-15], [0-7] for mmx
%if %1 == mmsize
movu m3, [pix1q+lsizeq] ; m3 = pix1[1][0-15], [0-7] for mmx
movu m4, [pix2q+lsizeq] ; m4 = pix2[1][0-15], [0-7] for mmx
%else ; %1 / 2 == mmsize; mmx only
mova m3, [pix1q+8] ; m3 = pix1[0][8-15]
mova m4, [pix2q+8] ; m4 = pix2[0][8-15]
%endif
movu m1, [pix1q] ; m1 = pix1[0][0-15]
movu m2, [pix2q] ; m2 = pix2[0][0-15]
movu m3, [pix1q+lsizeq] ; m3 = pix1[1][0-15]
movu m4, [pix2q+lsizeq] ; m4 = pix2[1][0-15]
; todo: mm1-mm2, mm3-mm4
; algo: subtract mm1 from mm2 with saturation and vice versa
@@ -348,15 +343,9 @@ cglobal sse%1, 5,5,%1 < mmsize ? 6 : 8, v, pix1, pix2, lsize, h
paddd m5, m1
paddd m5, m3
%if %1 <= mmsize
lea pix1q, [pix1q + 2*lsizeq]
lea pix2q, [pix2q + 2*lsizeq]
sub hd, 2
%else
add pix1q, lsizeq
add pix2q, lsizeq
dec hd
%endif
jnz .next2lines
HADDD m5, m1
@@ -364,12 +353,6 @@ cglobal sse%1, 5,5,%1 < mmsize ? 6 : 8, v, pix1, pix2, lsize, h
RET
%endmacro
INIT_MMX mmx
SUM_SQUARED_ERRORS 8
INIT_MMX mmx
SUM_SQUARED_ERRORS 16
INIT_XMM sse2
SUM_SQUARED_ERRORS 8
SUM_SQUARED_ERRORS 16

View File

@@ -30,12 +30,8 @@
int ff_sum_abs_dctelem_sse2(const int16_t *block);
int ff_sum_abs_dctelem_ssse3(const int16_t *block);
int ff_sse8_mmx(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
ptrdiff_t stride, int h);
int ff_sse8_sse2(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
ptrdiff_t stride, int h);
int ff_sse16_mmx(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
ptrdiff_t stride, int h);
int ff_sse16_sse2(MPVEncContext *v, const uint8_t *pix1, const uint8_t *pix2,
ptrdiff_t stride, int h);
int ff_hf_noise8_ssse3(const uint8_t *pix1, ptrdiff_t stride, int h);
@@ -119,10 +115,6 @@ av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
c->sse[1] = ff_sse8_mmx;
}
if (EXTERNAL_MMXEXT(cpu_flags)) {
#if !HAVE_ALIGNED_STACK
c->hadamard8_diff[0] = ff_hadamard8_diff16_mmxext;