summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h')
-rw-r--r--lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h
index 64c0b0eaec..1b58057910 100644
--- a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h
+++ b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h
@@ -8,7 +8,7 @@ this list of conditions and the following disclaimer.
8- Redistributions in binary form must reproduce the above copyright 8- Redistributions in binary form must reproduce the above copyright
9notice, this list of conditions and the following disclaimer in the 9notice, this list of conditions and the following disclaimer in the
10documentation and/or other materials provided with the distribution. 10documentation and/or other materials provided with the distribution.
11- Neither the name of Internet Society, IETF or IETF Trust, nor the 11- Neither the name of Internet Society, IETF or IETF Trust, nor the
12names of specific contributors, may be used to endorse or promote 12names of specific contributors, may be used to endorse or promote
13products derived from this software without specific prior written 13products derived from this software without specific prior written
14permission. 14permission.
@@ -227,7 +227,8 @@ void silk_autocorr(
227 opus_int *scale, /* O Scaling of the correlation vector */ 227 opus_int *scale, /* O Scaling of the correlation vector */
228 const opus_int16 *inputData, /* I Input data to correlate */ 228 const opus_int16 *inputData, /* I Input data to correlate */
229 const opus_int inputDataSize, /* I Length of input */ 229 const opus_int inputDataSize, /* I Length of input */
230 const opus_int correlationCount /* I Number of correlation taps to compute */ 230 const opus_int correlationCount, /* I Number of correlation taps to compute */
231 int arch /* I Run-time architecture */
231); 232);
232 233
233void silk_decode_pitch( 234void silk_decode_pitch(
@@ -249,7 +250,8 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0
249 const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */ 250 const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */
250 const opus_int Fs_kHz, /* I Sample frequency (kHz) */ 251 const opus_int Fs_kHz, /* I Sample frequency (kHz) */
251 const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ 252 const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */
252 const opus_int nb_subfr /* I number of 5 ms subframes */ 253 const opus_int nb_subfr, /* I number of 5 ms subframes */
254 int arch /* I Run-time architecture */
253); 255);
254 256
255/* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients */ 257/* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients */
@@ -309,7 +311,8 @@ void silk_burg_modified(
309 const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ 311 const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */
310 const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */ 312 const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */
311 const opus_int nb_subfr, /* I Number of subframes stacked in x */ 313 const opus_int nb_subfr, /* I Number of subframes stacked in x */
312 const opus_int D /* I Order */ 314 const opus_int D, /* I Order */
315 int arch /* I Run-time architecture */
313); 316);
314 317
315/* Copy and multiply a vector by a constant */ 318/* Copy and multiply a vector by a constant */
@@ -358,8 +361,8 @@ opus_int64 silk_inner_prod16_aligned_64(
358/* Rotate a32 right by 'rot' bits. Negative rot values result in rotating 361/* Rotate a32 right by 'rot' bits. Negative rot values result in rotating
359 left. Output is 32bit int. 362 left. Output is 32bit int.
360 Note: contemporary compilers recognize the C expression below and 363 Note: contemporary compilers recognize the C expression below and
361 compile it into a 'ror' instruction if available. No need for inline ASM! */ 364 compile it into a 'ror' instruction if available. No need for OPUS_INLINE ASM! */
362static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) 365static OPUS_INLINE opus_int32 silk_ROR32( opus_int32 a32, opus_int rot )
363{ 366{
364 opus_uint32 x = (opus_uint32) a32; 367 opus_uint32 x = (opus_uint32) a32;
365 opus_uint32 r = (opus_uint32) rot; 368 opus_uint32 r = (opus_uint32) rot;
@@ -508,37 +511,37 @@ static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot )
508#define SILK_FIX_CONST( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5)) 511#define SILK_FIX_CONST( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5))
509 512
510/* silk_min() versions with typecast in the function call */ 513/* silk_min() versions with typecast in the function call */
511static inline opus_int silk_min_int(opus_int a, opus_int b) 514static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b)
512{ 515{
513 return (((a) < (b)) ? (a) : (b)); 516 return (((a) < (b)) ? (a) : (b));
514} 517}
515static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) 518static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b)
516{ 519{
517 return (((a) < (b)) ? (a) : (b)); 520 return (((a) < (b)) ? (a) : (b));
518} 521}
519static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) 522static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b)
520{ 523{
521 return (((a) < (b)) ? (a) : (b)); 524 return (((a) < (b)) ? (a) : (b));
522} 525}
523static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) 526static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b)
524{ 527{
525 return (((a) < (b)) ? (a) : (b)); 528 return (((a) < (b)) ? (a) : (b));
526} 529}
527 530
528/* silk_min() versions with typecast in the function call */ 531/* silk_min() versions with typecast in the function call */
529static inline opus_int silk_max_int(opus_int a, opus_int b) 532static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b)
530{ 533{
531 return (((a) > (b)) ? (a) : (b)); 534 return (((a) > (b)) ? (a) : (b));
532} 535}
533static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) 536static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b)
534{ 537{
535 return (((a) > (b)) ? (a) : (b)); 538 return (((a) > (b)) ? (a) : (b));
536} 539}
537static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) 540static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b)
538{ 541{
539 return (((a) > (b)) ? (a) : (b)); 542 return (((a) > (b)) ? (a) : (b));
540} 543}
541static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) 544static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
542{ 545{
543 return (((a) > (b)) ? (a) : (b)); 546 return (((a) > (b)) ? (a) : (b));
544} 547}
@@ -576,11 +579,11 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
576#include "MacroCount.h" 579#include "MacroCount.h"
577#include "MacroDebug.h" 580#include "MacroDebug.h"
578 581
579#ifdef ARMv4_ASM 582#ifdef OPUS_ARM_INLINE_ASM
580#include "arm/SigProc_FIX_armv4.h" 583#include "arm/SigProc_FIX_armv4.h"
581#endif 584#endif
582 585
583#ifdef ARMv5E_ASM 586#ifdef OPUS_ARM_INLINE_EDSP
584#include "arm/SigProc_FIX_armv5e.h" 587#include "arm/SigProc_FIX_armv5e.h"
585#endif 588#endif
586 589