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
b72a0f9c
Commit
b72a0f9c
authored
12 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
swr: add int16_to_float_sse2()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
64943b47
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
libswresample/x86/audio_convert.asm
+36
-0
36 additions, 0 deletions
libswresample/x86/audio_convert.asm
libswresample/x86/swresample_x86.c
+3
-0
3 additions, 0 deletions
libswresample/x86/swresample_x86.c
with
39 additions
and
0 deletions
libswresample/x86/audio_convert.asm
+
36
−
0
View file @
b72a0f9c
...
...
@@ -94,6 +94,40 @@ int32_to_float_u_int %+ SUFFIX
REP_RET
%endmacro
%macro INT16_TO_FLOAT 1
cglobal
int16_to_float_
%
1
,
3
,
3
,
4
,
ds
t
,
src
,
len
mov
srcq
,
[
srcq
]
mov
ds
tq
,
[
ds
tq
]
%ifidn %1, a
test
ds
tq
,
mmsize
-
1
jne
int16_to_float_u_int
%+
SUFFIX
test
srcq
,
mmsize
-
1
jne
int16_to_float_u_int
%+
SUFFIX
%else
int16_to_float_u_int
%+
SUFFIX
%endif
add
ds
tq
,
lenq
shr
lenq
,
1
add
srcq
,
lenq
neg
lenq
mova
m3
,
[
flt2pm31
]
.next:
mov
%
1
m2
,
[
srcq
+
lenq
]
pxor
m0
,
m0
pxor
m1
,
m1
punpcklwd
m0
,
m2
punpckhwd
m1
,
m2
cvtdq2ps
m0
,
m0
cvtdq2ps
m1
,
m1
mulps
m0
,
m3
mulps
m1
,
m3
mov
%
1
[
ds
tq
+
2
*
lenq
],
m0
mov
%
1
[
mmsize
+
ds
tq
+
2
*
lenq
],
m1
add
lenq
,
mmsize
jl
.next
REP_RET
%endmacro
INIT_MMX
mmx
INT16_TO_INT32
u
...
...
@@ -106,3 +140,5 @@ INT16_TO_INT32 a
INIT_XMM
ss
e2
INT32_TO_FLOAT
u
INT32_TO_FLOAT
a
INT16_TO_FLOAT
u
INT16_TO_FLOAT
a
This diff is collapsed.
Click to expand it.
libswresample/x86/swresample_x86.c
+
3
−
0
View file @
b72a0f9c
...
...
@@ -27,6 +27,7 @@ MULTI_CAPS_FUNC_DECL(mmx)
MULTI_CAPS_FUNC_DECL
(
sse
)
void
ff_int32_to_float_a_sse2
(
uint8_t
**
dst
,
const
uint8_t
**
src
,
int
len
);
void
ff_int16_to_float_a_sse2
(
uint8_t
**
dst
,
const
uint8_t
**
src
,
int
len
);
void
swri_audio_convert_init_x86
(
struct
AudioConvert
*
ac
,
enum
AVSampleFormat
out_fmt
,
...
...
@@ -50,5 +51,7 @@ MULTI_CAPS_FUNC(AV_CPU_FLAG_SSE, sse)
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
)
{
if
(
out_fmt
==
AV_SAMPLE_FMT_FLT
&&
in_fmt
==
AV_SAMPLE_FMT_S32
||
out_fmt
==
AV_SAMPLE_FMT_FLTP
&&
in_fmt
==
AV_SAMPLE_FMT_S32P
)
ac
->
simd_f
=
ff_int32_to_float_a_sse2
;
if
(
out_fmt
==
AV_SAMPLE_FMT_FLT
&&
in_fmt
==
AV_SAMPLE_FMT_S16
||
out_fmt
==
AV_SAMPLE_FMT_FLTP
&&
in_fmt
==
AV_SAMPLE_FMT_S16P
)
ac
->
simd_f
=
ff_int16_to_float_a_sse2
;
}
}
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