From 5d1a0c07877d301f72247e819441498afc26918d Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 6 Feb 2016 15:11:51 +0100 Subject: [PATCH] wmadec: Simplify wma_lsp_to_curve_init(). There's only one caller, and it passes pwd->frame_len as the second argument to the function. Since we pass pwd as well, the second argument of the function can be removed. --- wmadec_filter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wmadec_filter.c b/wmadec_filter.c index 6348adda..be638ced 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -429,13 +429,13 @@ static int wma_init(struct private_wmadec_data *pwd) return 0; } -static void wma_lsp_to_curve_init(struct private_wmadec_data *pwd, int frame_len) +static void wma_lsp_to_curve_init(struct private_wmadec_data *pwd) { float wdel, a, b; int i, e, m; - wdel = M_PI / frame_len; - for (i = 0; i < frame_len; i++) + wdel = M_PI / pwd->frame_len; + for (i = 0; i < pwd->frame_len; i++) pwd->lsp_cos_table[i] = 2.0f * cos(wdel * i); /* tables for x^-0.25 computation */ @@ -491,7 +491,7 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat wma_scale_huffbits, wma_scale_huffcodes, 4); } else { PARA_INFO_LOG("using curve\n"); - wma_lsp_to_curve_init(pwd, pwd->frame_len); + wma_lsp_to_curve_init(pwd); } *result = pwd; return pwd->ahi.header_len; -- 2.39.2