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
a4928cf3
Commit
a4928cf3
authored
Mar 13, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: neon optimised sum_square_butterfly_int32
parent
f507a9fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
ac3dsp_init_arm.c
libavcodec/arm/ac3dsp_init_arm.c
+5
-0
ac3dsp_neon.S
libavcodec/arm/ac3dsp_neon.S
+24
-0
No files found.
libavcodec/arm/ac3dsp_init_arm.c
View file @
a4928cf3
...
...
@@ -29,6 +29,10 @@ 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
);
void
ff_float_to_fixed24_neon
(
int32_t
*
dst
,
const
float
*
src
,
unsigned
int
len
);
void
ff_ac3_extract_exponents_neon
(
uint8_t
*
exp
,
int32_t
*
coef
,
int
nb_coefs
);
void
ff_ac3_sum_square_butterfly_int32_neon
(
int64_t
sum
[
4
],
const
int32_t
*
coef0
,
const
int32_t
*
coef1
,
int
len
);
void
ff_ac3_bit_alloc_calc_bap_armv6
(
int16_t
*
mask
,
int16_t
*
psd
,
int
start
,
int
end
,
...
...
@@ -52,5 +56,6 @@ av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
c
->
ac3_rshift_int32
=
ff_ac3_rshift_int32_neon
;
c
->
float_to_fixed24
=
ff_float_to_fixed24_neon
;
c
->
extract_exponents
=
ff_ac3_extract_exponents_neon
;
c
->
sum_square_butterfly_int32
=
ff_ac3_sum_square_butterfly_int32_neon
;
}
}
libavcodec/arm/ac3dsp_neon.S
View file @
a4928cf3
...
...
@@ -108,3 +108,27 @@ function ff_ac3_extract_exponents_neon, export=1
bgt 1b
bx lr
endfunc
function ff_ac3_sum_square_butterfly_int32_neon, export=1
vmov.i64 q0, #0
vmov.i64 q1, #0
vmov.i64 q2, #0
vmov.i64 q3, #0
1:
vld1.32 {d16}, [r1]!
vld1.32 {d17}, [r2]!
vadd.s32 d18, d16, d17
vsub.s32 d19, d16, d17
vmlal.s32 q0, d16, d16
vmlal.s32 q1, d17, d17
vmlal.s32 q2, d18, d18
vmlal.s32 q3, d19, d19
subs r3, r3, #2
bgt 1b
vadd.s64 d0, d0, d1
vadd.s64 d1, d2, d3
vadd.s64 d2, d4, d5
vadd.s64 d3, d6, d7
vst1.64 {q0-q1}, [r0]
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