Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
947f9336
Commit
947f9336
authored
Sep 22, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: float_dsp: add SSE version of vector_fmul_scalar()
parent
284ea790
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
float_dsp.asm
libavutil/x86/float_dsp.asm
+29
-0
float_dsp_init.c
libavutil/x86/float_dsp_init.c
+4
-0
No files found.
libavutil/x86/float_dsp.asm
View file @
947f9336
...
...
@@ -85,3 +85,32 @@ INIT_XMM sse
VECTOR_FMAC_SCALAR
INIT_YMM
avx
VECTOR_FMAC_SCALAR
;------------------------------------------------------------------------------
; void ff_vector_fmul_scalar(float *dst, const float *src, float mul, int len)
;------------------------------------------------------------------------------
%macro
VECTOR_FMUL_SCALAR
0
%if
UNIX64
cglobal
vector_fmul_scalar
,
3
,
3
,
2
,
dst
,
src
,
len
%else
cglobal
vector_fmul_scalar
,
4
,
4
,
3
,
dst
,
src
,
mul
,
len
%endif
%if
ARCH_X86_32
movss
m0
,
mulm
%elif
WIN64
SWAP
0
,
2
%endif
shufps
m0
,
m0
,
0
lea
lenq
,
[
lend
*
4
-
mmsize
]
.
loop
:
mova
m1
,
[
srcq
+
lenq
]
mulps
m1
,
m0
mova
[
dstq
+
lenq
]
,
m1
sub
lenq
,
mmsize
jge
.
loop
REP_RET
%endmacro
INIT_XMM
sse
VECTOR_FMUL_SCALAR
libavutil/x86/float_dsp_init.c
View file @
947f9336
...
...
@@ -32,6 +32,9 @@ extern void ff_vector_fmac_scalar_sse(float *dst, const float *src, float mul,
extern
void
ff_vector_fmac_scalar_avx
(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
);
extern
void
ff_vector_fmul_scalar_sse
(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
);
void
ff_float_dsp_init_x86
(
AVFloatDSPContext
*
fdsp
)
{
int
mm_flags
=
av_get_cpu_flags
();
...
...
@@ -39,6 +42,7 @@ void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
if
(
EXTERNAL_SSE
(
mm_flags
))
{
fdsp
->
vector_fmul
=
ff_vector_fmul_sse
;
fdsp
->
vector_fmac_scalar
=
ff_vector_fmac_scalar_sse
;
fdsp
->
vector_fmul_scalar
=
ff_vector_fmul_scalar_sse
;
}
if
(
EXTERNAL_AVX
(
mm_flags
))
{
fdsp
->
vector_fmul
=
ff_vector_fmul_avx
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment