Lines Matching +full:- +full:n
1 /* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2006-2009 Josh Coalson
3 * Copyright (C) 2011-2016 Xiph.Org Foundation
9 * - Redistributions of source code must retain the above copyright
12 * - Redistributions in binary form must reproduce the above copyright
16 * - Neither the name of the Xiph.org Foundation nor the names of its
48 const FLAC__int32 N = L - 1; in FLAC__window_bartlett() local
49 FLAC__int32 n; in FLAC__window_bartlett() local
52 for (n = 0; n <= N/2; n++) in FLAC__window_bartlett()
53 window[n] = 2.0f * n / (float)N; in FLAC__window_bartlett()
54 for (; n <= N; n++) in FLAC__window_bartlett()
55 window[n] = 2.0f - 2.0f * n / (float)N; in FLAC__window_bartlett()
58 for (n = 0; n <= L/2-1; n++) in FLAC__window_bartlett()
59 window[n] = 2.0f * n / (float)N; in FLAC__window_bartlett()
60 for (; n <= N; n++) in FLAC__window_bartlett()
61 window[n] = 2.0f - 2.0f * n / (float)N; in FLAC__window_bartlett()
67 const FLAC__int32 N = L - 1; in FLAC__window_bartlett_hann() local
68 FLAC__int32 n; in FLAC__window_bartlett_hann() local
70 for (n = 0; n < L; n++) in FLAC__window_bartlett_hann()
71 …window[n] = (FLAC__real)(0.62f - 0.48f * fabs((float)n/(float)N-0.5f) - 0.38f * cos(2.0f * M_PI * … in FLAC__window_bartlett_hann()
76 const FLAC__int32 N = L - 1; in FLAC__window_blackman() local
77 FLAC__int32 n; in FLAC__window_blackman() local
79 for (n = 0; n < L; n++) in FLAC__window_blackman()
80 …window[n] = (FLAC__real)(0.42f - 0.5f * cos(2.0f * M_PI * n / N) + 0.08f * cos(4.0f * M_PI * n / N… in FLAC__window_blackman()
83 /* 4-term -92dB side-lobe */
86 const FLAC__int32 N = L - 1; in FLAC__window_blackman_harris_4term_92db_sidelobe() local
87 FLAC__int32 n; in FLAC__window_blackman_harris_4term_92db_sidelobe() local
89 for (n = 0; n <= N; n++) in FLAC__window_blackman_harris_4term_92db_sidelobe()
90 …window[n] = (FLAC__real)(0.35875f - 0.48829f * cos(2.0f * M_PI * n / N) + 0.14128f * cos(4.0f * M_… in FLAC__window_blackman_harris_4term_92db_sidelobe()
95 const FLAC__int32 N = L - 1; in FLAC__window_connes() local
96 const double N2 = (double)N / 2.; in FLAC__window_connes()
97 FLAC__int32 n; in FLAC__window_connes() local
99 for (n = 0; n <= N; n++) { in FLAC__window_connes()
100 double k = ((double)n - N2) / N2; in FLAC__window_connes()
101 k = 1.0f - k * k; in FLAC__window_connes()
102 window[n] = (FLAC__real)(k * k); in FLAC__window_connes()
108 const FLAC__int32 N = L - 1; in FLAC__window_flattop() local
109 FLAC__int32 n; in FLAC__window_flattop() local
111 for (n = 0; n < L; n++) in FLAC__window_flattop()
112 …n] = (FLAC__real)(1.0f - 1.93f * cos(2.0f * M_PI * n / N) + 1.29f * cos(4.0f * M_PI * n / N) - 0.3… in FLAC__window_flattop()
117 const FLAC__int32 N = L - 1; in FLAC__window_gauss() local
118 const double N2 = (double)N / 2.; in FLAC__window_gauss()
119 FLAC__int32 n; in FLAC__window_gauss() local
121 for (n = 0; n <= N; n++) { in FLAC__window_gauss()
122 const double k = ((double)n - N2) / (stddev * N2); in FLAC__window_gauss()
123 window[n] = (FLAC__real)exp(-0.5f * k * k); in FLAC__window_gauss()
129 const FLAC__int32 N = L - 1; in FLAC__window_hamming() local
130 FLAC__int32 n; in FLAC__window_hamming() local
132 for (n = 0; n < L; n++) in FLAC__window_hamming()
133 window[n] = (FLAC__real)(0.54f - 0.46f * cos(2.0f * M_PI * n / N)); in FLAC__window_hamming()
138 const FLAC__int32 N = L - 1; in FLAC__window_hann() local
139 FLAC__int32 n; in FLAC__window_hann() local
141 for (n = 0; n < L; n++) in FLAC__window_hann()
142 window[n] = (FLAC__real)(0.5f - 0.5f * cos(2.0f * M_PI * n / N)); in FLAC__window_hann()
147 const FLAC__int32 N = L - 1; in FLAC__window_kaiser_bessel() local
148 FLAC__int32 n; in FLAC__window_kaiser_bessel() local
150 for (n = 0; n < L; n++) in FLAC__window_kaiser_bessel()
151 …window[n] = (FLAC__real)(0.402f - 0.498f * cos(2.0f * M_PI * n / N) + 0.098f * cos(4.0f * M_PI * n… in FLAC__window_kaiser_bessel()
156 const FLAC__int32 N = L - 1; in FLAC__window_nuttall() local
157 FLAC__int32 n; in FLAC__window_nuttall() local
159 for (n = 0; n < L; n++) in FLAC__window_nuttall()
160 …window[n] = (FLAC__real)(0.3635819f - 0.4891775f*cos(2.0f*M_PI*n/N) + 0.1365995f*cos(4.0f*M_PI*n/N… in FLAC__window_nuttall()
165 FLAC__int32 n; in FLAC__window_rectangle() local
167 for (n = 0; n < L; n++) in FLAC__window_rectangle()
168 window[n] = 1.0f; in FLAC__window_rectangle()
173 FLAC__int32 n; in FLAC__window_triangle() local
176 for (n = 1; n <= (L+1)/2; n++) in FLAC__window_triangle()
177 window[n-1] = 2.0f * n / ((float)L + 1.0f); in FLAC__window_triangle()
178 for (; n <= L; n++) in FLAC__window_triangle()
179 window[n-1] = (float)(2 * (L - n + 1)) / ((float)L + 1.0f); in FLAC__window_triangle()
182 for (n = 1; n <= L/2; n++) in FLAC__window_triangle()
183 window[n-1] = 2.0f * n / ((float)L + 1.0f); in FLAC__window_triangle()
184 for (; n <= L; n++) in FLAC__window_triangle()
185 window[n-1] = (float)(2 * (L - n + 1)) / ((float)L + 1.0f); in FLAC__window_triangle()
196 const FLAC__int32 Np = (FLAC__int32)(p / 2.0f * L) - 1; in FLAC__window_tukey()
197 FLAC__int32 n; in FLAC__window_tukey() local
202 for (n = 0; n <= Np; n++) { in FLAC__window_tukey()
203 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * n / Np)); in FLAC__window_tukey()
204 window[L-Np-1+n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * (n+Np) / Np)); in FLAC__window_tukey()
214 const FLAC__int32 N = end_n - start_n; in FLAC__window_partial_tukey() local
215 FLAC__int32 Np, n, i; in FLAC__window_partial_tukey() local
223 Np = (FLAC__int32)(p / 2.0f * N); in FLAC__window_partial_tukey()
225 for (n = 0; n < start_n && n < L; n++) in FLAC__window_partial_tukey()
226 window[n] = 0.0f; in FLAC__window_partial_tukey()
227 for (i = 1; n < (start_n+Np) && n < L; n++, i++) in FLAC__window_partial_tukey()
228 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Np)); in FLAC__window_partial_tukey()
229 for (; n < (end_n-Np) && n < L; n++) in FLAC__window_partial_tukey()
230 window[n] = 1.0f; in FLAC__window_partial_tukey()
231 for (i = Np; n < end_n && n < L; n++, i--) in FLAC__window_partial_tukey()
232 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Np)); in FLAC__window_partial_tukey()
233 for (; n < L; n++) in FLAC__window_partial_tukey()
234 window[n] = 0.0f; in FLAC__window_partial_tukey()
242 FLAC__int32 Ns, Ne, n, i; in FLAC__window_punchout_tukey() local
251 Ne = (FLAC__int32)(p / 2.0f * (L - end_n)); in FLAC__window_punchout_tukey()
253 for (n = 0, i = 1; n < Ns && n < L; n++, i++) in FLAC__window_punchout_tukey()
254 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Ns)); in FLAC__window_punchout_tukey()
255 for (; n < start_n-Ns && n < L; n++) in FLAC__window_punchout_tukey()
256 window[n] = 1.0f; in FLAC__window_punchout_tukey()
257 for (i = Ns; n < start_n && n < L; n++, i--) in FLAC__window_punchout_tukey()
258 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Ns)); in FLAC__window_punchout_tukey()
259 for (; n < end_n && n < L; n++) in FLAC__window_punchout_tukey()
260 window[n] = 0.0f; in FLAC__window_punchout_tukey()
261 for (i = 1; n < end_n+Ne && n < L; n++, i++) in FLAC__window_punchout_tukey()
262 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Ne)); in FLAC__window_punchout_tukey()
263 for (; n < L - (Ne) && n < L; n++) in FLAC__window_punchout_tukey()
264 window[n] = 1.0f; in FLAC__window_punchout_tukey()
265 for (i = Ne; n < L; n++, i--) in FLAC__window_punchout_tukey()
266 window[n] = (FLAC__real)(0.5f - 0.5f * cos(M_PI * i / Ne)); in FLAC__window_punchout_tukey()
272 const FLAC__int32 N = L - 1; in FLAC__window_welch() local
273 const double N2 = (double)N / 2.; in FLAC__window_welch()
274 FLAC__int32 n; in FLAC__window_welch() local
276 for (n = 0; n <= N; n++) { in FLAC__window_welch()
277 const double k = ((double)n - N2) / N2; in FLAC__window_welch()
278 window[n] = (FLAC__real)(1.0f - k * k); in FLAC__window_welch()