projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e49c37
)
Kill unused pwd->int_table.
author
Andre Noll
<maan@systemlinux.org>
Mon, 19 Oct 2009 20:18:29 +0000
(22:18 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:26 +0000
(19:34 +0100)
wmadec_filter.c
patch
|
blob
|
history
diff --git
a/wmadec_filter.c
b/wmadec_filter.c
index 2fe69940853b8798da95ef63b819108393d426a7..53677629122ef63edcd58cbbef096b9c0c26df9c 100644
(file)
--- a/
wmadec_filter.c
+++ b/
wmadec_filter.c
@@
-83,7
+83,6
@@
struct private_wmadec_data {
struct vlc coef_vlc[2];
uint16_t *run_table[2];
uint16_t *level_table[2];
struct vlc coef_vlc[2];
uint16_t *run_table[2];
uint16_t *level_table[2];
- uint16_t *int_table[2];
const struct coef_vlc_table *coef_vlcs[2];
/* frame info */
int frame_len; ///< frame length in samples
const struct coef_vlc_table *coef_vlcs[2];
/* frame info */
int frame_len; ///< frame length in samples
@@
-166,33
+165,27
@@
static void wmadec_cleanup(struct private_wmadec_data *pwd)
free_vlc(&pwd->coef_vlc[i]);
free(pwd->run_table[i]);
free(pwd->level_table[i]);
free_vlc(&pwd->coef_vlc[i]);
free(pwd->run_table[i]);
free(pwd->level_table[i]);
- free(pwd->int_table[i]);
}
}
}
}
-/* XXX: use same run/length optimization as mpeg decoders */
-//FIXME maybe split decode / encode or pass flag
static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table,
static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table,
- uint16_t **plevel_table, uint16_t **pint_table,
- const struct coef_vlc_table *vlc_table)
+ uint16_t **plevel_table, const struct coef_vlc_table *vlc_table)
{
int n = vlc_table->n;
const uint8_t *table_bits = vlc_table->huffbits;
const uint32_t *table_codes = vlc_table->huffcodes;
const uint16_t *levels_table = vlc_table->levels;
{
int n = vlc_table->n;
const uint8_t *table_bits = vlc_table->huffbits;
const uint32_t *table_codes = vlc_table->huffcodes;
const uint16_t *levels_table = vlc_table->levels;
- uint16_t *run_table, *level_table
, *int_table
;
+ uint16_t *run_table, *level_table;
int i, l, j, k, level;
init_vlc(vlc, VLCBITS, n, table_bits, table_codes, 4);
run_table = para_malloc(n * sizeof(uint16_t));
level_table = para_malloc(n * sizeof(uint16_t));
int i, l, j, k, level;
init_vlc(vlc, VLCBITS, n, table_bits, table_codes, 4);
run_table = para_malloc(n * sizeof(uint16_t));
level_table = para_malloc(n * sizeof(uint16_t));
- int_table = para_malloc(n * sizeof(uint16_t));
i = 2;
level = 1;
k = 0;
while (i < n) {
i = 2;
level = 1;
k = 0;
while (i < n) {
- int_table[k] = i;
l = levels_table[k++];
for (j = 0; j < l; j++) {
run_table[i] = j;
l = levels_table[k++];
for (j = 0; j < l; j++) {
run_table[i] = j;
@@
-203,7
+196,6
@@
static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table,
}
*prun_table = run_table;
*plevel_table = level_table;
}
*prun_table = run_table;
*plevel_table = level_table;
- *pint_table = int_table;
}
/* compute the scale factor band sizes for each MDCT block size */
}
/* compute the scale factor band sizes for each MDCT block size */
@@
-426,9
+418,9
@@
static int wma_init(struct private_wmadec_data *pwd)
pwd->coef_vlcs[0] = &coef_vlcs[coef_vlc_table * 2];
pwd->coef_vlcs[1] = &coef_vlcs[coef_vlc_table * 2 + 1];
init_coef_vlc(&pwd->coef_vlc[0], &pwd->run_table[0], &pwd->level_table[0],
pwd->coef_vlcs[0] = &coef_vlcs[coef_vlc_table * 2];
pwd->coef_vlcs[1] = &coef_vlcs[coef_vlc_table * 2 + 1];
init_coef_vlc(&pwd->coef_vlc[0], &pwd->run_table[0], &pwd->level_table[0],
-
&pwd->int_table[0],
pwd->coef_vlcs[0]);
+ pwd->coef_vlcs[0]);
init_coef_vlc(&pwd->coef_vlc[1], &pwd->run_table[1], &pwd->level_table[1],
init_coef_vlc(&pwd->coef_vlc[1], &pwd->run_table[1], &pwd->level_table[1],
-
&pwd->int_table[1],
pwd->coef_vlcs[1]);
+ pwd->coef_vlcs[1]);
return 0;
}
return 0;
}