X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=wmadec_filter.c;h=6ddedac23c79deb11cad10e48df0895bcf3f1532;hb=30fdc1bcb5fd37398943cb6b072a9ca4633f2592;hp=4c7c047a482e2b3f256cfb8c12dcd6b4de3a7500;hpb=21c6e0b09b42e61e72b741bd726856ab0bcd1d64;p=paraslash.git diff --git a/wmadec_filter.c b/wmadec_filter.c index 4c7c047a..6ddedac2 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -24,11 +24,11 @@ #include "para.h" #include "error.h" #include "list.h" -#include "ggo.h" #include "string.h" #include "sched.h" #include "buffer_tree.h" #include "filter.h" +#include "portable_io.h" #include "bitstream.h" #include "imdct.h" #include "wma.h" @@ -581,7 +581,7 @@ static int decode_exp_vlc(struct private_wmadec_data *pwd, int ch) last_exp = 36; while (q < q_end) { - code = get_vlc(&pwd->gb, pwd->exp_vlc.table, EXPVLCBITS); + code = get_vlc(&pwd->gb, &pwd->exp_vlc); if (code < 0) return code; /* NOTE: this offset is the same as MPEG4 AAC ! */ @@ -708,8 +708,7 @@ static int compute_high_band_values(struct private_wmadec_data *pwd, if (val == (int)0x80000000) val = get_bits(&pwd->gb, 7) - 19; else { - int code = get_vlc(&pwd->gb, - pwd->hgain_vlc.table, HGAINVLCBITS); + int code = get_vlc(&pwd->gb, &pwd->hgain_vlc); if (code < 0) return code; val += code - 18; @@ -940,7 +939,7 @@ static int wma_decode_block(struct private_wmadec_data *pwd) eptr = ptr + nb_coefs[ch]; memset(ptr, 0, pwd->block_len * sizeof(int16_t)); for (;;) { - code = get_vlc(&pwd->gb, coef_vlc->table, VLCBITS); + code = get_vlc(&pwd->gb, coef_vlc); if (code < 0) return code; if (code == 1) /* EOB */ @@ -1259,16 +1258,10 @@ static void wmadec_open(struct filter_node *fn) fn->min_iqs = 4096; } -/** - * The init function of the wma decoder. - * - * \param f Its fields are filled in by the function. - */ -void wmadec_filter_init(struct filter *f) -{ - f->open = wmadec_open; - f->close = wmadec_close; - f->execute = wmadec_execute; - f->pre_select = generic_filter_pre_select; - f->post_select = wmadec_post_select; -} +const struct filter lsg_filter_cmd_com_wmadec_user_data = { + .open = wmadec_open, + .close = wmadec_close, + .execute = wmadec_execute, + .pre_select = generic_filter_pre_select, + .post_select = wmadec_post_select, +};