Reputation: 1133
I am wondering if there is an established method for choosing the best filter order to use when performing linear predictive coding (such as that used in audio file formats like FLAC).
My current approach is:
Is it possible to estimate the best filter order by looking at the error created from step 4 of the process? I would like to shortcut to step 8 from step 4 if possible.
Upvotes: 3
Views: 1294
Reputation: 1534
Since you mentioned FLAC, I had a look at how they do it. It looks like in the process of calculating the LPC coefficients, they estimate the errors for all orders up to the max. The overall computation starts here, they use FLAC__lpc_compute_lp_coefficients to compute the coeffs and also estimate the error. This is then used in FLAC__lpc_compute_best_order to decide what coefficient to use (in the nonexhaustive case).
Another implementation to look at is libflake, which is choosing the highest order n with n-1's reflection coefficient > .10. This seems related to the approach described here (PDF) which chooses the lowest order n when n+1 and n+2's reflection coefficients are < .15. Both are looking for the point where the reflection coef blows up, but looking at figure 1 in the aforementioned PDF it looks like taking the search from above as Flake does makes more sense. Just another heuristic but might be interesting.
Upvotes: 1