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
b75726cb
Commit
b75726cb
authored
12 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
lavr: add x86-optimized function for mixing 2 to 1 s16p with q8 coeffs
parent
c140fb2c
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
+41
-0
41 additions, 0 deletions
libavresample/x86/audio_mix.asm
libavresample/x86/audio_mix_init.c
+5
-0
5 additions, 0 deletions
libavresample/x86/audio_mix_init.c
with
46 additions
and
0 deletions
libavresample/x86/audio_mix.asm
+
41
−
0
View file @
b75726cb
...
...
@@ -109,3 +109,44 @@ INIT_XMM sse2
MIX_2_TO_1_S16P_FLT
INIT_XMM
ss
e4
MIX_2_TO_1_S16P_FLT
;-----------------------------------------------------------------------------
; void ff_mix_2_to_1_s16p_q8(int16_t **src, int16_t **matrix, int len,
; int out_ch, int in_ch);
;-----------------------------------------------------------------------------
INIT_XMM
ss
e2
cglobal
mix_2_to_1_s16p_q8
,
3
,
4
,
6
,
src
,
matrix
,
len
,
src1
mov
src1q
,
[
srcq
+
gprsize
]
mov
srcq
,
[
srcq
]
sub
src1q
,
srcq
mov
matrixq
,
[
matrixq
]
movd
m4
,
[
matrixq
]
movd
m5
,
[
matrixq
]
SPLATW
m4
,
m4
,
0
SPLATW
m5
,
m5
,
1
pxor
m0
,
m0
punpcklwd
m4
,
m0
punpcklwd
m5
,
m0
ALIGN
16
.loop:
mova
m0
,
[
srcq
]
mova
m2
,
[
srcq
+
src1q
]
punpckhwd
m1
,
m0
,
m0
punpcklwd
m0
,
m0
punpckhwd
m3
,
m2
,
m2
punpcklwd
m2
,
m2
pmaddwd
m0
,
m4
pmaddwd
m1
,
m4
pmaddwd
m2
,
m5
pmaddwd
m3
,
m5
paddd
m0
,
m2
paddd
m1
,
m3
psrad
m0
,
8
psrad
m1
,
8
packssdw
m0
,
m1
mova
[
srcq
],
m0
add
srcq
,
mmsize
sub
lend
,
mmsize
/
2
jg
.loop
REP_RET
This diff is collapsed.
Click to expand it.
libavresample/x86/audio_mix_init.c
+
5
−
0
View file @
b75726cb
...
...
@@ -32,6 +32,9 @@ extern void ff_mix_2_to_1_s16p_flt_sse2(int16_t **src, float **matrix, int len,
extern
void
ff_mix_2_to_1_s16p_flt_sse4
(
int16_t
**
src
,
float
**
matrix
,
int
len
,
int
out_ch
,
int
in_ch
);
extern
void
ff_mix_2_to_1_s16p_q8_sse2
(
int16_t
**
src
,
int16_t
**
matrix
,
int
len
,
int
out_ch
,
int
in_ch
);
av_cold
void
ff_audio_mix_init_x86
(
AudioMix
*
am
)
{
#if HAVE_YASM
...
...
@@ -44,6 +47,8 @@ av_cold void ff_audio_mix_init_x86(AudioMix *am)
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE
)
{
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_S16P
,
AV_MIX_COEFF_TYPE_FLT
,
2
,
1
,
16
,
8
,
"SSE2"
,
ff_mix_2_to_1_s16p_flt_sse2
);
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_S16P
,
AV_MIX_COEFF_TYPE_Q8
,
2
,
1
,
16
,
8
,
"SSE2"
,
ff_mix_2_to_1_s16p_q8_sse2
);
}
if
(
mm_flags
&
AV_CPU_FLAG_SSE4
&&
HAVE_SSE
)
{
ff_audio_mix_set_func
(
am
,
AV_SAMPLE_FMT_S16P
,
AV_MIX_COEFF_TYPE_FLT
,
...
...
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