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
d26de339
Commit
d26de339
authored
12 years ago
by
Mans Rullgard
Browse files
Options
Downloads
Patches
Plain Diff
ARM: libavresample: NEON optimised stereo fltp to s16 conversion
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
643b5b79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavresample/arm/audio_convert_init.c
+5
-0
5 additions, 0 deletions
libavresample/arm/audio_convert_init.c
libavresample/arm/audio_convert_neon.S
+64
-0
64 additions, 0 deletions
libavresample/arm/audio_convert_neon.S
with
69 additions
and
0 deletions
libavresample/arm/audio_convert_init.c
+
5
−
0
View file @
d26de339
...
...
@@ -26,6 +26,8 @@
#include
"libavresample/audio_convert.h"
void
ff_conv_flt_to_s16_neon
(
int16_t
*
dst
,
const
float
*
src
,
int
len
);
void
ff_conv_fltp_to_s16_2ch_neon
(
int16_t
*
dst
,
float
*
const
*
src
,
int
len
,
int
channels
);
av_cold
void
ff_audio_convert_init_arm
(
AudioConvert
*
ac
)
{
...
...
@@ -35,5 +37,8 @@ av_cold void ff_audio_convert_init_arm(AudioConvert *ac)
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_FLT
,
0
,
16
,
8
,
"NEON"
,
ff_conv_flt_to_s16_neon
);
ff_audio_convert_set_func
(
ac
,
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_FLTP
,
2
,
16
,
8
,
"NEON"
,
ff_conv_fltp_to_s16_2ch_neon
);
}
}
This diff is collapsed.
Click to expand it.
libavresample/arm/audio_convert_neon.S
+
64
−
0
View file @
d26de339
...
...
@@ -64,3 +64,67 @@ function ff_conv_flt_to_s16_neon, export=1
vst1.16
{
q2
},
[
r0
,:
128
]!
bx
lr
endfunc
function
ff_conv_fltp_to_s16_2ch_neon
,
export
=
1
ldm
r1
,
{
r1
,
r3
}
subs
r2
,
r2
,
#
8
vld1.32
{
q0
},
[
r1
,:
128
]!
vcvt.s32.f32
q8
,
q0
,
#
31
vld1.32
{
q1
},
[
r1
,:
128
]!
vcvt.s32.f32
q9
,
q1
,
#
31
vld1.32
{
q10
},
[
r3
,:
128
]!
vcvt.s32.f32
q10
,
q10
,
#
31
vld1.32
{
q11
},
[
r3
,:
128
]!
vcvt.s32.f32
q11
,
q11
,
#
31
beq
3
f
bics
r12
,
r2
,
#
15
beq
2
f
1
:
subs
r12
,
r12
,
#
16
vld1.32
{
q0
},
[
r1
,:
128
]!
vcvt.s32.f32
q0
,
q0
,
#
31
vsri.32
q10
,
q8
,
#
16
vld1.32
{
q1
},
[
r1
,:
128
]!
vcvt.s32.f32
q1
,
q1
,
#
31
vld1.32
{
q12
},
[
r3
,:
128
]!
vcvt.s32.f32
q12
,
q12
,
#
31
vld1.32
{
q13
},
[
r3
,:
128
]!
vsri.32
q11
,
q9
,
#
16
vst1.16
{
q10
},
[
r0
,:
128
]!
vcvt.s32.f32
q13
,
q13
,
#
31
vst1.16
{
q11
},
[
r0
,:
128
]!
vsri.32
q12
,
q0
,
#
16
vld1.32
{
q8
},
[
r1
,:
128
]!
vsri.32
q13
,
q1
,
#
16
vst1.16
{
q12
},
[
r0
,:
128
]!
vcvt.s32.f32
q8
,
q8
,
#
31
vld1.32
{
q9
},
[
r1
,:
128
]!
vcvt.s32.f32
q9
,
q9
,
#
31
vld1.32
{
q10
},
[
r3
,:
128
]!
vcvt.s32.f32
q10
,
q10
,
#
31
vld1.32
{
q11
},
[
r3
,:
128
]!
vcvt.s32.f32
q11
,
q11
,
#
31
vst1.16
{
q13
},
[
r0
,:
128
]!
bne
1
b
ands
r2
,
r2
,
#
15
beq
3
f
2
:
vsri.32
q10
,
q8
,
#
16
vld1.32
{
q0
},
[
r1
,:
128
]!
vcvt.s32.f32
q0
,
q0
,
#
31
vld1.32
{
q1
},
[
r1
,:
128
]!
vcvt.s32.f32
q1
,
q1
,
#
31
vld1.32
{
q12
},
[
r3
,:
128
]!
vcvt.s32.f32
q12
,
q12
,
#
31
vsri.32
q11
,
q9
,
#
16
vld1.32
{
q13
},
[
r3
,:
128
]!
vcvt.s32.f32
q13
,
q13
,
#
31
vst1.16
{
q10
},
[
r0
,:
128
]!
vsri.32
q12
,
q0
,
#
16
vst1.16
{
q11
},
[
r0
,:
128
]!
vsri.32
q13
,
q1
,
#
16
vst1.16
{
q12
-
q13
},[
r0
,:
128
]!
bx
lr
3
:
vsri.32
q10
,
q8
,
#
16
vsri.32
q11
,
q9
,
#
16
vst1.16
{
q10
-
q11
},[
r0
,:
128
]!
bx
lr
endfunc
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