From 419b2be813e3391e046858b7e3d5f07a81f3d263 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Sun, 22 Nov 2009 22:25:58 +0000 Subject: Make sorting function used in TwinVQ a shared function Originally committed as revision 20584 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/lsp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavcodec/lsp.h') diff --git a/libavcodec/lsp.h b/libavcodec/lsp.h index 9c02000aaa..5a9d47b0e8 100644 --- a/libavcodec/lsp.h +++ b/libavcodec/lsp.h @@ -97,4 +97,11 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd */ void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order); +/** + * Sort values in ascending order. + * + * @note O(n) if data already sorted, O(n^2) - otherwise + */ +void ff_sort_nearly_sorted_floats(float *vals, int len); + #endif /* AVCODEC_LSP_H */ -- cgit v1.2.3