X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wmadec_filter.c;h=d79df975450f057c4db49f2f0ad9ccd6a50e0cf6;hp=13ad99c48744090fc16a399a4b48bb54f200cc1a;hb=d4b77deab0304c7ba0a02a27b4b01e6af8334cbb;hpb=6d2da655b6b13c47b8b4c89e6de6ea23e7d1efb9 diff --git a/wmadec_filter.c b/wmadec_filter.c index 13ad99c4..d79df975 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -183,7 +183,7 @@ static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table, uint16_t *run_table, *level_table, *int_table; int i, l, j, k, level; - init_vlc(vlc, VLCBITS, n, table_bits, 1, 1, table_codes, 4, 4); + 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)); @@ -276,13 +276,15 @@ static void compute_scale_factor_band_sizes(struct private_wmadec_data *pwd, } } -static int wma_init(struct private_wmadec_data *pwd, int flags2, struct asf_header_info *ahi) +static int wma_init(struct private_wmadec_data *pwd) { int i; float bps1, high_freq; volatile float bps; int sample_rate1; int coef_vlc_table; + struct asf_header_info *ahi = &pwd->ahi; + int flags2 = ahi->flags2; if (ahi->sample_rate <= 0 || ahi->sample_rate > 50000 || ahi->channels <= 0 || ahi->channels > 8 @@ -474,7 +476,7 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat pwd->use_bit_reservoir = pwd->ahi.flags2 & 0x0002; pwd->use_variable_block_len = pwd->ahi.flags2 & 0x0004; - ret = wma_init(pwd, pwd->ahi.flags2, &pwd->ahi); + ret = wma_init(pwd); if (ret < 0) return ret; /* init MDCT */ @@ -487,14 +489,14 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat PARA_INFO_LOG("using noise coding\n"); init_vlc(&pwd->hgain_vlc, HGAINVLCBITS, sizeof(ff_wma_hgain_huffbits), ff_wma_hgain_huffbits, - 1, 1, ff_wma_hgain_huffcodes, 2, 2); + ff_wma_hgain_huffcodes, 2); } if (pwd->use_exp_vlc) { PARA_INFO_LOG("using exp_vlc\n"); init_vlc(&pwd->exp_vlc, EXPVLCBITS, sizeof(ff_wma_scale_huffbits), ff_wma_scale_huffbits, - 1, 1, ff_wma_scale_huffcodes, 4, 4); + ff_wma_scale_huffcodes, 4); } else { PARA_INFO_LOG("using curve\n"); wma_lsp_to_curve_init(pwd, pwd->frame_len);