Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e07c9705
Commit
e07c9705
authored
May 02, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavr: x86: optimized 2-channel flt to fltp conversion
parent
5245c9f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
audio_convert.asm
libavresample/x86/audio_convert.asm
+32
-0
audio_convert_init.c
libavresample/x86/audio_convert_init.c
+9
-0
No files found.
libavresample/x86/audio_convert.asm
View file @
e07c9705
...
...
@@ -1165,3 +1165,35 @@ CONV_FLT_TO_S16P_6CH
INIT_XMM
avx
CONV_FLT_TO_S16P_6CH
%endif
;------------------------------------------------------------------------------
; void ff_conv_flt_to_fltp_2ch(float *const *dst, float *src, int len,
; int channels);
;------------------------------------------------------------------------------
%macro
CONV_FLT_TO_FLTP_2CH
0
cglobal
conv_flt_to_fltp_2ch
,
3
,
4
,
3
,
dst0
,
src
,
len
,
dst1
lea
lenq
,
[
4
*
lend
]
mov
dst1q
,
[
dst0q
+
gprsize
]
mov
dst0q
,
[
dst0q
]
lea
srcq
,
[
srcq
+
2
*
lenq
]
add
dst0q
,
lenq
add
dst1q
,
lenq
neg
lenq
.
loop
:
mova
m0
,
[
srcq
+
2
*
lenq
]
mova
m1
,
[
srcq
+
2
*
lenq
+
mmsize
]
DEINT2_PS
0
,
1
,
2
mova
[
dst0q
+
lenq
]
,
m0
mova
[
dst1q
+
lenq
]
,
m1
add
lenq
,
mmsize
jl
.
loop
REP_RET
%endmacro
INIT_XMM
sse
CONV_FLT_TO_FLTP_2CH
%if
HAVE_AVX
INIT_XMM
avx
CONV_FLT_TO_FLTP_2CH
%endif
libavresample/x86/audio_convert_init.c
View file @
e07c9705
...
...
@@ -132,6 +132,11 @@ extern void ff_conv_flt_to_s16p_6ch_ssse3(int16_t *const *dst, float *src,
extern
void
ff_conv_flt_to_s16p_6ch_avx
(
int16_t
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
extern
void
ff_conv_flt_to_fltp_2ch_sse
(
float
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
extern
void
ff_conv_flt_to_fltp_2ch_avx
(
float
*
const
*
dst
,
float
*
src
,
int
len
,
int
channels
);
av_cold
void
ff_audio_convert_init_x86
(
AudioConvert
*
ac
)
{
#if HAVE_YASM
...
...
@@ -148,6 +153,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
6
,
1
,
2
,
"SSE"
,
ff_conv_fltp_to_s16_6ch_sse
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLT
,
AV_SAMPLE_FMT_FLTP
,
2
,
16
,
8
,
"SSE"
,
ff_conv_fltp_to_flt_2ch_sse
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_FLTP
,
AV_SAMPLE_FMT_FLT
,
2
,
16
,
4
,
"SSE"
,
ff_conv_flt_to_fltp_2ch_sse
);
}
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE
)
{
if
(
!
(
mm_flags
&
AV_CPU_FLAG_SSE2SLOW
))
{
...
...
@@ -241,6 +248,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
2
,
16
,
8
,
"AVX"
,
ff_conv_flt_to_s16p_2ch_avx
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_S16P
,
AV_SAMPLE_FMT_FLT
,
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
);
}
#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