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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Victor Ding
Opus
Commits
44ce46dc
Commit
44ce46dc
authored
13 years ago
by
Koen Vos
Committed by
Jean-Marc Valin
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixes a decoder overflow on random input
Also some MSVC build fixes
parent
25577500
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
silk/decode_core.c
+4
-4
4 additions, 4 deletions
silk/decode_core.c
src/opus.vcxproj
+3
-4
3 additions, 4 deletions
src/opus.vcxproj
src/opus.vcxproj.filters
+4
-7
4 additions, 7 deletions
src/opus.vcxproj.filters
with
11 additions
and
15 deletions
silk/decode_core.c
+
4
−
4
View file @
44ce46dc
...
...
@@ -44,7 +44,7 @@ void silk_decode_core(
opus_int
i
,
j
,
k
,
lag
=
0
,
start_idx
,
sLTP_buf_idx
,
NLSF_interpolation_flag
,
signalType
;
opus_int16
*
A_Q12
,
*
B_Q14
,
*
pxq
,
A_Q12_tmp
[
MAX_LPC_ORDER
];
opus_int16
sLTP
[
MAX_FRAME_LENGTH
];
opus_int32
LTP_pred_Q14
,
LPC_pred_Q10
,
Gain_Q1
6
,
inv_gain_Q16
,
inv_gain_Q32
,
gain_adj_Q16
,
rand_seed
,
offset_Q10
;
opus_int32
LTP_pred_Q14
,
LPC_pred_Q10
,
Gain_Q1
0
,
inv_gain_Q16
,
inv_gain_Q32
,
gain_adj_Q16
,
rand_seed
,
offset_Q10
;
opus_int32
*
pred_lag_ptr
,
*
pexc_Q10
,
*
pres_Q10
;
opus_int32
res_Q10
[
MAX_SUB_FRAME_LENGTH
];
opus_int32
vec_Q10
[
MAX_SUB_FRAME_LENGTH
];
...
...
@@ -91,10 +91,10 @@ void silk_decode_core(
/* Preload LPC coeficients to array on stack. Gives small performance gain */
silk_memcpy
(
A_Q12_tmp
,
A_Q12
,
psDec
->
LPC_order
*
sizeof
(
opus_int16
)
);
B_Q14
=
&
psDecCtrl
->
LTPCoef_Q14
[
k
*
LTP_ORDER
];
Gain_Q1
6
=
psDecCtrl
->
Gains_Q16
[
k
];
Gain_Q1
0
=
silk_RSHIFT
(
psDecCtrl
->
Gains_Q16
[
k
]
,
6
)
;
signalType
=
psDec
->
indices
.
signalType
;
inv_gain_Q16
=
silk_INVERSE32_varQ
(
silk_max
(
Gain_Q1
6
,
1
),
3
2
);
inv_gain_Q16
=
silk_INVERSE32_varQ
(
Gain_Q1
0
,
2
6
);
inv_gain_Q16
=
silk_min
(
inv_gain_Q16
,
silk_int16_MAX
);
/* Calculate Gain adjustment factor */
...
...
@@ -209,7 +209,7 @@ void silk_decode_core(
/* Scale with Gain */
for
(
i
=
0
;
i
<
psDec
->
subfr_length
;
i
++
)
{
pxq
[
i
]
=
(
opus_int16
)
silk_SAT16
(
silk_RSHIFT_ROUND
(
silk_SMULWW
(
vec_Q10
[
i
],
Gain_Q1
6
),
10
)
);
pxq
[
i
]
=
(
opus_int16
)
silk_SAT16
(
silk_RSHIFT_ROUND
(
silk_SMULWW
(
vec_Q10
[
i
],
Gain_Q1
0
),
4
)
);
}
/* Update LPC filter state */
...
...
This diff is collapsed.
Click to expand it.
src/opus.vcxproj
+
3
−
4
View file @
44ce46dc
...
...
@@ -83,16 +83,15 @@
<ClCompile
Include=
"opus.c"
/>
<ClCompile
Include=
"opus_decoder.c"
/>
<ClCompile
Include=
"opus_encoder.c"
/>
<ClCompile
Include=
"repacketizer.c"
/>
<ClCompile
Include=
"test_opus.c"
/>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\silk\silk_API.h"
/>
<ClInclude
Include=
"..\win32\config.h"
/>
<ClInclude
Include=
"opus.h"
/>
<ClInclude
Include=
"opus_decoder.h"
/>
<ClInclude
Include=
"opus_encoder.h"
/>
<ClInclude
Include=
"opus_private.h"
/>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/opus.vcxproj.filters
+
4
−
7
View file @
44ce46dc
...
...
@@ -27,21 +27,18 @@
<ClCompile
Include=
"opus.c"
>
<Filter>
Source Files
</Filter>
</ClCompile>
<ClCompile
Include=
"repacketizer.c"
>
<Filter>
Source Files
</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"opus_decoder.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"opus_encoder.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"opus.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"..\win32\config.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"
..\silk\silk_API
.h"
>
<ClInclude
Include=
"
opus_private
.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
</ItemGroup>
...
...
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