Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
7a7c42a7
Commit
7a7c42a7
authored
Nov 25, 2009
by
Jean-Marc Valin
Browse files
Fixing a few memory errors
parent
065dafdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
libcelt/celt.c
View file @
7a7c42a7
...
...
@@ -1234,11 +1234,11 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p
if
(
st
->
loss_count
==
0
)
{
celt_word16
pitch_buf
[
MAX_PERIOD
];
celt_word16
pitch_buf
[
MAX_PERIOD
>>
1
];
celt_word32
tmp
=
0
;
/*find_spectral_pitch(st->mode, st->mode->fft, &st->mode->psy, st->out_mem+MAX_PERIOD-len, st->out_mem, st->mode->window, NULL, len, MAX_PERIOD-len-100, &pitch_index, C);*/
/* FIXME: Should do a bit of interpolation while decimating */
for
(
i
=
0
;
i
<
MAX_PERIOD
;
i
++
)
for
(
i
=
0
;
i
<
MAX_PERIOD
>>
1
;
i
++
)
pitch_buf
[
i
]
=
EXTRACT16
(
SHR32
(
st
->
out_mem
[
2
*
i
],
SIG_SHIFT
));
find_temporal_pitch
(
st
->
mode
,
st
->
out_mem
+
MAX_PERIOD
-
len
,
pitch_buf
,
len
,
MAX_PERIOD
-
len
-
100
,
&
pitch_index
,
C
,
&
tmp
);
...
...
libcelt/pitch.c
View file @
7a7c42a7
...
...
@@ -199,7 +199,7 @@ void find_temporal_pitch(const CELTMode *m, const celt_sig * restrict x, celt_wo
}
*
pitch
=
2
*
best_pitch
[
0
]
-
offset
;
CELT_
COPY
(
y
,
y
+
(
N
>>
1
),
(
lag
-
N
)
>>
1
);
CELT_
MOVE
(
y
,
y
+
(
N
>>
1
),
(
lag
-
N
)
>>
1
);
CELT_COPY
(
y
+
((
lag
-
N
)
>>
1
),
x_lp
,
N
>>
1
);
RESTORE_STACK
;
...
...
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