diff options
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/sort.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/sort.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/sort.c b/lib/rbcodec/codecs/libopus/silk/sort.c index 2f9930d9ce..4fba16f831 100644 --- a/lib/rbcodec/codecs/libopus/silk/sort.c +++ b/lib/rbcodec/codecs/libopus/silk/sort.c | |||
@@ -33,11 +33,10 @@ POSSIBILITY OF SUCH DAMAGE. | |||
33 | /* Best case: O(n) for an already sorted array */ | 33 | /* Best case: O(n) for an already sorted array */ |
34 | /* Worst case: O(n^2) for an inversely sorted array */ | 34 | /* Worst case: O(n^2) for an inversely sorted array */ |
35 | /* */ | 35 | /* */ |
36 | /* Shell short: http://en.wikipedia.org/wiki/Shell_sort */ | 36 | /* Shell short: https://en.wikipedia.org/wiki/Shell_sort */ |
37 | 37 | ||
38 | #include "SigProc_FIX.h" | 38 | #include "SigProc_FIX.h" |
39 | 39 | ||
40 | #if 0 | ||
41 | void silk_insertion_sort_increasing( | 40 | void silk_insertion_sort_increasing( |
42 | opus_int32 *a, /* I/O Unsorted / Sorted vector */ | 41 | opus_int32 *a, /* I/O Unsorted / Sorted vector */ |
43 | opus_int *idx, /* O Index vector for the sorted elements */ | 42 | opus_int *idx, /* O Index vector for the sorted elements */ |
@@ -49,9 +48,9 @@ void silk_insertion_sort_increasing( | |||
49 | opus_int i, j; | 48 | opus_int i, j; |
50 | 49 | ||
51 | /* Safety checks */ | 50 | /* Safety checks */ |
52 | silk_assert( K > 0 ); | 51 | celt_assert( K > 0 ); |
53 | silk_assert( L > 0 ); | 52 | celt_assert( L > 0 ); |
54 | silk_assert( L >= K ); | 53 | celt_assert( L >= K ); |
55 | 54 | ||
56 | /* Write start indices in index vector */ | 55 | /* Write start indices in index vector */ |
57 | for( i = 0; i < K; i++ ) { | 56 | for( i = 0; i < K; i++ ) { |
@@ -83,7 +82,6 @@ void silk_insertion_sort_increasing( | |||
83 | } | 82 | } |
84 | } | 83 | } |
85 | } | 84 | } |
86 | #endif | ||
87 | 85 | ||
88 | #ifdef FIXED_POINT | 86 | #ifdef FIXED_POINT |
89 | /* This function is only used by the fixed-point build */ | 87 | /* This function is only used by the fixed-point build */ |
@@ -98,9 +96,9 @@ void silk_insertion_sort_decreasing_int16( | |||
98 | opus_int value; | 96 | opus_int value; |
99 | 97 | ||
100 | /* Safety checks */ | 98 | /* Safety checks */ |
101 | silk_assert( K > 0 ); | 99 | celt_assert( K > 0 ); |
102 | silk_assert( L > 0 ); | 100 | celt_assert( L > 0 ); |
103 | silk_assert( L >= K ); | 101 | celt_assert( L >= K ); |
104 | 102 | ||
105 | /* Write start indices in index vector */ | 103 | /* Write start indices in index vector */ |
106 | for( i = 0; i < K; i++ ) { | 104 | for( i = 0; i < K; i++ ) { |
@@ -143,7 +141,7 @@ void silk_insertion_sort_increasing_all_values_int16( | |||
143 | opus_int i, j; | 141 | opus_int i, j; |
144 | 142 | ||
145 | /* Safety checks */ | 143 | /* Safety checks */ |
146 | silk_assert( L > 0 ); | 144 | celt_assert( L > 0 ); |
147 | 145 | ||
148 | /* Sort vector elements by value, increasing order */ | 146 | /* Sort vector elements by value, increasing order */ |
149 | for( i = 1; i < L; i++ ) { | 147 | for( i = 1; i < L; i++ ) { |