Mercurial > libavcodec.hg
diff lsp.c @ 10463:9f35b262d3f0 libavcodec
Commit some functions that are used by both SIPR and AMR.
Based on AMR SoC code by Robert Swain and Colin McQuillan.
author | vitor |
---|---|
date | Tue, 27 Oct 2009 23:53:18 +0000 |
parents | c1cfa4679371 |
children | f132cde57bbe |
line wrap: on
line diff
--- a/lsp.c Tue Oct 27 20:56:56 2009 +0000 +++ b/lsp.c Tue Oct 27 23:53:18 2009 +0000 @@ -47,6 +47,14 @@ lsfq[lp_order-1] = FFMIN(lsfq[lp_order-1], lsfq_max);//Is warning required ? } +void ff_set_min_dist_lsf(float *lsf, float min_spacing, int size) +{ + int i; + float prev = 0.0; + for (i = 0; i < size; i++) + prev = lsf[i] = FFMAX(lsf[i], prev + min_spacing); +} + void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order) { int i;