diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2009-10-27 23:53:18 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2009-10-27 23:53:18 +0000 |
commit | 504eee37debbf7ce6ec3b79ae8825727258c3fd7 (patch) | |
tree | 094306ce1889f1e9ddf817f67e6d86c681ed6aa4 /libavcodec/lsp.c | |
parent | 2be414c8dee911744268341b5bd94b9e6a96f67c (diff) | |
download | ffmpeg-504eee37debbf7ce6ec3b79ae8825727258c3fd7.tar.gz |
Commit some functions that are used by both SIPR and AMR.
Based on AMR SoC code by Robert Swain and Colin McQuillan.
Originally committed as revision 20392 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lsp.c')
-rw-r--r-- | libavcodec/lsp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c index 5b5fc1c50e..09c9259c70 100644 --- a/libavcodec/lsp.c +++ b/libavcodec/lsp.c @@ -47,6 +47,14 @@ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, in 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; |