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
245c7831
Commit
245c7831
authored
Mar 12, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: NEON optimised shift functions
parent
f4855a90
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
ac3dsp_init_arm.c
libavcodec/arm/ac3dsp_init_arm.c
+4
-0
ac3dsp_neon.S
libavcodec/arm/ac3dsp_neon.S
+21
-0
No files found.
libavcodec/arm/ac3dsp_init_arm.c
View file @
245c7831
...
...
@@ -25,11 +25,15 @@
void
ff_ac3_exponent_min_neon
(
uint8_t
*
exp
,
int
num_reuse_blocks
,
int
nb_coefs
);
int
ff_ac3_max_msb_abs_int16_neon
(
const
int16_t
*
src
,
int
len
);
void
ff_ac3_lshift_int16_neon
(
int16_t
*
src
,
unsigned
len
,
unsigned
shift
);
void
ff_ac3_rshift_int32_neon
(
int32_t
*
src
,
unsigned
len
,
unsigned
shift
);
av_cold
void
ff_ac3dsp_init_arm
(
AC3DSPContext
*
c
,
int
bit_exact
)
{
if
(
HAVE_NEON
)
{
c
->
ac3_exponent_min
=
ff_ac3_exponent_min_neon
;
c
->
ac3_max_msb_abs_int16
=
ff_ac3_max_msb_abs_int16_neon
;
c
->
ac3_lshift_int16
=
ff_ac3_lshift_int16_neon
;
c
->
ac3_rshift_int32
=
ff_ac3_rshift_int32_neon
;
}
}
libavcodec/arm/ac3dsp_neon.S
View file @
245c7831
...
...
@@ -57,3 +57,24 @@ function ff_ac3_exponent_min_neon, export=1
bgt 1b
pop {pc}
endfunc
function ff_ac3_lshift_int16_neon, export=1
vdup.16 q0, r2
1: vld1.16 {q1}, [r0,:128]
vshl.s16 q1, q1, q0
vst1.16 {q1}, [r0,:128]!
subs r1, r1, #8
bgt 1b
bx lr
endfunc
function ff_ac3_rshift_int32_neon, export=1
rsb r2, r2, #0
vdup.32 q0, r2
1: vld1.32 {q1}, [r0,:128]
vshl.s32 q1, q1, q0
vst1.32 {q1}, [r0,:128]!
subs r1, r1, #4
bgt 1b
bx lr
endfunc
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