Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tim-Philipp Müller
Opus
Commits
1a8bf37d
Commit
1a8bf37d
authored
Mar 16, 2011
by
Jean-Marc Valin
Browse files
Taking into account the start and end bands in CNG
parent
37e788c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/celt.c
View file @
1a8bf37d
...
...
@@ -1988,6 +1988,11 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p
VARDECL
(
celt_norm
,
X
);
VARDECL
(
celt_ener
,
bandE
);
celt_uint32
seed
;
int
effEnd
;
effEnd
=
st
->
end
;
if
(
effEnd
>
st
->
mode
->
effEBands
)
effEnd
=
st
->
mode
->
effEBands
;
ALLOC
(
freq
,
C
*
N
,
celt_sig
);
/**< Interleaved signal MDCTs */
ALLOC
(
X
,
C
*
N
,
celt_norm
);
/**< Interleaved normalised MDCTs */
...
...
@@ -1998,6 +2003,8 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p
seed
=
st
->
rng
;
for
(
c
=
0
;
c
<
C
;
c
++
)
{
for
(
i
=
0
;
i
<
(
st
->
mode
->
eBands
[
st
->
start
]
<<
LM
);
i
++
)
X
[
c
*
N
+
i
]
=
0
;
for
(
i
=
0
;
i
<
st
->
mode
->
effEBands
;
i
++
)
{
int
j
;
...
...
@@ -2012,11 +2019,24 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p
}
renormalise_vector
(
X
+
boffs
,
blen
,
Q15ONE
);
}
for
(
i
=
(
st
->
mode
->
eBands
[
st
->
end
]
<<
LM
);
i
<
N
;
i
++
)
X
[
c
*
N
+
i
]
=
0
;
}
st
->
rng
=
seed
;
denormalise_bands
(
st
->
mode
,
X
,
freq
,
bandE
,
st
->
mode
->
effEBands
,
C
,
1
<<
LM
);
c
=
0
;
do
for
(
i
=
0
;
i
<
st
->
mode
->
eBands
[
st
->
start
]
<<
LM
;
i
++
)
freq
[
c
*
N
+
i
]
=
0
;
while
(
++
c
<
C
);
c
=
0
;
do
{
int
bound
=
st
->
mode
->
eBands
[
effEnd
]
<<
LM
;
if
(
st
->
downsample
!=
1
)
bound
=
IMIN
(
bound
,
N
/
st
->
downsample
);
for
(
i
=
bound
;
i
<
N
;
i
++
)
freq
[
c
*
N
+
i
]
=
0
;
}
while
(
++
c
<
C
);
compute_inv_mdcts
(
st
->
mode
,
0
,
freq
,
out_syn
,
overlap_mem
,
C
,
LM
);
plc
=
0
;
}
else
if
(
st
->
loss_count
==
0
)
...
...
Write
Preview
Supports
Markdown
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