mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-03 05:22:10 +00:00
avfilter/x86/vf_eq_init: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from process_mmxext are truely ancient 32bit x86s it is removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
81d3472031
commit
77b2a422a0
@ -24,7 +24,7 @@
|
||||
|
||||
SECTION .text
|
||||
|
||||
%macro PROCESS_ONE_LINE 1
|
||||
INIT_XMM sse2
|
||||
cglobal process_one_line, 5, 7, 5, src, dst, contrast, brightness, w
|
||||
movd m3, contrastd
|
||||
movd m4, brightnessd
|
||||
@ -39,7 +39,7 @@ cglobal process_one_line, 5, 7, 5, src, dst, contrast, brightness, w
|
||||
pxor m1, m1
|
||||
mov scalard, wd
|
||||
and scalard, mmsize-1
|
||||
sar wd, %1
|
||||
sar wd, 4
|
||||
cmp wd, 1
|
||||
jl .loop1
|
||||
|
||||
@ -80,11 +80,3 @@ cglobal process_one_line, 5, 7, 5, src, dst, contrast, brightness, w
|
||||
|
||||
.end:
|
||||
RET
|
||||
|
||||
%endmacro
|
||||
|
||||
INIT_MMX mmxext
|
||||
PROCESS_ONE_LINE 3
|
||||
|
||||
INIT_XMM sse2
|
||||
PROCESS_ONE_LINE 4
|
||||
|
@ -25,27 +25,10 @@
|
||||
#include "libavutil/x86/asm.h"
|
||||
#include "libavfilter/vf_eq.h"
|
||||
|
||||
extern void ff_process_one_line_mmxext(const uint8_t *src, uint8_t *dst, short contrast,
|
||||
short brightness, int w);
|
||||
extern void ff_process_one_line_sse2(const uint8_t *src, uint8_t *dst, short contrast,
|
||||
short brightness, int w);
|
||||
|
||||
#if HAVE_X86ASM
|
||||
static void process_mmxext(EQParameters *param, uint8_t *dst, int dst_stride,
|
||||
const uint8_t *src, int src_stride, int w, int h)
|
||||
{
|
||||
short contrast = (short) (param->contrast * 256 * 16);
|
||||
short brightness = ((short) (100.0 * param->brightness + 100.0) * 511)
|
||||
/ 200 - 128 - contrast / 32;
|
||||
|
||||
while (h--) {
|
||||
ff_process_one_line_mmxext(src, dst, contrast, brightness, w);
|
||||
src += src_stride;
|
||||
dst += dst_stride;
|
||||
}
|
||||
emms_c();
|
||||
}
|
||||
|
||||
static void process_sse2(EQParameters *param, uint8_t *dst, int dst_stride,
|
||||
const uint8_t *src, int src_stride, int w, int h)
|
||||
{
|
||||
@ -65,9 +48,6 @@ av_cold void ff_eq_init_x86(EQContext *eq)
|
||||
{
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
eq->process = process_mmxext;
|
||||
}
|
||||
if (EXTERNAL_SSE2(cpu_flags)) {
|
||||
eq->process = process_sse2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user