Unified · Split
| @@ -222,28 +222,20 @@ static void dft_stage_init( · 221 unmodified lines | ||
| 222 | 222 | if (!f->num_taps) { |
| 223 | 223 | int num_taps = 0, dft_length, i; |
| 224 | 224 | int k = phase == 50 && lsx_is_power_of_2(L) && Fn == L? L << 1 : 4; |
| 225 | −fprint(2, "#0\n"); | |
| 226 | 225 | double * h = lsx_design_lpf(Fp, Fs, Fn, att, &num_taps, -k, -1.); |
| 227 | −fprint(2, "#1\n"); | |
| 228 | 226 | if (phase != 50) |
| 229 | 227 | lsx_fir_to_phase(&h, &num_taps, &f->post_peak, phase); |
| 230 | 228 | else f->post_peak = num_taps / 2; |
| 231 | −fprint(2, "#A\n"); | |
| 232 | 229 | |
| 233 | 230 | dft_length = lsx_set_dft_length(num_taps); |
| 234 | −fprint(2, "#B\n"); | |
| 235 | 231 | f->coefs = calloc(dft_length, sizeof(*f->coefs)); |
| 236 | −fprint(2, "#C\n"); | |
| 237 | 232 | for (i = 0; i < num_taps; ++i) |
| 238 | 233 | f->coefs[(i + dft_length - num_taps + 1) & (dft_length - 1)] |
| 239 | 234 | = h[i] / dft_length * 2 * L; |
| 240 | −fprint(2, "#D\n"); | |
| 241 | 235 | free(h); |
| 242 | 236 | f->num_taps = num_taps; |
| 243 | 237 | f->dft_length = dft_length; |
| 244 | −fprint(2, "#E\n"); | |
| 245 | 238 | lsx_safe_rdft(dft_length, 1, f->coefs); |
| 246 | −fprint(2, "#F\n"); | |
| 247 | 239 | lsx_debug("fir_len=%i dft_length=%i Fp=%g Fs=%g Fn=%g att=%g %i/%i", |
| 248 | 240 | num_taps, dft_length, Fp, Fs, Fn, att, L, M); |
| 249 | 241 | } |
| @@ -411,9 +403,7 @@ static void rate_init( · 161 unmodified lines | ||
| 411 | 403 | phases = !rational? (1 << phase_bits) : arbL; |
| 412 | 404 | if (!f->interp[0].scalar) { |
| 413 | 405 | int phases0 = max(phases, 19), n0 = 0; |
| 414 | −fprint(2, "#2\n"); | |
| 415 | 406 | lsx_design_lpf(Fp, Fs, -Fn, attArb, &n0, phases0, f->beta); |
| 416 | −fprint(2, "#3\n"); | |
| 417 | 407 | num_coefs = n0 / phases0 + 1, num_coefs += num_coefs & !preM; |
| 418 | 408 | } |
| 419 | 409 | if ((num_coefs & 1) && rational && (arbL & 1)) |
| @@ -426,10 +416,8 @@ fprint(2, "#3\n"); · 6 unmodified lines | ||
| 426 | 416 | |
| 427 | 417 | if (!arb_stage.shared->poly_fir_coefs) { |
| 428 | 418 | int num_taps = num_coefs * phases - 1; |
| 429 | −fprint(2, "#4\n"); | |
| 430 | 419 | raw_coef_t * coefs = lsx_design_lpf( |
| 431 | 420 | Fp, Fs, Fn, attArb, &num_taps, phases, f->beta); |
| 432 | −fprint(2, "#5\n"); | |
| 433 | 421 | arb_stage.shared->poly_fir_coefs = prepare_coefs( |
| 434 | 422 | coefs, num_coefs, phases, order, 1); |
| 435 | 423 | lsx_debug("fir_len=%i phases=%i coef_interp=%i size=%s", |