]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wmadec: Simplify wma_lsp_to_curve_init().
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 6 Feb 2016 14:11:51 +0000 (15:11 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 Mar 2016 20:29:06 +0000 (21:29 +0100)
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

index 6348adda2f3899d3a7ffd44d1c082a439bf4c1df..be638ced7ad5e9d991ff109f7eaf5c68d4b800c3 100644 (file)
@@ -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;