diff options
author | Nils Wallménius <nils@rockbox.org> | 2013-05-20 22:25:57 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2013-08-31 08:30:51 +0200 |
commit | 580b307fd791c0997a8831bc800bba87797bfb7e (patch) | |
tree | 807846056f06fd944a750ce41217a877910ebd59 /lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | |
parent | 74761b70acd96cecc0d35450dd56a98ad9ee7d3d (diff) | |
download | rockbox-580b307fd791c0997a8831bc800bba87797bfb7e.tar.gz rockbox-580b307fd791c0997a8831bc800bba87797bfb7e.zip |
Sync opus codec to upstream git
Sync opus codec to upstream commit
02fed471a4568852d6618e041c4f2af0d7730ee2 (August 30 2013)
This brings in a lot of optimizations but also makes the diff
between our codec and the upstream much smaller as most of our
optimizations have been upstreamed or supeceded.
Speedups across the board for CELT mode files:
64kbps 128kbps
H300 9.82MHz 15.48MHz
c200 4.86MHz 9.63MHz
fuze v1 10.32MHz 15.92MHz
For the silk mode test file (16kbps) arm targets get a speedup
of about 2MHz while the H300 is 7.8MHz slower, likely because it's
now using the pseudostack more rather than the real stack which
is in iram. Patches to get around that are upcomming.
Change-Id: Ifecf963e461c51ac42e09dac1e91bc4bc3b12fa3
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h index 212891b35b..64c0b0eaec 100644 --- a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h +++ b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | |||
@@ -12,7 +12,7 @@ documentation and/or other materials provided with the distribution. | |||
12 | names of specific contributors, may be used to endorse or promote | 12 | names of specific contributors, may be used to endorse or promote |
13 | products derived from this software without specific prior written | 13 | products derived from this software without specific prior written |
14 | permission. | 14 | permission. |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
@@ -151,13 +151,11 @@ void silk_ana_filt_bank_1( | |||
151 | /* SCALAR FUNCTIONS */ | 151 | /* SCALAR FUNCTIONS */ |
152 | /********************************************************************/ | 152 | /********************************************************************/ |
153 | 153 | ||
154 | #if 0 | ||
155 | /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ | 154 | /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ |
156 | /* Convert input to a log scale */ | 155 | /* Convert input to a log scale */ |
157 | opus_int32 silk_lin2log( | 156 | opus_int32 silk_lin2log( |
158 | const opus_int32 inLin /* I input in linear scale */ | 157 | const opus_int32 inLin /* I input in linear scale */ |
159 | ); | 158 | ); |
160 | #endif | ||
161 | 159 | ||
162 | /* Approximation of a sigmoid function */ | 160 | /* Approximation of a sigmoid function */ |
163 | opus_int silk_sigm_Q15( | 161 | opus_int silk_sigm_Q15( |
@@ -170,12 +168,6 @@ opus_int32 silk_log2lin( | |||
170 | const opus_int32 inLog_Q7 /* I input on log scale */ | 168 | const opus_int32 inLog_Q7 /* I input on log scale */ |
171 | ); | 169 | ); |
172 | 170 | ||
173 | /* Function that returns the maximum absolut value of the input vector */ | ||
174 | opus_int16 silk_int16_array_maxabs( /* O Maximum absolute value, max: 2^15-1 */ | ||
175 | const opus_int16 *vec, /* I Input vector [len] */ | ||
176 | const opus_int32 len /* I Length of input vector */ | ||
177 | ); | ||
178 | |||
179 | /* Compute number of bits to right shift the sum of squares of a vector */ | 171 | /* Compute number of bits to right shift the sum of squares of a vector */ |
180 | /* of int16s to make it fit in an int32 */ | 172 | /* of int16s to make it fit in an int32 */ |
181 | void silk_sum_sqr_shift( | 173 | void silk_sum_sqr_shift( |
@@ -254,7 +246,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 | |||
254 | opus_int *LTPCorr_Q15, /* I/O Normalized correlation; input: value from previous frame */ | 246 | opus_int *LTPCorr_Q15, /* I/O Normalized correlation; input: value from previous frame */ |
255 | opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */ | 247 | opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */ |
256 | const opus_int32 search_thres1_Q16, /* I First stage threshold for lag candidates 0 - 1 */ | 248 | const opus_int32 search_thres1_Q16, /* I First stage threshold for lag candidates 0 - 1 */ |
257 | const opus_int search_thres2_Q15, /* I Final threshold for lag candidates 0 - 1 */ | 249 | const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */ |
258 | const opus_int Fs_kHz, /* I Sample frequency (kHz) */ | 250 | const opus_int Fs_kHz, /* I Sample frequency (kHz) */ |
259 | const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ | 251 | const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ |
260 | const opus_int nb_subfr /* I number of 5 ms subframes */ | 252 | const opus_int nb_subfr /* I number of 5 ms subframes */ |
@@ -315,7 +307,7 @@ void silk_burg_modified( | |||
315 | opus_int32 A_Q16[], /* O Prediction coefficients (length order) */ | 307 | opus_int32 A_Q16[], /* O Prediction coefficients (length order) */ |
316 | const opus_int16 x[], /* I Input signal, length: nb_subfr * ( D + subfr_length ) */ | 308 | const opus_int16 x[], /* I Input signal, length: nb_subfr * ( D + subfr_length ) */ |
317 | const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ | 309 | const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ |
318 | const opus_int subfr_length, /* I Input signal subframe length (incl. D preceeding samples) */ | 310 | const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */ |
319 | const opus_int nb_subfr, /* I Number of subframes stacked in x */ | 311 | const opus_int nb_subfr, /* I Number of subframes stacked in x */ |
320 | const opus_int D /* I Order */ | 312 | const opus_int D /* I Order */ |
321 | ); | 313 | ); |
@@ -381,7 +373,7 @@ static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) | |||
381 | } | 373 | } |
382 | } | 374 | } |
383 | 375 | ||
384 | /* Allocate opus_int16 alligned to 4-byte memory address */ | 376 | /* Allocate opus_int16 aligned to 4-byte memory address */ |
385 | #if EMBEDDED_ARM | 377 | #if EMBEDDED_ARM |
386 | #define silk_DWORD_ALIGN __attribute__((aligned(4))) | 378 | #define silk_DWORD_ALIGN __attribute__((aligned(4))) |
387 | #else | 379 | #else |
@@ -584,6 +576,14 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) | |||
584 | #include "MacroCount.h" | 576 | #include "MacroCount.h" |
585 | #include "MacroDebug.h" | 577 | #include "MacroDebug.h" |
586 | 578 | ||
579 | #ifdef ARMv4_ASM | ||
580 | #include "arm/SigProc_FIX_armv4.h" | ||
581 | #endif | ||
582 | |||
583 | #ifdef ARMv5E_ASM | ||
584 | #include "arm/SigProc_FIX_armv5e.h" | ||
585 | #endif | ||
586 | |||
587 | #ifdef __cplusplus | 587 | #ifdef __cplusplus |
588 | } | 588 | } |
589 | #endif | 589 | #endif |