Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
cd529edb
Unverified
Commit
cd529edb
authored
5 years ago
by
Felicia Lim
Browse files
Options
Downloads
Patches
Plain Diff
Fix NEON optimizations buffer read overrun
Thanks to Ray Essick
parent
812ae3fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c
+7
-2
7 additions, 2 deletions
silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c
with
7 additions
and
2 deletions
silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c
+
7
−
2
View file @
cd529edb
...
...
@@ -84,7 +84,9 @@ void silk_warped_autocorrelation_FIX_neon(
silk_assert
(
(
order
&
1
)
==
0
);
silk_assert
(
2
*
QS
-
QC
>=
0
);
ALLOC
(
input_QST
,
length
+
2
*
MAX_SHAPE_LPC_ORDER
,
opus_int32
);
/* The additional +4 is to ensure a later vld1q_s32 call does not overflow. */
/* Strictly, only +3 is needed but +4 simplifies initialization using the 4x32 neon load. */
ALLOC
(
input_QST
,
length
+
2
*
MAX_SHAPE_LPC_ORDER
+
4
,
opus_int32
);
input_QS
=
input_QST
;
/* input_QS has zero paddings in the beginning and end. */
...
...
@@ -121,6 +123,8 @@ void silk_warped_autocorrelation_FIX_neon(
vst1q_s32
(
input_QS
,
vdupq_n_s32
(
0
)
);
input_QS
+=
4
;
vst1q_s32
(
input_QS
,
vdupq_n_s32
(
0
)
);
input_QS
+=
4
;
vst1q_s32
(
input_QS
,
vdupq_n_s32
(
0
)
);
input_QS
=
input_QST
+
MAX_SHAPE_LPC_ORDER
-
orderT
;
/* The following loop runs ( length + order ) times, with ( order ) extra epilogues. */
...
...
@@ -153,7 +157,8 @@ void silk_warped_autocorrelation_FIX_neon(
opus_int
o
=
orderT
;
int32x4_t
state_QS_s32x4
[
3
][
2
];
ALLOC
(
state
,
length
+
orderT
,
opus_int32
);
/* The additional +4 is to ensure a later vld1q_s32 call does not overflow. */
ALLOC
(
state
,
length
+
order
+
4
,
opus_int32
);
state_QS_s32x4
[
2
][
1
]
=
vdupq_n_s32
(
0
);
/* Calculate 8 taps of all inputs in each loop. */
...
...
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