mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
4038b5b209
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 these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
89 lines
2.7 KiB
NASM
89 lines
2.7 KiB
NASM
;******************************************************************************
|
|
;* x86 optimized Format Conversion Utils
|
|
;* Copyright (c) 2008 Loren Merritt
|
|
;*
|
|
;* This file is part of FFmpeg.
|
|
;*
|
|
;* FFmpeg is free software; you can redistribute it and/or
|
|
;* modify it under the terms of the GNU Lesser General Public
|
|
;* License as published by the Free Software Foundation; either
|
|
;* version 2.1 of the License, or (at your option) any later version.
|
|
;*
|
|
;* FFmpeg is distributed in the hope that it will be useful,
|
|
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
;* Lesser General Public License for more details.
|
|
;*
|
|
;* You should have received a copy of the GNU Lesser General Public
|
|
;* License along with FFmpeg; if not, write to the Free Software
|
|
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
;******************************************************************************
|
|
|
|
%include "libavutil/x86/x86util.asm"
|
|
|
|
SECTION .text
|
|
|
|
;------------------------------------------------------------------------------
|
|
; void ff_int32_to_float_fmul_scalar(float *dst, const int32_t *src, float mul,
|
|
; int len);
|
|
;------------------------------------------------------------------------------
|
|
%macro INT32_TO_FLOAT_FMUL_SCALAR 1
|
|
%if UNIX64
|
|
cglobal int32_to_float_fmul_scalar, 3, 3, %1, dst, src, len
|
|
%else
|
|
cglobal int32_to_float_fmul_scalar, 4, 4, %1, dst, src, mul, len
|
|
%endif
|
|
%if WIN64
|
|
SWAP 0, 2
|
|
%elif ARCH_X86_32
|
|
movss m0, mulm
|
|
%endif
|
|
SPLATD m0
|
|
shl lend, 2
|
|
add srcq, lenq
|
|
add dstq, lenq
|
|
neg lenq
|
|
.loop:
|
|
cvtdq2ps m1, [srcq+lenq ]
|
|
cvtdq2ps m2, [srcq+lenq+16]
|
|
mulps m1, m0
|
|
mulps m2, m0
|
|
mova [dstq+lenq ], m1
|
|
mova [dstq+lenq+16], m2
|
|
add lenq, 32
|
|
jl .loop
|
|
RET
|
|
%endmacro
|
|
|
|
INIT_XMM sse2
|
|
INT32_TO_FLOAT_FMUL_SCALAR 3
|
|
|
|
;------------------------------------------------------------------------------
|
|
; void ff_int32_to_float_fmul_array8(FmtConvertContext *c, float *dst, const int32_t *src,
|
|
; const float *mul, int len);
|
|
;------------------------------------------------------------------------------
|
|
%macro INT32_TO_FLOAT_FMUL_ARRAY8 0
|
|
cglobal int32_to_float_fmul_array8, 5, 5, 5, c, dst, src, mul, len
|
|
shl lend, 2
|
|
add srcq, lenq
|
|
add dstq, lenq
|
|
neg lenq
|
|
.loop:
|
|
movss m0, [mulq]
|
|
SPLATD m0
|
|
cvtdq2ps m1, [srcq+lenq ]
|
|
cvtdq2ps m2, [srcq+lenq+16]
|
|
mulps m1, m0
|
|
mulps m2, m0
|
|
mova [dstq+lenq ], m1
|
|
mova [dstq+lenq+16], m2
|
|
add mulq, 4
|
|
add lenq, 32
|
|
jl .loop
|
|
RET
|
|
%endmacro
|
|
|
|
INIT_XMM sse2
|
|
INT32_TO_FLOAT_FMUL_ARRAY8
|
|
|