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
06e751a4
Commit
06e751a4
authored
May 02, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavr: x86: optimized 6-channel flt to fltp conversion
parent
e07c9705
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
0 deletions
+72
-0
audio_convert.asm
libavresample/x86/audio_convert.asm
+63
-0
audio_convert_init.c
libavresample/x86/audio_convert_init.c
+9
-0
No files found.
libavresample/x86/audio_convert.asm
View file @
06e751a4
...
...
@@ -1197,3 +1197,66 @@ CONV_FLT_TO_FLTP_2CH
INIT_XMM
avx
CONV_FLT_TO_FLTP_2CH
%endif
;------------------------------------------------------------------------------
; void ff_conv_flt_to_fltp_6ch(float *const *dst, float *src, int len,
; int channels);
;------------------------------------------------------------------------------
%macro
CONV_FLT_TO_FLTP_6CH
0
%if
ARCH_X86_64
cglobal
conv_flt_to_fltp_6ch
,
3
,
8
,
7
,
dst
,
src
,
len
,
dst1
,
dst2
,
dst3
,
dst4
,
dst5
%else
cglobal
conv_flt_to_fltp_6ch
,
2
,
7
,
7
,
dst
,
src
,
dst1
,
dst2
,
dst3
,
dst4
,
dst5
%define
lend
dword
r2m
%endif
mov
dst1q
,
[
dstq
+
gprsize
]
mov
dst2q
,
[
dstq
+
2
*
gprsize
]
mov
dst3q
,
[
dstq
+
3
*
gprsize
]
mov
dst4q
,
[
dstq
+
4
*
gprsize
]
mov
dst5q
,
[
dstq
+
5
*
gprsize
]
mov
dstq
,
[
dstq
]
sub
dst1q
,
dstq
sub
dst2q
,
dstq
sub
dst3q
,
dstq
sub
dst4q
,
dstq
sub
dst5q
,
dstq
.
loop
:
mova
m0
,
[
srcq
+
0
*
mmsize
]
; m0 = 0, 1, 2, 3
mova
m1
,
[
srcq
+
1
*
mmsize
]
; m1 = 4, 5, 6, 7
mova
m2
,
[
srcq
+
2
*
mmsize
]
; m2 = 8, 9, 10, 11
mova
m3
,
[
srcq
+
3
*
mmsize
]
; m3 = 12, 13, 14, 15
mova
m4
,
[
srcq
+
4
*
mmsize
]
; m4 = 16, 17, 18, 19
mova
m5
,
[
srcq
+
5
*
mmsize
]
; m5 = 20, 21, 22, 23
SBUTTERFLY2
dq
,
0
,
3
,
6
; m0 = 0, 12, 1, 13
; m3 = 2, 14, 3, 15
SBUTTERFLY2
dq
,
1
,
4
,
6
; m1 = 4, 16, 5, 17
; m4 = 6, 18, 7, 19
SBUTTERFLY2
dq
,
2
,
5
,
6
; m2 = 8, 20, 9, 21
; m5 = 10, 22, 11, 23
SBUTTERFLY2
dq
,
0
,
4
,
6
; m0 = 0, 6, 12, 18
; m4 = 1, 7, 13, 19
SBUTTERFLY2
dq
,
3
,
2
,
6
; m3 = 2, 8, 14, 20
; m2 = 3, 9, 15, 21
SBUTTERFLY2
dq
,
1
,
5
,
6
; m1 = 4, 10, 16, 22
; m5 = 5, 11, 17, 23
mova
[
dstq
]
,
m0
mova
[
dstq
+
dst1q
]
,
m4
mova
[
dstq
+
dst2q
]
,
m3
mova
[
dstq
+
dst3q
]
,
m2
mova
[
dstq
+
dst4q
]
,
m1
mova
[
dstq
+
dst5q
]
,
m5
add
srcq
,
mmsize
*
6
add
dstq
,
mmsize
sub
lend
,
mmsize
/
4
jg
.
loop
REP_RET
%endmacro
INIT_XMM
sse2
CONV_FLT_TO_FLTP_6CH
%if
HAVE_AVX
INIT_XMM
avx
CONV_FLT_TO_FLTP_6CH
%endif
libavresample/x86/audio_convert_init.c
View file @
06e751a4
...
...
@@ -137,6 +137,11 @@ extern void ff_conv_flt_to_fltp_2ch_sse(float *const *dst, float *src, int len,
extern
void
ff_conv_flt_to_fltp_2ch_avx
(
float
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
extern
void
ff_conv_flt_to_fltp_6ch_sse2
(
float
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
extern
void
ff_conv_flt_to_fltp_6ch_avx
(
float
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
av_cold
void
ff_audio_convert_init_x86
(
AudioConvert
*
ac
)
{
#if HAVE_YASM
...
...
@@ -198,6 +203,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
2
,
16
,
8
,
"SSE2"
,
ff_conv_flt_to_s16p_2ch_sse2
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_S16P
,
AV_SAMPLE_FMT_FLT
,
6
,
16
,
4
,
"SSE2"
,
ff_conv_flt_to_s16p_6ch_sse2
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLTP
,
AV_SAMPLE_FMT_FLT
,
6
,
16
,
4
,
"SSE2"
,
ff_conv_flt_to_fltp_6ch_sse2
);
}
if
(
mm_flags
&
AV_CPU_FLAG_SSSE3
&&
HAVE_SSE
)
{
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLT
,
AV_SAMPLE_FMT_S16P
,
...
...
@@ -250,6 +257,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
6
,
16
,
4
,
"AVX"
,
ff_conv_flt_to_s16p_6ch_avx
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLTP
,
AV_SAMPLE_FMT_FLT
,
2
,
16
,
4
,
"AVX"
,
ff_conv_flt_to_fltp_2ch_avx
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLTP
,
AV_SAMPLE_FMT_FLT
,
6
,
16
,
4
,
"AVX"
,
ff_conv_flt_to_fltp_6ch_avx
);
}
#endif
}
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