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
65722e7f
Commit
65722e7f
authored
13 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
swr: int32_to_int16_mmx/sse
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
755667ee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libswresample/x86/audio_convert.asm
+31
-0
31 additions, 0 deletions
libswresample/x86/audio_convert.asm
libswresample/x86/swresample_x86.c
+5
-1
5 additions, 1 deletion
libswresample/x86/swresample_x86.c
with
36 additions
and
1 deletion
libswresample/x86/audio_convert.asm
+
31
−
0
View file @
65722e7f
...
...
@@ -194,14 +194,45 @@ float_to_int16_u_int %+ SUFFIX
REP_RET
%endmacro
%macro INT32_TO_INT16 1
cglobal
int32_to_int16_
%
1
,
3
,
3
,
2
,
ds
t
,
src
,
len
mov
srcq
,
[
srcq
]
mov
ds
tq
,
[
ds
tq
]
%ifidn %1, a
test
ds
tq
,
mmsize
-
1
jne
int32_to_int16_u_int
%+
SUFFIX
test
srcq
,
mmsize
-
1
jne
int32_to_int16_u_int
%+
SUFFIX
%else
int32_to_int16_u_int
%+
SUFFIX
%endif
lea
srcq
,
[
srcq
+
2
*
lenq
]
add
ds
tq
,
lenq
neg
lenq
.next:
mov
%
1
m0
,
[
srcq
+
2
*
lenq
]
mov
%
1
m1
,
[
mmsize
+
srcq
+
2
*
lenq
]
psrad
m0
,
16
psrad
m1
,
16
packssdw
m0
,
m1
mov
%
1
[
ds
tq
+
lenq
],
m0
add
lenq
,
mmsize
jl
.next
REP_RET
%endmacro
INIT_MMX
mmx
INT16_TO_INT32
u
INT16_TO_INT32
a
INT32_TO_INT16
u
INT32_TO_INT16
a
INIT_XMM
ss
e
INT16_TO_INT32
u
INT16_TO_INT32
a
INT32_TO_INT16
u
INT32_TO_INT16
a
INIT_XMM
ss
e2
INT32_TO_FLOAT
u
...
...
This diff is collapsed.
Click to expand it.
libswresample/x86/swresample_x86.c
+
5
−
1
View file @
65722e7f
...
...
@@ -22,7 +22,9 @@
#include
"libswresample/audioconvert.h"
#define MULTI_CAPS_FUNC_DECL(cap) \
void ff_int16_to_int32_a_ ## cap(uint8_t **dst, const uint8_t **src, int len);
void ff_int16_to_int32_a_ ## cap(uint8_t **dst, const uint8_t **src, int len);\
void ff_int32_to_int16_a_ ## cap(uint8_t **dst, const uint8_t **src, int len);\
MULTI_CAPS_FUNC_DECL
(
mmx
)
MULTI_CAPS_FUNC_DECL
(
sse
)
...
...
@@ -45,6 +47,8 @@ void swri_audio_convert_init_x86(struct AudioConvert *ac,
if (mm_flags & flag) {\
if( out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S16 || out_fmt == AV_SAMPLE_FMT_S32P && in_fmt == AV_SAMPLE_FMT_S16P)\
ac->simd_f = ff_int16_to_int32_a_ ## cap;\
if( out_fmt == AV_SAMPLE_FMT_S16 && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_S16P && in_fmt == AV_SAMPLE_FMT_S32P)\
ac->simd_f = ff_int32_to_int16_a_ ## cap;\
}
MULTI_CAPS_FUNC
(
AV_CPU_FLAG_MMX
,
mmx
)
...
...
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