Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fdk-aac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
fdk-aac
Commits
839ae290
Commit
839ae290
authored
Aug 10, 2012
by
Martin Storsjo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use saturating adds to avoid overflow
These additions can overflow, triggering assertions later.
parent
d8e8f1ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
libAACenc/src/aacenc_tns.cpp
libAACenc/src/aacenc_tns.cpp
+2
-2
libAACenc/src/grp_data.cpp
libAACenc/src/grp_data.cpp
+1
-1
No files found.
libAACenc/src/aacenc_tns.cpp
View file @
839ae290
...
@@ -1150,8 +1150,8 @@ static INT FDKaacEnc_AutoToParcor(
...
@@ -1150,8 +1150,8 @@ static INT FDKaacEnc_AutoToParcor(
for
(
j
=
numOfCoeff
-
i
-
1
;
j
>=
0
;
j
--
)
{
for
(
j
=
numOfCoeff
-
i
-
1
;
j
>=
0
;
j
--
)
{
FIXP_DBL
accu1
=
fMult
(
tmp
,
input
[
j
]);
FIXP_DBL
accu1
=
fMult
(
tmp
,
input
[
j
]);
FIXP_DBL
accu2
=
fMult
(
tmp
,
workBuffer
[
j
]);
FIXP_DBL
accu2
=
fMult
(
tmp
,
workBuffer
[
j
]);
workBuffer
[
j
]
+=
accu1
;
workBuffer
[
j
]
=
fAddSaturate
(
workBuffer
[
j
],
accu1
)
;
input
[
j
]
+=
accu2
;
input
[
j
]
=
fAddSaturate
(
input
[
j
],
accu2
)
;
}
}
workBuffer
++
;
workBuffer
++
;
...
...
libAACenc/src/grp_data.cpp
View file @
839ae290
...
@@ -195,7 +195,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
...
@@ -195,7 +195,7 @@ FDKaacEnc_groupShortData(FIXP_DBL *mdctSpectrum, /* in-out
FIXP_DBL
energy
=
sfbEnergy
->
Short
[
wnd
][
sfb
];
FIXP_DBL
energy
=
sfbEnergy
->
Short
[
wnd
][
sfb
];
for
(
j
=
1
;
j
<
groupLen
[
grp
];
j
++
)
for
(
j
=
1
;
j
<
groupLen
[
grp
];
j
++
)
{
{
energy
+=
sfbEnergy
->
Short
[
wnd
+
j
][
sfb
]
;
energy
=
fAddSaturate
(
energy
,
sfbEnergy
->
Short
[
wnd
+
j
][
sfb
])
;
}
}
sfbEnergy
->
Long
[
i
++
]
=
energy
;
sfbEnergy
->
Long
[
i
++
]
=
energy
;
}
}
...
...
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