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
b30dd9e1
Commit
b30dd9e1
authored
Feb 26, 2008
by
Jean-Marc Valin
Browse files
fixed-point: got stereo to work again by fixing renormalise_bands()
parent
2805a14e
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/bands.c
View file @
b30dd9e1
...
...
@@ -112,14 +112,28 @@ void normalise_bands(const CELTMode *m, celt_sig_t *freq, celt_norm_t *X, celt_e
X
[
i
]
=
0
;
}
#ifdef FIXED_POINT
void
renormalise_bands
(
const
CELTMode
*
m
,
celt_norm_t
*
X
)
{
int
i
;
VARDECL
(
celt_ener_t
*
tmpE
);
VARDECL
(
celt_sig_t
*
freq
);
ALLOC
(
tmpE
,
m
->
nbEBands
*
m
->
nbChannels
,
celt_ener_t
);
ALLOC
(
freq
,
m
->
nbMdctBlocks
*
m
->
nbChannels
*
m
->
eBands
[
m
->
nbEBands
+
1
],
celt_sig_t
);
for
(
i
=
0
;
i
<
m
->
nbMdctBlocks
*
m
->
nbChannels
*
m
->
eBands
[
m
->
nbEBands
+
1
];
i
++
)
freq
[
i
]
=
SHL32
(
EXTEND32
(
X
[
i
]),
10
);
compute_band_energies
(
m
,
freq
,
tmpE
);
normalise_bands
(
m
,
freq
,
X
,
tmpE
);
}
#else
void
renormalise_bands
(
const
CELTMode
*
m
,
celt_norm_t
*
X
)
{
VARDECL
(
celt_ener_t
*
tmpE
);
ALLOC
(
tmpE
,
m
->
nbEBands
*
m
->
nbChannels
,
celt_ener_t
);
compute_band_energies
(
m
,
X
,
tmpE
);
/* FIXME: This isn't right */
normalise_bands
(
m
,
X
,
X
,
tmpE
);
}
#endif
/* De-normalise the energy to produce the synthesis from the unit-energy bands */
void
denormalise_bands
(
const
CELTMode
*
m
,
celt_norm_t
*
X
,
celt_sig_t
*
freq
,
celt_ener_t
*
bank
)
...
...
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