Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
39fb1932
Commit
39fb1932
authored
Jul 08, 2011
by
Jean-Marc Valin
Browse files
Forcing clamping the pitch lag within the limits of the buffer
parent
cc14cdf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
silk/silk_decode_pitch.c
View file @
39fb1932
...
...
@@ -39,7 +39,7 @@ void silk_decode_pitch(
const
SKP_int
nb_subfr
/* I number of sub frames */
)
{
SKP_int
lag
,
k
,
min_lag
,
cbk_size
;
SKP_int
lag
,
k
,
min_lag
,
max_lag
,
cbk_size
;
const
SKP_int8
*
Lag_CB_ptr
;
if
(
Fs_kHz
==
8
)
{
...
...
@@ -63,9 +63,11 @@ void silk_decode_pitch(
}
min_lag
=
SKP_SMULBB
(
PE_MIN_LAG_MS
,
Fs_kHz
);
max_lag
=
SKP_SMULBB
(
PE_MAX_LAG_MS
,
Fs_kHz
);
lag
=
min_lag
+
lagIndex
;
for
(
k
=
0
;
k
<
nb_subfr
;
k
++
)
{
pitch_lags
[
k
]
=
lag
+
matrix_ptr
(
Lag_CB_ptr
,
k
,
contourIndex
,
cbk_size
);
pitch_lags
[
k
]
=
SKP_LIMIT
(
pitch_lags
[
k
],
min_lag
,
max_lag
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment