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
29f7490c
Commit
29f7490c
authored
12 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
parent
3971be0e
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
libavresample/x86/audio_mix.asm
+34
-0
34 additions, 0 deletions
libavresample/x86/audio_mix.asm
libavresample/x86/audio_mix_init.c
+9
-0
9 additions, 0 deletions
libavresample/x86/audio_mix_init.c
with
43 additions
and
0 deletions
libavresample/x86/audio_mix.asm
+
34
−
0
View file @
29f7490c
...
@@ -150,3 +150,37 @@ cglobal mix_2_to_1_s16p_q8, 3,4,6, src, matrix, len, src1
...
@@ -150,3 +150,37 @@ cglobal mix_2_to_1_s16p_q8, 3,4,6, src, matrix, len, src1
sub
lend
,
mmsize
/
2
sub
lend
,
mmsize
/
2
jg
.loop
jg
.loop
REP_RET
REP_RET
;-----------------------------------------------------------------------------
; void ff_mix_1_to_2_fltp_flt(float **src, float **matrix, int len,
; int out_ch, int in_ch);
;-----------------------------------------------------------------------------
%macro MIX_1_TO_2_FLTP_FLT 0
cglobal
mix_1_to_2_fltp_flt
,
3
,
5
,
4
,
src0
,
matrix0
,
len
,
src1
,
matrix1
mov
src1q
,
[
src0q
+
gprsize
]
mov
src0q
,
[
src0q
]
sub
src1q
,
src0q
mov
matrix1q
,
[
matrix0q
+
gprsize
]
mov
matrix0q
,
[
matrix0q
]
VBROADCASTSS
m2
,
[
matrix0q
]
VBROADCASTSS
m3
,
[
matrix1q
]
ALIGN
16
.loop:
mova
m0
,
[
src0q
]
mulps
m1
,
m0
,
m3
mulps
m0
,
m0
,
m2
mova
[
src0q
],
m0
mova
[
src0q
+
src1q
],
m1
add
src0q
,
mmsize
sub
lend
,
mmsize
/
4
jg
.loop
REP_RET
%endmacro
INIT_XMM
ss
e
MIX_1_TO_2_FLTP_FLT
%if HAVE_AVX
INIT_YMM
avx
MIX_1_TO_2_FLTP_FLT
%endif
This diff is collapsed.
Click to expand it.
libavresample/x86/audio_mix_init.c
+
9
−
0
View file @
29f7490c
...
@@ -35,6 +35,11 @@ extern void ff_mix_2_to_1_s16p_flt_sse4(int16_t **src, float **matrix, int len,
...
@@ -35,6 +35,11 @@ extern void ff_mix_2_to_1_s16p_flt_sse4(int16_t **src, float **matrix, int len,
extern
void
ff_mix_2_to_1_s16p_q8_sse2
(
int16_t
**
src
,
int16_t
**
matrix
,
extern
void
ff_mix_2_to_1_s16p_q8_sse2
(
int16_t
**
src
,
int16_t
**
matrix
,
int
len
,
int
out_ch
,
int
in_ch
);
int
len
,
int
out_ch
,
int
in_ch
);
extern
void
ff_mix_1_to_2_fltp_flt_sse
(
float
**
src
,
float
**
matrix
,
int
len
,
int
out_ch
,
int
in_ch
);
extern
void
ff_mix_1_to_2_fltp_flt_avx
(
float
**
src
,
float
**
matrix
,
int
len
,
int
out_ch
,
int
in_ch
);
av_cold
void
ff_audio_mix_init_x86
(
AudioMix
*
am
)
av_cold
void
ff_audio_mix_init_x86
(
AudioMix
*
am
)
{
{
#if HAVE_YASM
#if HAVE_YASM
...
@@ -43,6 +48,8 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
...
@@ -43,6 +48,8 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
if
(
mm_flags
&
AV_CPU_FLAG_SSE
&&
HAVE_SSE
)
{
if
(
mm_flags
&
AV_CPU_FLAG_SSE
&&
HAVE_SSE
)
{
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
2
,
1
,
16
,
8
,
"SSE"
,
ff_mix_2_to_1_fltp_flt_sse
);
2
,
1
,
16
,
8
,
"SSE"
,
ff_mix_2_to_1_fltp_flt_sse
);
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
1
,
2
,
16
,
4
,
"SSE"
,
ff_mix_1_to_2_fltp_flt_sse
);
}
}
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE
)
{
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE
)
{
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_S16P
,
AV_MIX_COEFF_TYPE_FLT
,
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_S16P
,
AV_MIX_COEFF_TYPE_FLT
,
...
@@ -57,6 +64,8 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
...
@@ -57,6 +64,8 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
if
(
mm_flags
&
AV_CPU_FLAG_AVX
&&
HAVE_AVX
)
{
if
(
mm_flags
&
AV_CPU_FLAG_AVX
&&
HAVE_AVX
)
{
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
2
,
1
,
32
,
16
,
"AVX"
,
ff_mix_2_to_1_fltp_flt_avx
);
2
,
1
,
32
,
16
,
"AVX"
,
ff_mix_2_to_1_fltp_flt_avx
);
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_FLTP
,
AV_MIX_COEFF_TYPE_FLT
,
1
,
2
,
32
,
8
,
"AVX"
,
ff_mix_1_to_2_fltp_flt_avx
);
}
}
#endif
#endif
}
}
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