* Get the tilt factor of a formant filter from its transfer function * @see #tilt_factor() in amrnbdec.c, which does essentially the same, * but somehow (??) it does a speech synthesis filter in the * middle, which is missing here * * @param lpcs LPC coefficients * @param n_lpcs Size of LPC buffer * @returns the tilt factor */
| 538 | * @returns the tilt factor |
| 539 | */ |
| 540 | static float tilt_factor(const float *lpcs, int n_lpcs) |
| 541 | { |
| 542 | float rh0, rh1; |
| 543 | |
| 544 | rh0 = 1.0 + ff_dot_productf(lpcs, lpcs, n_lpcs); |
| 545 | rh1 = lpcs[0] + ff_dot_productf(lpcs, &lpcs[1], n_lpcs - 1); |
| 546 | |
| 547 | return rh1 / rh0; |
| 548 | } |
| 549 | |
| 550 | /** |
| 551 | * Derive denoise filter coefficients (in real domain) from the LPCs. |
no test coverage detected