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
Mark Harris
Opus
Commits
6a0d97eb
Commit
6a0d97eb
authored
Mar 10, 2008
by
Jean-Marc Valin
Browse files
No longer include redundent entries in the bit allocation cache
parent
b76ee706
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/dump_modes.c
View file @
6a0d97eb
...
...
@@ -119,10 +119,15 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes)
for
(
j
=
0
;
j
<
mode
->
nbEBands
;
j
++
)
{
int
k
;
fprintf
(
file
,
"const int allocCache_band%d_%d_%d_%d[MAX_PULSES] = {
\n
"
,
j
,
mode
->
Fs
,
mode
->
mdctSize
,
mode
->
nbChannels
);
for
(
k
=
0
;
k
<
MAX_PULSES
;
k
++
)
fprintf
(
file
,
"%2d, "
,
mode
->
bits
[
j
][
k
]);
fprintf
(
file
,
"};
\n
"
);
if
(
j
==
0
||
(
mode
->
bits
[
j
]
!=
mode
->
bits
[
j
-
1
]))
{
fprintf
(
file
,
"const int allocCache_band%d_%d_%d_%d[MAX_PULSES] = {
\n
"
,
j
,
mode
->
Fs
,
mode
->
mdctSize
,
mode
->
nbChannels
);
for
(
k
=
0
;
k
<
MAX_PULSES
;
k
++
)
fprintf
(
file
,
"%2d, "
,
mode
->
bits
[
j
][
k
]);
fprintf
(
file
,
"};
\n
"
);
}
else
{
fprintf
(
file
,
"#define allocCache_band%d_%d_%d_%d allocCache_band%d_%d_%d_%d
\n
"
,
j
,
mode
->
Fs
,
mode
->
mdctSize
,
mode
->
nbChannels
,
j
-
1
,
mode
->
Fs
,
mode
->
mdctSize
,
mode
->
nbChannels
);
}
}
fprintf
(
file
,
"const int *allocCache%d_%d_%d[%d] = {
\n
"
,
mode
->
Fs
,
mode
->
mdctSize
,
mode
->
nbChannels
,
mode
->
nbEBands
);
for
(
j
=
0
;
j
<
mode
->
nbEBands
;
j
++
)
...
...
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