Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
947f9336
Commit
947f9336
authored
12 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
x86: float_dsp: add SSE version of vector_fmul_scalar()
parent
284ea790
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavutil/x86/float_dsp.asm
+29
-0
29 additions, 0 deletions
libavutil/x86/float_dsp.asm
libavutil/x86/float_dsp_init.c
+4
-0
4 additions, 0 deletions
libavutil/x86/float_dsp_init.c
with
33 additions
and
0 deletions
libavutil/x86/float_dsp.asm
+
29
−
0
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
,
ds
t
,
src
,
len
%else
cglobal
vector_fmul_scalar
,
4
,
4
,
3
,
ds
t
,
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
[
ds
tq
+
lenq
],
m1
sub
lenq
,
mmsize
jge
.loop
REP_RET
%endmacro
INIT_XMM
ss
e
VECTOR_FMUL_SCALAR
This diff is collapsed.
Click to expand it.
libavutil/x86/float_dsp_init.c
+
4
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment