From e3c2ed7a71f65dc721c7210f120259ecd4ff65cb Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Wed, 11 Dec 2013 22:59:14 +0100 Subject: Sync libopus to upstream release 1.1 Change-Id: I9fea7460fc33f60faff961b3389dd97b5191463c --- lib/rbcodec/codecs/libopus/silk/API.h | 3 +- lib/rbcodec/codecs/libopus/silk/CNG.c | 4 +- lib/rbcodec/codecs/libopus/silk/Inlines.h | 14 +- .../codecs/libopus/silk/LPC_analysis_filter.c | 2 +- .../codecs/libopus/silk/LPC_inv_pred_gain.c | 2 +- lib/rbcodec/codecs/libopus/silk/MacroCount.h | 162 ++++++++++----------- lib/rbcodec/codecs/libopus/silk/MacroDebug.h | 112 +++++++------- lib/rbcodec/codecs/libopus/silk/NLSF2A.c | 4 +- .../codecs/libopus/silk/NLSF_VQ_weights_laroia.c | 2 +- lib/rbcodec/codecs/libopus/silk/NLSF_decode.c | 4 +- lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c | 2 +- lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c | 2 +- lib/rbcodec/codecs/libopus/silk/PLC.c | 10 +- lib/rbcodec/codecs/libopus/silk/PLC.h | 2 +- lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | 35 +++-- .../codecs/libopus/silk/arm/SigProc_FIX_armv4.h | 2 +- .../codecs/libopus/silk/arm/SigProc_FIX_armv5e.h | 4 +- lib/rbcodec/codecs/libopus/silk/arm/macros_armv4.h | 8 +- .../codecs/libopus/silk/arm/macros_armv5e.h | 24 +-- lib/rbcodec/codecs/libopus/silk/bwexpander.c | 2 +- lib/rbcodec/codecs/libopus/silk/bwexpander_32.c | 2 +- lib/rbcodec/codecs/libopus/silk/code_signs.c | 2 +- lib/rbcodec/codecs/libopus/silk/control.h | 5 +- lib/rbcodec/codecs/libopus/silk/dec_API.c | 4 +- lib/rbcodec/codecs/libopus/silk/decode_core.c | 2 +- lib/rbcodec/codecs/libopus/silk/decode_frame.c | 2 +- lib/rbcodec/codecs/libopus/silk/decode_indices.c | 2 +- .../codecs/libopus/silk/decode_parameters.c | 2 +- lib/rbcodec/codecs/libopus/silk/decode_pitch.c | 2 +- lib/rbcodec/codecs/libopus/silk/decode_pulses.c | 2 +- lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c | 2 +- lib/rbcodec/codecs/libopus/silk/define.h | 2 +- lib/rbcodec/codecs/libopus/silk/errors.h | 2 +- lib/rbcodec/codecs/libopus/silk/gain_quant.c | 2 +- lib/rbcodec/codecs/libopus/silk/init_decoder.c | 2 +- lib/rbcodec/codecs/libopus/silk/log2lin.c | 6 +- lib/rbcodec/codecs/libopus/silk/macros.h | 17 ++- lib/rbcodec/codecs/libopus/silk/main.h | 6 +- .../codecs/libopus/silk/pitch_est_defines.h | 2 +- lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c | 2 +- lib/rbcodec/codecs/libopus/silk/resampler.c | 2 +- .../codecs/libopus/silk/resampler_private.h | 2 +- .../codecs/libopus/silk/resampler_private_AR2.c | 2 +- .../libopus/silk/resampler_private_IIR_FIR.c | 4 +- .../libopus/silk/resampler_private_down_FIR.c | 4 +- .../codecs/libopus/silk/resampler_private_up2_HQ.c | 2 +- lib/rbcodec/codecs/libopus/silk/resampler_rom.c | 2 +- lib/rbcodec/codecs/libopus/silk/resampler_rom.h | 2 +- .../codecs/libopus/silk/resampler_structs.h | 2 +- lib/rbcodec/codecs/libopus/silk/shell_coder.c | 8 +- lib/rbcodec/codecs/libopus/silk/sort.c | 4 +- lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c | 2 +- .../codecs/libopus/silk/stereo_decode_pred.c | 2 +- lib/rbcodec/codecs/libopus/silk/structs.h | 5 +- lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c | 2 +- lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c | 2 +- lib/rbcodec/codecs/libopus/silk/tables.h | 4 +- lib/rbcodec/codecs/libopus/silk/tables_LTP.c | 32 +++- .../codecs/libopus/silk/tables_NLSF_CB_NB_MB.c | 2 +- .../codecs/libopus/silk/tables_NLSF_CB_WB.c | 2 +- lib/rbcodec/codecs/libopus/silk/tables_gain.c | 2 +- lib/rbcodec/codecs/libopus/silk/tables_other.c | 2 +- lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c | 2 +- .../codecs/libopus/silk/tables_pulses_per_block.c | 2 +- lib/rbcodec/codecs/libopus/silk/typedef.h | 5 +- 65 files changed, 310 insertions(+), 258 deletions(-) (limited to 'lib/rbcodec/codecs/libopus/silk') diff --git a/lib/rbcodec/codecs/libopus/silk/API.h b/lib/rbcodec/codecs/libopus/silk/API.h index c477cb4729..f0601bcf6b 100644 --- a/lib/rbcodec/codecs/libopus/silk/API.h +++ b/lib/rbcodec/codecs/libopus/silk/API.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -64,6 +64,7 @@ opus_int silk_Get_Encoder_Size( /* O Returns error co /*************************/ opus_int silk_InitEncoder( /* O Returns error code */ void *encState, /* I/O State */ + int arch, /* I Run-time architecture */ silk_EncControlStruct *encStatus /* O Encoder Status */ ); diff --git a/lib/rbcodec/codecs/libopus/silk/CNG.c b/lib/rbcodec/codecs/libopus/silk/CNG.c index 19c2e2230c..8481d95dbe 100644 --- a/lib/rbcodec/codecs/libopus/silk/CNG.c +++ b/lib/rbcodec/codecs/libopus/silk/CNG.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "stack_alloc.h" /* Generates excitation for CNG LPC synthesis */ -static inline void silk_CNG_exc( +static OPUS_INLINE void silk_CNG_exc( opus_int32 residual_Q10[], /* O CNG residual signal Q10 */ opus_int32 exc_buf_Q14[], /* I Random samples buffer Q10 */ opus_int32 Gain_Q16, /* I Gain to apply */ diff --git a/lib/rbcodec/codecs/libopus/silk/Inlines.h b/lib/rbcodec/codecs/libopus/silk/Inlines.h index bec35eb7dc..ec986cdfdd 100644 --- a/lib/rbcodec/codecs/libopus/silk/Inlines.h +++ b/lib/rbcodec/codecs/libopus/silk/Inlines.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /*! \file silk_Inlines.h - * \brief silk_Inlines.h defines inline signal processing functions. + * \brief silk_Inlines.h defines OPUS_INLINE signal processing functions. */ #ifndef SILK_FIX_INLINES_H @@ -38,7 +38,7 @@ extern "C" #endif /* count leading zeros of opus_int64 */ -static inline opus_int32 silk_CLZ64( opus_int64 in ) +static OPUS_INLINE opus_int32 silk_CLZ64( opus_int64 in ) { opus_int32 in_upper; @@ -53,7 +53,7 @@ static inline opus_int32 silk_CLZ64( opus_int64 in ) } /* get number of leading zeros and fractional part (the bits right after the leading one */ -static inline void silk_CLZ_FRAC( +static OPUS_INLINE void silk_CLZ_FRAC( opus_int32 in, /* I input */ opus_int32 *lz, /* O number of leading zeros */ opus_int32 *frac_Q7 /* O the 7 bits right after the leading one */ @@ -68,7 +68,7 @@ static inline void silk_CLZ_FRAC( /* Approximation of square root */ /* Accuracy: < +/- 10% for output values > 15 */ /* < +/- 2.5% for output values > 120 */ -static inline opus_int32 silk_SQRT_APPROX( opus_int32 x ) +static OPUS_INLINE opus_int32 silk_SQRT_APPROX( opus_int32 x ) { opus_int32 y, lz, frac_Q7; @@ -94,7 +94,7 @@ static inline opus_int32 silk_SQRT_APPROX( opus_int32 x ) } /* Divide two int32 values and return result as int32 in a given Q-domain */ -static inline opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */ +static OPUS_INLINE opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */ const opus_int32 a32, /* I numerator (Q0) */ const opus_int32 b32, /* I denominator (Q0) */ const opus_int Qres /* I Q-domain of result (>= 0) */ @@ -140,7 +140,7 @@ static inline opus_int32 silk_DIV32_varQ( /* O returns a good approximation } /* Invert int32 value and return result as int32 in a given Q-domain */ -static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */ +static OPUS_INLINE opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */ const opus_int32 b32, /* I denominator (Q0) */ const opus_int Qres /* I Q-domain of result (> 0) */ ) diff --git a/lib/rbcodec/codecs/libopus/silk/LPC_analysis_filter.c b/lib/rbcodec/codecs/libopus/silk/LPC_analysis_filter.c index 9bfeba0f5f..9d1f16cb7d 100644 --- a/lib/rbcodec/codecs/libopus/silk/LPC_analysis_filter.c +++ b/lib/rbcodec/codecs/libopus/silk/LPC_analysis_filter.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c b/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c index fec5732616..dd14d4bca6 100644 --- a/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c +++ b/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/MacroCount.h b/lib/rbcodec/codecs/libopus/silk/MacroCount.h index 6395d250b2..834817d058 100644 --- a/lib/rbcodec/codecs/libopus/silk/MacroCount.h +++ b/lib/rbcodec/codecs/libopus/silk/MacroCount.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -34,11 +34,11 @@ POSSIBILITY OF SUCH DAMAGE. extern opus_int64 ops_count; -static inline opus_int64 silk_SaveCount(){ +static OPUS_INLINE opus_int64 silk_SaveCount(){ return(ops_count); } -static inline opus_int64 silk_SaveResetCount(){ +static OPUS_INLINE opus_int64 silk_SaveResetCount(){ opus_int64 ret; ret = ops_count; @@ -46,12 +46,12 @@ static inline opus_int64 silk_SaveResetCount(){ return(ret); } -static inline silk_PrintCount(){ +static OPUS_INLINE silk_PrintCount(){ printf("ops_count = %d \n ", (opus_int32)ops_count); } #undef silk_MUL -static inline opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 4; ret = a32 * b32; @@ -59,14 +59,14 @@ static inline opus_int32 silk_MUL(opus_int32 a32, opus_int32 b32){ } #undef silk_MUL_uint -static inline opus_uint32 silk_MUL_uint(opus_uint32 a32, opus_uint32 b32){ +static OPUS_INLINE opus_uint32 silk_MUL_uint(opus_uint32 a32, opus_uint32 b32){ opus_uint32 ret; ops_count += 4; ret = a32 * b32; return ret; } #undef silk_MLA -static inline opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 4; ret = a32 + b32 * c32; @@ -74,7 +74,7 @@ static inline opus_int32 silk_MLA(opus_int32 a32, opus_int32 b32, opus_int32 c32 } #undef silk_MLA_uint -static inline opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){ +static OPUS_INLINE opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32){ opus_uint32 ret; ops_count += 4; ret = a32 + b32 * c32; @@ -82,14 +82,14 @@ static inline opus_int32 silk_MLA_uint(opus_uint32 a32, opus_uint32 b32, opus_ui } #undef silk_SMULWB -static inline opus_int32 silk_SMULWB(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULWB(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 5; ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); return ret; } #undef silk_SMLAWB -static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 5; ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16))); @@ -97,14 +97,14 @@ static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULWT -static inline opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 4; ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); return ret; } #undef silk_SMLAWT -static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 4; ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); @@ -112,14 +112,14 @@ static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULBB -static inline opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 1; ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32); return ret; } #undef silk_SMLABB -static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); @@ -127,7 +127,7 @@ static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULBT -static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ +static OPUS_INLINE opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ opus_int32 ret; ops_count += 4; ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16); @@ -135,7 +135,7 @@ static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ } #undef silk_SMLABT -static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); @@ -143,7 +143,7 @@ static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULTT -static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 1; ret = (a32 >> 16) * (b32 >> 16); @@ -151,7 +151,7 @@ static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLATT -static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + (b32 >> 16) * (c32 >> 16); @@ -179,7 +179,7 @@ static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 #define silk_SMLAWT_ovflw silk_SMLAWT #undef silk_SMULL -static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ opus_int64 ret; ops_count += 8; ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32)); @@ -187,14 +187,14 @@ static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLAL -static inline opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){ opus_int64 ret; ops_count += 8; ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32)); return ret; } #undef silk_SMLALBB -static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){ +static OPUS_INLINE opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){ opus_int64 ret; ops_count += 4; ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16)); @@ -202,7 +202,7 @@ static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 } #undef SigProcFIX_CLZ16 -static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16) +static OPUS_INLINE opus_int32 SigProcFIX_CLZ16(opus_int16 in16) { opus_int32 out32 = 0; ops_count += 10; @@ -240,7 +240,7 @@ static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16) } #undef SigProcFIX_CLZ32 -static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32) +static OPUS_INLINE opus_int32 SigProcFIX_CLZ32(opus_int32 in32) { /* test highest 16 bits and convert to opus_int16 */ ops_count += 2; @@ -252,19 +252,19 @@ static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32) } #undef silk_DIV32 -static inline opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){ ops_count += 64; return a32 / b32; } #undef silk_DIV32_16 -static inline opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){ ops_count += 32; return a32 / b32; } #undef silk_SAT8 -static inline opus_int8 silk_SAT8(opus_int64 a){ +static OPUS_INLINE opus_int8 silk_SAT8(opus_int64 a){ opus_int8 tmp; ops_count += 1; tmp = (opus_int8)((a) > silk_int8_MAX ? silk_int8_MAX : \ @@ -273,7 +273,7 @@ static inline opus_int8 silk_SAT8(opus_int64 a){ } #undef silk_SAT16 -static inline opus_int16 silk_SAT16(opus_int64 a){ +static OPUS_INLINE opus_int16 silk_SAT16(opus_int64 a){ opus_int16 tmp; ops_count += 1; tmp = (opus_int16)((a) > silk_int16_MAX ? silk_int16_MAX : \ @@ -281,7 +281,7 @@ static inline opus_int16 silk_SAT16(opus_int64 a){ return(tmp); } #undef silk_SAT32 -static inline opus_int32 silk_SAT32(opus_int64 a){ +static OPUS_INLINE opus_int32 silk_SAT32(opus_int64 a){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : \ @@ -289,7 +289,7 @@ static inline opus_int32 silk_SAT32(opus_int64 a){ return(tmp); } #undef silk_POS_SAT32 -static inline opus_int32 silk_POS_SAT32(opus_int64 a){ +static OPUS_INLINE opus_int32 silk_POS_SAT32(opus_int64 a){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : (a)); @@ -297,14 +297,14 @@ static inline opus_int32 silk_POS_SAT32(opus_int64 a){ } #undef silk_ADD_POS_SAT8 -static inline opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){ opus_int8 tmp; ops_count += 1; tmp = (opus_int8)((((a)+(b)) & 0x80) ? silk_int8_MAX : ((a)+(b))); return(tmp); } #undef silk_ADD_POS_SAT16 -static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ opus_int16 tmp; ops_count += 1; tmp = (opus_int16)((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b))); @@ -312,7 +312,7 @@ static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ } #undef silk_ADD_POS_SAT32 -static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b))); @@ -320,7 +320,7 @@ static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ } #undef silk_ADD_POS_SAT64 -static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ opus_int64 tmp; ops_count += 1; tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b))); @@ -328,40 +328,40 @@ static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ } #undef silk_LSHIFT8 -static inline opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ +static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ opus_int8 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT16 -static inline opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ +static OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ opus_int16 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT32 -static inline opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT64 -static inline opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){ +static OPUS_INLINE opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){ ops_count += 1; return a << shift; } #undef silk_LSHIFT_ovflw -static inline opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){ ops_count += 1; return a << shift; } #undef silk_LSHIFT_uint -static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a << shift; @@ -369,83 +369,83 @@ static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ } #undef silk_RSHIFT8 -static inline opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){ +static OPUS_INLINE opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT16 -static inline opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){ +static OPUS_INLINE opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT32 -static inline opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT64 -static inline opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){ +static OPUS_INLINE opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT_uint -static inline opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_ADD_LSHIFT -static inline opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_LSHIFT32 -static inline opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_LSHIFT_uint -static inline opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_RSHIFT -static inline opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_ADD_RSHIFT32 -static inline opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_ADD_RSHIFT_uint -static inline opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_SUB_LSHIFT32 -static inline opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a - (b << shift); return ret; /* shift >= 0*/ } #undef silk_SUB_RSHIFT32 -static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a - (b >> shift); @@ -453,7 +453,7 @@ static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int3 } #undef silk_RSHIFT_ROUND -static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ opus_int32 ret; ops_count += 3; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; @@ -461,7 +461,7 @@ static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ } #undef silk_RSHIFT_ROUND64 -static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ +static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ opus_int64 ret; ops_count += 6; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; @@ -469,13 +469,13 @@ static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ } #undef silk_abs_int64 -static inline opus_int64 silk_abs_int64(opus_int64 a){ +static OPUS_INLINE opus_int64 silk_abs_int64(opus_int64 a){ ops_count += 1; return (((a) > 0) ? (a) : -(a)); /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN*/ } #undef silk_abs_int32 -static inline opus_int32 silk_abs_int32(opus_int32 a){ +static OPUS_INLINE opus_int32 silk_abs_int32(opus_int32 a){ ops_count += 1; return silk_abs(a); } @@ -498,7 +498,7 @@ static silk_sign(a){ } #undef silk_ADD16 -static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ +static OPUS_INLINE opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ opus_int16 ret; ops_count += 1; ret = a + b; @@ -506,7 +506,7 @@ static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ } #undef silk_ADD32 -static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ +static OPUS_INLINE opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ opus_int32 ret; ops_count += 1; ret = a + b; @@ -514,7 +514,7 @@ static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ } #undef silk_ADD64 -static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ opus_int64 ret; ops_count += 2; ret = a + b; @@ -522,7 +522,7 @@ static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ } #undef silk_SUB16 -static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ +static OPUS_INLINE opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ opus_int16 ret; ops_count += 1; ret = a - b; @@ -530,7 +530,7 @@ static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ } #undef silk_SUB32 -static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ +static OPUS_INLINE opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ opus_int32 ret; ops_count += 1; ret = a - b; @@ -538,7 +538,7 @@ static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ } #undef silk_SUB64 -static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ opus_int64 ret; ops_count += 2; ret = a - b; @@ -546,7 +546,7 @@ static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ } #undef silk_ADD_SAT16 -static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { +static OPUS_INLINE opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { opus_int16 res; /* Nb will be counted in AKP_add32 and silk_SAT16*/ res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); @@ -554,7 +554,7 @@ static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { } #undef silk_ADD_SAT32 -static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ opus_int32 res; ops_count += 1; res = ((((a32) + (b32)) & 0x80000000) == 0 ? \ @@ -564,7 +564,7 @@ static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ } #undef silk_ADD_SAT64 -static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { +static OPUS_INLINE opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { opus_int64 res; ops_count += 1; res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ @@ -574,7 +574,7 @@ static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { } #undef silk_SUB_SAT16 -static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { +static OPUS_INLINE opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { opus_int16 res; silk_assert(0); /* Nb will be counted in sub-macros*/ @@ -583,7 +583,7 @@ static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { } #undef silk_SUB_SAT32 -static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { +static OPUS_INLINE opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { opus_int32 res; ops_count += 1; res = ((((a32)-(b32)) & 0x80000000) == 0 ? \ @@ -593,7 +593,7 @@ static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { } #undef silk_SUB_SAT64 -static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { +static OPUS_INLINE opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { opus_int64 res; ops_count += 1; res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ @@ -604,7 +604,7 @@ static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { } #undef silk_SMULWW -static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ opus_int32 ret; /* Nb will be counted in sub-macros*/ ret = silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)); @@ -612,7 +612,7 @@ static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLAWW -static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; /* Nb will be counted in sub-macros*/ ret = silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16)); @@ -620,26 +620,26 @@ static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_min_int -static inline opus_int silk_min_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_16 -static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_32 -static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_64 -static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); @@ -647,26 +647,26 @@ static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) /* silk_min() versions with typecast in the function call */ #undef silk_max_int -static inline opus_int silk_max_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_16 -static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_32 -static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_64 -static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); @@ -674,7 +674,7 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) #undef silk_LIMIT_int -static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2) +static OPUS_INLINE opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2) { opus_int ret; ops_count += 6; @@ -686,7 +686,7 @@ static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limi } #undef silk_LIMIT_16 -static inline opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2) +static OPUS_INLINE opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2) { opus_int16 ret; ops_count += 6; @@ -699,7 +699,7 @@ return(ret); #undef silk_LIMIT_32 -static inline opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2) +static OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2) { opus_int32 ret; ops_count += 6; diff --git a/lib/rbcodec/codecs/libopus/silk/MacroDebug.h b/lib/rbcodec/codecs/libopus/silk/MacroDebug.h index d3d84b6caa..35aedc5c5f 100644 --- a/lib/rbcodec/codecs/libopus/silk/MacroDebug.h +++ b/lib/rbcodec/codecs/libopus/silk/MacroDebug.h @@ -9,7 +9,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #undef silk_ADD16 #define silk_ADD16(a,b) silk_ADD16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){ +static OPUS_INLINE opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){ opus_int16 ret; ret = a + b; @@ -52,7 +52,7 @@ static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int #undef silk_ADD32 #define silk_ADD32(a,b) silk_ADD32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){ opus_int32 ret; ret = a + b; @@ -68,7 +68,7 @@ static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int #undef silk_ADD64 #define silk_ADD64(a,b) silk_ADD64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){ +static OPUS_INLINE opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){ opus_int64 ret; ret = a + b; @@ -84,7 +84,7 @@ static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int #undef silk_SUB16 #define silk_SUB16(a,b) silk_SUB16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){ +static OPUS_INLINE opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){ opus_int16 ret; ret = a - b; @@ -100,7 +100,7 @@ static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int #undef silk_SUB32 #define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){ opus_int32 ret; ret = a - b; @@ -116,7 +116,7 @@ static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int #undef silk_SUB64 #define silk_SUB64(a,b) silk_SUB64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){ +static OPUS_INLINE opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){ opus_int64 ret; ret = a - b; @@ -132,7 +132,7 @@ static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int #undef silk_ADD_SAT16 #define silk_ADD_SAT16(a,b) silk_ADD_SAT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) { +static OPUS_INLINE opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) { opus_int16 res; res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); if ( res != silk_SAT16( (opus_int32)a16 + (opus_int32)b16 ) ) @@ -147,7 +147,7 @@ static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char * #undef silk_ADD_SAT32 #define silk_ADD_SAT32(a,b) silk_ADD_SAT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 res; res = ((((opus_uint32)(a32) + (opus_uint32)(b32)) & 0x80000000) == 0 ? \ ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) : \ @@ -164,7 +164,7 @@ static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *f #undef silk_ADD_SAT64 #define silk_ADD_SAT64(a,b) silk_ADD_SAT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) { +static OPUS_INLINE opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) { opus_int64 res; int fail = 0; res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ @@ -193,7 +193,7 @@ static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char * #undef silk_SUB_SAT16 #define silk_SUB_SAT16(a,b) silk_SUB_SAT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) { +static OPUS_INLINE opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) { opus_int16 res; res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) ); if ( res != silk_SAT16( (opus_int32)a16 - (opus_int32)b16 ) ) @@ -208,7 +208,7 @@ static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char * #undef silk_SUB_SAT32 #define silk_SUB_SAT32(a,b) silk_SUB_SAT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) { +static OPUS_INLINE opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) { opus_int32 res; res = ((((opus_uint32)(a32)-(opus_uint32)(b32)) & 0x80000000) == 0 ? \ (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) : \ @@ -225,7 +225,7 @@ static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char * #undef silk_SUB_SAT64 #define silk_SUB_SAT64(a,b) silk_SUB_SAT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) { +static OPUS_INLINE opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) { opus_int64 res; int fail = 0; res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ @@ -254,7 +254,7 @@ static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char * #undef silk_MUL #define silk_MUL(a,b) silk_MUL_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; opus_int64 ret64; ret = a32 * b32; @@ -271,7 +271,7 @@ static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, i #undef silk_MUL_uint #define silk_MUL_uint(a,b) silk_MUL_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){ opus_uint32 ret; ret = a32 * b32; if ( (opus_uint64)ret != (opus_uint64)a32 * (opus_uint64)b32 ) @@ -286,7 +286,7 @@ static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char #undef silk_MLA #define silk_MLA(a,b,c) silk_MLA_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + b32 * c32; if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) @@ -301,7 +301,7 @@ static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c3 #undef silk_MLA_uint #define silk_MLA_uint(a,b,c) silk_MLA_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){ opus_uint32 ret; ret = a32 + b32 * c32; if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) @@ -316,7 +316,7 @@ static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_u #undef silk_SMULWB #define silk_SMULWB(a,b) silk_SMULWB_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); if ( (opus_int64)ret != ((opus_int64)a32 * (opus_int16)b32) >> 16 ) @@ -331,7 +331,7 @@ static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWB #define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = silk_ADD32( a32, silk_SMULWB( b32, c32 ) ); if ( silk_ADD32( a32, silk_SMULWB( b32, c32 ) ) != silk_ADD_SAT32( a32, silk_SMULWB( b32, c32 ) ) ) @@ -346,7 +346,7 @@ static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULWT #define silk_SMULWT(a,b) silk_SMULWT_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); if ( (opus_int64)ret != ((opus_int64)a32 * (b32 >> 16)) >> 16 ) @@ -361,7 +361,7 @@ static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWT #define silk_SMLAWT(a,b,c) silk_SMLAWT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); if ( (opus_int64)ret != (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16) ) @@ -376,7 +376,7 @@ static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULL #define silk_SMULL(a,b) silk_SMULL_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){ +static OPUS_INLINE opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){ opus_int64 ret64; int fail = 0; ret64 = a64 * b64; @@ -398,7 +398,7 @@ static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, /* no checking needed for silk_SMULBB */ #undef silk_SMLABB #define silk_SMLABB(a,b,c) silk_SMLABB_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32 ) @@ -414,7 +414,7 @@ static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 /* no checking needed for silk_SMULBT */ #undef silk_SMLABT #define silk_SMLABT(a,b,c) silk_SMLABT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16) ) @@ -430,7 +430,7 @@ static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 /* no checking needed for silk_SMULTT */ #undef silk_SMLATT #define silk_SMLATT(a,b,c) silk_SMLATT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + (b32 >> 16) * (c32 >> 16); if ( (opus_int64)ret != (opus_int64)a32 + (b32 >> 16) * (c32 >> 16) ) @@ -445,7 +445,7 @@ static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULWW #define silk_SMULWW(a,b) silk_SMULWW_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret, tmp1, tmp2; opus_int64 ret64; int fail = 0; @@ -476,7 +476,7 @@ static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWW #define silk_SMLAWW(a,b,c) silk_SMLAWW_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret, tmp; tmp = silk_SMULWW( b32, c32 ); @@ -505,7 +505,7 @@ static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_DIV32 #define silk_DIV32(a,b) silk_DIV32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){ if ( b32 == 0 ) { fprintf (stderr, "silk_DIV32(%d, %d) in %s: line %d\n", a32, b32, file, line); @@ -518,7 +518,7 @@ static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, #undef silk_DIV32_16 #define silk_DIV32_16(a,b) silk_DIV32_16_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){ int fail = 0; fail |= b32 == 0; fail |= b32 > silk_int16_MAX; @@ -544,7 +544,7 @@ static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *fi #undef silk_LSHIFT8 #define silk_LSHIFT8(a,b) silk_LSHIFT8_((a), (b), __FILE__, __LINE__) -static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ opus_int8 ret; int fail = 0; ret = a << shift; @@ -563,7 +563,7 @@ static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, #undef silk_LSHIFT16 #define silk_LSHIFT16(a,b) silk_LSHIFT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ opus_int16 ret; int fail = 0; ret = a << shift; @@ -582,7 +582,7 @@ static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *fi #undef silk_LSHIFT32 #define silk_LSHIFT32(a,b) silk_LSHIFT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ opus_int32 ret; int fail = 0; ret = a << shift; @@ -601,7 +601,7 @@ static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *fi #undef silk_LSHIFT64 #define silk_LSHIFT64(a,b) silk_LSHIFT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ opus_int64 ret; int fail = 0; ret = a << shift; @@ -620,7 +620,7 @@ static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file #undef silk_LSHIFT_ovflw #define silk_LSHIFT_ovflw(a,b) silk_LSHIFT_ovflw_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */ { fprintf (stderr, "silk_LSHIFT_ovflw(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -633,7 +633,7 @@ static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char #undef silk_LSHIFT_uint #define silk_LSHIFT_uint(a,b) silk_LSHIFT_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a << shift; if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift)) @@ -648,7 +648,7 @@ static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha #undef silk_RSHIFT8 #define silk_RSHITF8(a,b) silk_RSHIFT8_((a), (b), __FILE__, __LINE__) -static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=8) ) { fprintf (stderr, "silk_RSHITF8(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -661,7 +661,7 @@ static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, #undef silk_RSHIFT16 #define silk_RSHITF16(a,b) silk_RSHIFT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=16) ) { fprintf (stderr, "silk_RSHITF16(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -674,7 +674,7 @@ static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *fi #undef silk_RSHIFT32 #define silk_RSHIFT32(a,b) silk_RSHIFT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=32) ) { fprintf (stderr, "silk_RSHITF32(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -687,7 +687,7 @@ static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *fi #undef silk_RSHIFT64 #define silk_RSHIFT64(a,b) silk_RSHIFT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ if ( (shift < 0) || (shift>=64) ) { fprintf (stderr, "silk_RSHITF64(%lld, %lld) in %s: line %d\n", (long long)a, (long long)shift, file, line); @@ -700,7 +700,7 @@ static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *fi #undef silk_RSHIFT_uint #define silk_RSHIFT_uint(a,b) silk_RSHIFT_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>32) ) { fprintf (stderr, "silk_RSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line); @@ -713,7 +713,7 @@ static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha #undef silk_ADD_LSHIFT #define silk_ADD_LSHIFT(a,b,c) silk_ADD_LSHIFT_((a), (b), (c), __FILE__, __LINE__) -static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ +static OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ opus_int16 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -728,7 +728,7 @@ static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line #undef silk_ADD_LSHIFT32 #define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -743,7 +743,7 @@ static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_ADD_LSHIFT_uint #define silk_ADD_LSHIFT_uint(a,b,c) silk_ADD_LSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -758,7 +758,7 @@ static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, op #undef silk_ADD_RSHIFT #define silk_ADD_RSHIFT(a,b,c) silk_ADD_RSHIFT_((a), (b), (c), __FILE__, __LINE__) -static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ +static OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ opus_int16 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -773,7 +773,7 @@ static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line #undef silk_ADD_RSHIFT32 #define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -788,7 +788,7 @@ static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_ADD_RSHIFT_uint #define silk_ADD_RSHIFT_uint(a,b,c) silk_ADD_RSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -803,7 +803,7 @@ static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, op #undef silk_SUB_LSHIFT32 #define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a - (b << shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) ) @@ -818,7 +818,7 @@ static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_SUB_RSHIFT32 #define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a - (b >> shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) ) @@ -833,7 +833,7 @@ static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_RSHIFT_ROUND #define silk_RSHIFT_ROUND(a,b) silk_RSHIFT_ROUND_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; /* the marco definition can't handle a shift of zero */ @@ -849,7 +849,7 @@ static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char #undef silk_RSHIFT_ROUND64 #define silk_RSHIFT_ROUND64(a,b) silk_RSHIFT_ROUND64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){ opus_int64 ret; /* the marco definition can't handle a shift of zero */ if ( (shift <= 0) || (shift>=64) ) @@ -865,14 +865,14 @@ static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, ch /* silk_abs is used on floats also, so doesn't work... */ /*#undef silk_abs -static inline opus_int32 silk_abs(opus_int32 a){ +static OPUS_INLINE opus_int32 silk_abs(opus_int32 a){ silk_assert(a != 0x80000000); return (((a) > 0) ? (a) : -(a)); // Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN }*/ #undef silk_abs_int64 #define silk_abs_int64(a) silk_abs_int64_((a), __FILE__, __LINE__) -static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ +static OPUS_INLINE opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ if ( a == silk_int64_MIN ) { fprintf (stderr, "silk_abs_int64(%lld) in %s: line %d\n", (long long)a, file, line); @@ -885,7 +885,7 @@ static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ #undef silk_abs_int32 #define silk_abs_int32(a) silk_abs_int32_((a), __FILE__, __LINE__) -static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ +static OPUS_INLINE opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ if ( a == silk_int32_MIN ) { fprintf (stderr, "silk_abs_int32(%d) in %s: line %d\n", a, file, line); @@ -898,7 +898,7 @@ static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ #undef silk_CHECK_FIT8 #define silk_CHECK_FIT8(a) silk_CHECK_FIT8_((a), __FILE__, __LINE__) -static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ opus_int8 ret; ret = (opus_int8)a; if ( (opus_int64)ret != a ) @@ -913,7 +913,7 @@ static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ #undef silk_CHECK_FIT16 #define silk_CHECK_FIT16(a) silk_CHECK_FIT16_((a), __FILE__, __LINE__) -static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){ opus_int16 ret; ret = (opus_int16)a; if ( (opus_int64)ret != a ) @@ -928,7 +928,7 @@ static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ) #undef silk_CHECK_FIT32 #define silk_CHECK_FIT32(a) silk_CHECK_FIT32_((a), __FILE__, __LINE__) -static inline opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){ opus_int32 ret; ret = (opus_int32)a; if ( (opus_int64)ret != a ) diff --git a/lib/rbcodec/codecs/libopus/silk/NLSF2A.c b/lib/rbcodec/codecs/libopus/silk/NLSF2A.c index f9a09b0d5f..b1c559ea68 100644 --- a/lib/rbcodec/codecs/libopus/silk/NLSF2A.c +++ b/lib/rbcodec/codecs/libopus/silk/NLSF2A.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE. #define QA 16 /* helper function for NLSF2A(..) */ -static inline void silk_NLSF2A_find_poly( +static OPUS_INLINE void silk_NLSF2A_find_poly( opus_int32 *out, /* O intermediate polynomial, QA [dd+1] */ const opus_int32 *cLSF, /* I vector of interleaved 2*cos(LSFs), QA [d] */ opus_int dd /* I polynomial order (= 1/2 * filter order) */ diff --git a/lib/rbcodec/codecs/libopus/silk/NLSF_VQ_weights_laroia.c b/lib/rbcodec/codecs/libopus/silk/NLSF_VQ_weights_laroia.c index bd5f52d2b3..04894c59ab 100644 --- a/lib/rbcodec/codecs/libopus/silk/NLSF_VQ_weights_laroia.c +++ b/lib/rbcodec/codecs/libopus/silk/NLSF_VQ_weights_laroia.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/NLSF_decode.c b/lib/rbcodec/codecs/libopus/silk/NLSF_decode.c index 5845c37452..9f715060b8 100644 --- a/lib/rbcodec/codecs/libopus/silk/NLSF_decode.c +++ b/lib/rbcodec/codecs/libopus/silk/NLSF_decode.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "main.h" /* Predictive dequantizer for NLSF residuals */ -static inline void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ +static OPUS_INLINE void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ opus_int16 x_Q10[], /* O Output [ order ] */ const opus_int8 indices[], /* I Quantization indices [ order ] */ const opus_uint8 pred_coef_Q8[], /* I Backward predictor coefs [ order ] */ diff --git a/lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c b/lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c index e732992282..1fa1ea379b 100644 --- a/lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c +++ b/lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c b/lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c index d84eb8121d..17bd23f752 100644 --- a/lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c +++ b/lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/PLC.c b/lib/rbcodec/codecs/libopus/silk/PLC.c index d9fda74555..01f40014c4 100644 --- a/lib/rbcodec/codecs/libopus/silk/PLC.c +++ b/lib/rbcodec/codecs/libopus/silk/PLC.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -38,12 +38,12 @@ static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* static const opus_int16 PLC_RAND_ATTENUATE_V_Q15[NB_ATT] = { 31130, 26214 }; /* 0.95, 0.8 */ static const opus_int16 PLC_RAND_ATTENUATE_UV_Q15[NB_ATT] = { 32440, 29491 }; /* 0.99, 0.9 */ -static inline void silk_PLC_update( +static OPUS_INLINE void silk_PLC_update( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl /* I/O Decoder control */ ); -static inline void silk_PLC_conceal( +static OPUS_INLINE void silk_PLC_conceal( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[] /* O LPC residual signal */ @@ -92,7 +92,7 @@ void silk_PLC( /**************************************************/ /* Update state of PLC */ /**************************************************/ -static inline void silk_PLC_update( +static OPUS_INLINE void silk_PLC_update( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl /* I/O Decoder control */ ) @@ -165,7 +165,7 @@ static inline void silk_PLC_update( psPLC->nb_subfr = psDec->nb_subfr; } -static inline void silk_PLC_conceal( +static OPUS_INLINE void silk_PLC_conceal( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[] /* O LPC residual signal */ diff --git a/lib/rbcodec/codecs/libopus/silk/PLC.h b/lib/rbcodec/codecs/libopus/silk/PLC.h index 172c63ae83..f1e2eccc69 100644 --- a/lib/rbcodec/codecs/libopus/silk/PLC.h +++ b/lib/rbcodec/codecs/libopus/silk/PLC.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. 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. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -227,7 +227,8 @@ void silk_autocorr( opus_int *scale, /* O Scaling of the correlation vector */ const opus_int16 *inputData, /* I Input data to correlate */ const opus_int inputDataSize, /* I Length of input */ - const opus_int correlationCount /* I Number of correlation taps to compute */ + const opus_int correlationCount, /* I Number of correlation taps to compute */ + int arch /* I Run-time architecture */ ); void silk_decode_pitch( @@ -249,7 +250,8 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */ const opus_int Fs_kHz, /* I Sample frequency (kHz) */ const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ - const opus_int nb_subfr /* I number of 5 ms subframes */ + const opus_int nb_subfr, /* I number of 5 ms subframes */ + int arch /* I Run-time architecture */ ); /* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients */ @@ -309,7 +311,8 @@ void silk_burg_modified( const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */ const opus_int nb_subfr, /* I Number of subframes stacked in x */ - const opus_int D /* I Order */ + const opus_int D, /* I Order */ + int arch /* I Run-time architecture */ ); /* Copy and multiply a vector by a constant */ @@ -358,8 +361,8 @@ opus_int64 silk_inner_prod16_aligned_64( /* Rotate a32 right by 'rot' bits. Negative rot values result in rotating left. Output is 32bit int. Note: contemporary compilers recognize the C expression below and - compile it into a 'ror' instruction if available. No need for inline ASM! */ -static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) + compile it into a 'ror' instruction if available. No need for OPUS_INLINE ASM! */ +static OPUS_INLINE opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) { opus_uint32 x = (opus_uint32) a32; opus_uint32 r = (opus_uint32) rot; @@ -508,37 +511,37 @@ static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) #define SILK_FIX_CONST( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5)) /* silk_min() versions with typecast in the function call */ -static inline opus_int silk_min_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b) { return (((a) < (b)) ? (a) : (b)); } /* silk_min() versions with typecast in the function call */ -static inline opus_int silk_max_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) { return (((a) > (b)) ? (a) : (b)); } @@ -576,11 +579,11 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) #include "MacroCount.h" #include "MacroDebug.h" -#ifdef ARMv4_ASM +#ifdef OPUS_ARM_INLINE_ASM #include "arm/SigProc_FIX_armv4.h" #endif -#ifdef ARMv5E_ASM +#ifdef OPUS_ARM_INLINE_EDSP #include "arm/SigProc_FIX_armv5e.h" #endif diff --git a/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv4.h b/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv4.h index d69573e3d4..ff62b1e5d6 100644 --- a/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv4.h +++ b/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv4.h @@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #define SILK_SIGPROC_FIX_ARMv4_H #undef silk_MLA -static inline opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b, opus_int32 c) { opus_int32 res; diff --git a/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv5e.h b/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv5e.h index 81a6324f65..617a09cab1 100644 --- a/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv5e.h +++ b/lib/rbcodec/codecs/libopus/silk/arm/SigProc_FIX_armv5e.h @@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #define SILK_SIGPROC_FIX_ARMv5E_H #undef silk_SMULTT -static inline opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b) { opus_int32 res; __asm__( @@ -44,7 +44,7 @@ static inline opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b) #define silk_SMULTT(a, b) (silk_SMULTT_armv5e(a, b)) #undef silk_SMLATT -static inline opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b, opus_int32 c) { opus_int32 res; diff --git a/lib/rbcodec/codecs/libopus/silk/arm/macros_armv4.h b/lib/rbcodec/codecs/libopus/silk/arm/macros_armv4.h index 58df6c2e2b..3f30e97288 100644 --- a/lib/rbcodec/codecs/libopus/silk/arm/macros_armv4.h +++ b/lib/rbcodec/codecs/libopus/silk/arm/macros_armv4.h @@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #undef silk_SMULWB -static inline opus_int32 silk_SMULWB_armv4(opus_int32 a, opus_int16 b) +static OPUS_INLINE opus_int32 silk_SMULWB_armv4(opus_int32 a, opus_int16 b) { unsigned rd_lo; int rd_hi; @@ -50,7 +50,7 @@ static inline opus_int32 silk_SMULWB_armv4(opus_int32 a, opus_int16 b) /* (a32 * (b32 >> 16)) >> 16 */ #undef silk_SMULWT -static inline opus_int32 silk_SMULWT_armv4(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULWT_armv4(opus_int32 a, opus_int32 b) { unsigned rd_lo; int rd_hi; @@ -70,7 +70,7 @@ static inline opus_int32 silk_SMULWT_armv4(opus_int32 a, opus_int32 b) /* (a32 * b32) >> 16 */ #undef silk_SMULWW -static inline opus_int32 silk_SMULWW_armv4(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULWW_armv4(opus_int32 a, opus_int32 b) { unsigned rd_lo; int rd_hi; @@ -85,7 +85,7 @@ static inline opus_int32 silk_SMULWW_armv4(opus_int32 a, opus_int32 b) #define silk_SMULWW(a, b) (silk_SMULWW_armv4(a, b)) #undef silk_SMLAWW -static inline opus_int32 silk_SMLAWW_armv4(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLAWW_armv4(opus_int32 a, opus_int32 b, opus_int32 c) { unsigned rd_lo; diff --git a/lib/rbcodec/codecs/libopus/silk/arm/macros_armv5e.h b/lib/rbcodec/codecs/libopus/silk/arm/macros_armv5e.h index 63b1e30f48..aad4117e46 100644 --- a/lib/rbcodec/codecs/libopus/silk/arm/macros_armv5e.h +++ b/lib/rbcodec/codecs/libopus/silk/arm/macros_armv5e.h @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #undef silk_SMULWB -static inline opus_int32 silk_SMULWB_armv5e(opus_int32 a, opus_int16 b) +static OPUS_INLINE opus_int32 silk_SMULWB_armv5e(opus_int32 a, opus_int16 b) { int res; __asm__( @@ -46,7 +46,7 @@ static inline opus_int32 silk_SMULWB_armv5e(opus_int32 a, opus_int16 b) /* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */ #undef silk_SMLAWB -static inline opus_int32 silk_SMLAWB_armv5e(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLAWB_armv5e(opus_int32 a, opus_int32 b, opus_int16 c) { int res; @@ -62,7 +62,7 @@ static inline opus_int32 silk_SMLAWB_armv5e(opus_int32 a, opus_int32 b, /* (a32 * (b32 >> 16)) >> 16 */ #undef silk_SMULWT -static inline opus_int32 silk_SMULWT_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULWT_armv5e(opus_int32 a, opus_int32 b) { int res; __asm__( @@ -77,7 +77,7 @@ static inline opus_int32 silk_SMULWT_armv5e(opus_int32 a, opus_int32 b) /* a32 + (b32 * (c32 >> 16)) >> 16 */ #undef silk_SMLAWT -static inline opus_int32 silk_SMLAWT_armv5e(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLAWT_armv5e(opus_int32 a, opus_int32 b, opus_int32 c) { int res; @@ -93,7 +93,7 @@ static inline opus_int32 silk_SMLAWT_armv5e(opus_int32 a, opus_int32 b, /* (opus_int32)((opus_int16)(a3))) * (opus_int32)((opus_int16)(b32)) output have to be 32bit int */ #undef silk_SMULBB -static inline opus_int32 silk_SMULBB_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULBB_armv5e(opus_int32 a, opus_int32 b) { int res; __asm__( @@ -108,7 +108,7 @@ static inline opus_int32 silk_SMULBB_armv5e(opus_int32 a, opus_int32 b) /* a32 + (opus_int32)((opus_int16)(b32)) * (opus_int32)((opus_int16)(c32)) output have to be 32bit int */ #undef silk_SMLABB -static inline opus_int32 silk_SMLABB_armv5e(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLABB_armv5e(opus_int32 a, opus_int32 b, opus_int32 c) { int res; @@ -124,7 +124,7 @@ static inline opus_int32 silk_SMLABB_armv5e(opus_int32 a, opus_int32 b, /* (opus_int32)((opus_int16)(a32)) * (b32 >> 16) */ #undef silk_SMULBT -static inline opus_int32 silk_SMULBT_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SMULBT_armv5e(opus_int32 a, opus_int32 b) { int res; __asm__( @@ -139,7 +139,7 @@ static inline opus_int32 silk_SMULBT_armv5e(opus_int32 a, opus_int32 b) /* a32 + (opus_int32)((opus_int16)(b32)) * (c32 >> 16) */ #undef silk_SMLABT -static inline opus_int32 silk_SMLABT_armv5e(opus_int32 a, opus_int32 b, +static OPUS_INLINE opus_int32 silk_SMLABT_armv5e(opus_int32 a, opus_int32 b, opus_int32 c) { int res; @@ -155,7 +155,7 @@ static inline opus_int32 silk_SMLABT_armv5e(opus_int32 a, opus_int32 b, /* add/subtract with output saturated */ #undef silk_ADD_SAT32 -static inline opus_int32 silk_ADD_SAT32_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_ADD_SAT32_armv5e(opus_int32 a, opus_int32 b) { int res; __asm__( @@ -169,7 +169,7 @@ static inline opus_int32 silk_ADD_SAT32_armv5e(opus_int32 a, opus_int32 b) #define silk_ADD_SAT32(a, b) (silk_ADD_SAT32_armv5e(a, b)) #undef silk_SUB_SAT32 -static inline opus_int32 silk_SUB_SAT32_armv5e(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_SUB_SAT32_armv5e(opus_int32 a, opus_int32 b) { int res; __asm__( @@ -183,7 +183,7 @@ static inline opus_int32 silk_SUB_SAT32_armv5e(opus_int32 a, opus_int32 b) #define silk_SUB_SAT32(a, b) (silk_SUB_SAT32_armv5e(a, b)) #undef silk_CLZ16 -static inline opus_int32 silk_CLZ16_armv5(opus_int16 in16) +static OPUS_INLINE opus_int32 silk_CLZ16_armv5(opus_int16 in16) { int res; __asm__( @@ -197,7 +197,7 @@ static inline opus_int32 silk_CLZ16_armv5(opus_int16 in16) #define silk_CLZ16(in16) (silk_CLZ16_armv5(in16)) #undef silk_CLZ32 -static inline opus_int32 silk_CLZ32_armv5(opus_int32 in32) +static OPUS_INLINE opus_int32 silk_CLZ32_armv5(opus_int32 in32) { int res; __asm__( diff --git a/lib/rbcodec/codecs/libopus/silk/bwexpander.c b/lib/rbcodec/codecs/libopus/silk/bwexpander.c index a0157b0606..2eb4456695 100644 --- a/lib/rbcodec/codecs/libopus/silk/bwexpander.c +++ b/lib/rbcodec/codecs/libopus/silk/bwexpander.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/bwexpander_32.c b/lib/rbcodec/codecs/libopus/silk/bwexpander_32.c index 80628cd7a7..d0010f73df 100644 --- a/lib/rbcodec/codecs/libopus/silk/bwexpander_32.c +++ b/lib/rbcodec/codecs/libopus/silk/bwexpander_32.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/code_signs.c b/lib/rbcodec/codecs/libopus/silk/code_signs.c index f9173278ab..561043c739 100644 --- a/lib/rbcodec/codecs/libopus/silk/code_signs.c +++ b/lib/rbcodec/codecs/libopus/silk/code_signs.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/control.h b/lib/rbcodec/codecs/libopus/silk/control.h index 77530f8feb..747e5426a0 100644 --- a/lib/rbcodec/codecs/libopus/silk/control.h +++ b/lib/rbcodec/codecs/libopus/silk/control.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -92,6 +92,9 @@ typedef struct { /* I: Opus encoder is allowing us to switch bandwidth */ opus_int opusCanSwitch; + /* I: Make frames as independent as possible (but still use LPC) */ + opus_int reducedDependency; + /* O: Internal sampling rate used, in Hertz; 8000/12000/16000 */ opus_int32 internalSampleRate; diff --git a/lib/rbcodec/codecs/libopus/silk/dec_API.c b/lib/rbcodec/codecs/libopus/silk/dec_API.c index 5b6e518130..4cbcf71514 100644 --- a/lib/rbcodec/codecs/libopus/silk/dec_API.c +++ b/lib/rbcodec/codecs/libopus/silk/dec_API.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -305,7 +305,7 @@ opus_int silk_Decode( /* O Returns error co /* Set up pointers to temp buffers */ ALLOC( samplesOut2_tmp, - decControl->nChannelsAPI == 2 ? *nSamplesOut : 0, opus_int16 ); + decControl->nChannelsAPI == 2 ? *nSamplesOut : ALLOC_NONE, opus_int16 ); if( decControl->nChannelsAPI == 2 ) { resample_out_ptr = samplesOut2_tmp; } else { diff --git a/lib/rbcodec/codecs/libopus/silk/decode_core.c b/lib/rbcodec/codecs/libopus/silk/decode_core.c index b298389f07..87fbd5de9f 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_core.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_core.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decode_frame.c b/lib/rbcodec/codecs/libopus/silk/decode_frame.c index a9ad7928ef..abc00a3d54 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_frame.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_frame.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decode_indices.c b/lib/rbcodec/codecs/libopus/silk/decode_indices.c index f5a2665107..7afe5c26c1 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_indices.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_indices.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decode_parameters.c b/lib/rbcodec/codecs/libopus/silk/decode_parameters.c index fa72395c3b..e345b1dcef 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_parameters.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_parameters.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decode_pitch.c b/lib/rbcodec/codecs/libopus/silk/decode_pitch.c index f9e3e3bc2b..fedbc6a525 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_pitch.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_pitch.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decode_pulses.c b/lib/rbcodec/codecs/libopus/silk/decode_pulses.c index 2d8f28186f..e8a87c2ab7 100644 --- a/lib/rbcodec/codecs/libopus/silk/decode_pulses.c +++ b/lib/rbcodec/codecs/libopus/silk/decode_pulses.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c b/lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c index de410797ae..eef0fd25e1 100644 --- a/lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c +++ b/lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/define.h b/lib/rbcodec/codecs/libopus/silk/define.h index ee3a534b41..c47aca9f58 100644 --- a/lib/rbcodec/codecs/libopus/silk/define.h +++ b/lib/rbcodec/codecs/libopus/silk/define.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/errors.h b/lib/rbcodec/codecs/libopus/silk/errors.h index 00b67163c9..45070800f2 100644 --- a/lib/rbcodec/codecs/libopus/silk/errors.h +++ b/lib/rbcodec/codecs/libopus/silk/errors.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/gain_quant.c b/lib/rbcodec/codecs/libopus/silk/gain_quant.c index 47e747ee4a..ed084073b1 100644 --- a/lib/rbcodec/codecs/libopus/silk/gain_quant.c +++ b/lib/rbcodec/codecs/libopus/silk/gain_quant.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/init_decoder.c b/lib/rbcodec/codecs/libopus/silk/init_decoder.c index 68a20ae6b0..f887c67886 100644 --- a/lib/rbcodec/codecs/libopus/silk/init_decoder.c +++ b/lib/rbcodec/codecs/libopus/silk/init_decoder.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/log2lin.c b/lib/rbcodec/codecs/libopus/silk/log2lin.c index 50be565cb5..a692e009db 100644 --- a/lib/rbcodec/codecs/libopus/silk/log2lin.c +++ b/lib/rbcodec/codecs/libopus/silk/log2lin.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -41,7 +41,9 @@ opus_int32 silk_log2lin( if( inLog_Q7 < 0 ) { return 0; - } + } else if ( inLog_Q7 >= 3967 ) { + return silk_int32_MAX; + } out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); frac_Q7 = inLog_Q7 & 0x7F; diff --git a/lib/rbcodec/codecs/libopus/silk/macros.h b/lib/rbcodec/codecs/libopus/silk/macros.h index 97f03c886a..482dc3c6eb 100644 --- a/lib/rbcodec/codecs/libopus/silk/macros.h +++ b/lib/rbcodec/codecs/libopus/silk/macros.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -32,7 +32,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "config.h" #endif -/* This is an inline header file for general platform. */ +#include "opus_types.h" +#include "opus_defines.h" + +/* This is an OPUS_INLINE header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_int16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16)) @@ -78,12 +81,12 @@ POSSIBILITY OF SUCH DAMAGE. #include "ecintrin.h" -static inline opus_int32 silk_CLZ16(opus_int16 in16) +static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16) { return 32 - EC_ILOG(in16<<16|0x8000); } -static inline opus_int32 silk_CLZ32(opus_int32 in32) +static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32) { return in32 ? 32 - EC_ILOG(in32) : 32; } @@ -100,15 +103,15 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32) (*((Matrix_base_adr) + ((row)+(M)*(column)))) #endif -#ifdef ARMv4_ASM +#ifdef OPUS_ARM_INLINE_ASM #include "arm/macros_armv4.h" #endif -#ifdef ARMv5E_ASM +#ifdef OPUS_ARM_INLINE_EDSP #include "arm/macros_armv5e.h" #endif -#ifdef CF_ASM +#ifdef OPUS_CF_INLINE_ASM #include "cf/macros_cf.h" #endif diff --git a/lib/rbcodec/codecs/libopus/silk/main.h b/lib/rbcodec/codecs/libopus/silk/main.h index 376c77c8b3..2bdf89784d 100644 --- a/lib/rbcodec/codecs/libopus/silk/main.h +++ b/lib/rbcodec/codecs/libopus/silk/main.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -204,6 +204,7 @@ void silk_quant_LTP_gains( opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (un)quantized LTP gains */ opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook Index */ opus_int8 *periodicity_index, /* O Periodicity Index */ + opus_int32 *sum_gain_dB_Q7, /* I/O Cumulative max prediction gain */ const opus_int32 W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Error Weights in Q18 */ opus_int mu_Q9, /* I Mu value (R/D tradeoff) */ opus_int lowComplexity, /* I Flag for low complexity */ @@ -214,11 +215,14 @@ void silk_quant_LTP_gains( void silk_VQ_WMat_EC( opus_int8 *ind, /* O index of best codebook vector */ opus_int32 *rate_dist_Q14, /* O best weighted quant error + mu * rate */ + opus_int *gain_Q7, /* O sum of absolute LTP coefficients */ const opus_int16 *in_Q14, /* I input vector to be quantized */ const opus_int32 *W_Q18, /* I weighting matrix */ const opus_int8 *cb_Q7, /* I codebook */ + const opus_uint8 *cb_gain_Q7, /* I codebook effective gain */ const opus_uint8 *cl_Q5, /* I code length for each codebook vector */ const opus_int mu_Q9, /* I tradeoff betw. weighted error and rate */ + const opus_int32 max_gain_Q7, /* I maximum sum of absolute LTP coefficients */ opus_int L /* I number of vectors in codebook */ ); diff --git a/lib/rbcodec/codecs/libopus/silk/pitch_est_defines.h b/lib/rbcodec/codecs/libopus/silk/pitch_est_defines.h index 1e4440121b..e1e4b5d768 100644 --- a/lib/rbcodec/codecs/libopus/silk/pitch_est_defines.h +++ b/lib/rbcodec/codecs/libopus/silk/pitch_est_defines.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c b/lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c index 38d6df4572..81a8bacaca 100644 --- a/lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c +++ b/lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler.c b/lib/rbcodec/codecs/libopus/silk/resampler.c index 624cae00ed..374fbb3722 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private.h b/lib/rbcodec/codecs/libopus/silk/resampler_private.h index 273f93e680..422a7d9d95 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private.h +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private_AR2.c b/lib/rbcodec/codecs/libopus/silk/resampler_private_AR2.c index 7377459159..5fff23714f 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private_AR2.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private_AR2.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c b/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c index ce9aff0907..c7b4f6ed5e 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "resampler_private.h" #include "stack_alloc.h" -static inline opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( +static OPUS_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( opus_int16 *out, opus_int16 *buf, opus_int32 max_index_Q16, diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private_down_FIR.c b/lib/rbcodec/codecs/libopus/silk/resampler_private_down_FIR.c index 163fedd818..783e42b356 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private_down_FIR.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private_down_FIR.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "resampler_private.h" #include "stack_alloc.h" -static inline opus_int16 *silk_resampler_private_down_FIR_INTERPOL( +static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( opus_int16 *out, opus_int32 *buf, const opus_int16 *FIR_Coefs, diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private_up2_HQ.c b/lib/rbcodec/codecs/libopus/silk/resampler_private_up2_HQ.c index e611d4206d..c7ec8de365 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private_up2_HQ.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private_up2_HQ.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_rom.c b/lib/rbcodec/codecs/libopus/silk/resampler_rom.c index edec0436e4..2d502706f9 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_rom.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_rom.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_rom.h b/lib/rbcodec/codecs/libopus/silk/resampler_rom.h index ffc7f5dabd..490b3388dc 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_rom.h +++ b/lib/rbcodec/codecs/libopus/silk/resampler_rom.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_structs.h b/lib/rbcodec/codecs/libopus/silk/resampler_structs.h index cbcac20fe7..9e9457d11c 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_structs.h +++ b/lib/rbcodec/codecs/libopus/silk/resampler_structs.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/shell_coder.c b/lib/rbcodec/codecs/libopus/silk/shell_coder.c index f402cc4328..9d6e1bb366 100644 --- a/lib/rbcodec/codecs/libopus/silk/shell_coder.c +++ b/lib/rbcodec/codecs/libopus/silk/shell_coder.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. /* shell coder; pulse-subframe length is hardcoded */ -static inline void combine_pulses( +static OPUS_INLINE void combine_pulses( opus_int *out, /* O combined pulses vector [len] */ const opus_int *in, /* I input vector [2 * len] */ const opus_int len /* I number of OUTPUT samples */ @@ -46,7 +46,7 @@ static inline void combine_pulses( } #if 0 -static inline void encode_split( +static OPUS_INLINE void encode_split( ec_enc *psRangeEnc, /* I/O compressor data structure */ const opus_int p_child1, /* I pulse amplitude of first child subframe */ const opus_int p, /* I pulse amplitude of current subframe */ @@ -59,7 +59,7 @@ static inline void encode_split( } #endif -static inline void decode_split( +static OPUS_INLINE void decode_split( opus_int *p_child1, /* O pulse amplitude of first child subframe */ opus_int *p_child2, /* O pulse amplitude of second child subframe */ ec_dec *psRangeDec, /* I/O Compressor data structure */ diff --git a/lib/rbcodec/codecs/libopus/silk/sort.c b/lib/rbcodec/codecs/libopus/silk/sort.c index b311e24c9f..2f9930d9ce 100644 --- a/lib/rbcodec/codecs/libopus/silk/sort.c +++ b/lib/rbcodec/codecs/libopus/silk/sort.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -83,6 +83,7 @@ void silk_insertion_sort_increasing( } } } +#endif #ifdef FIXED_POINT /* This function is only used by the fixed-point build */ @@ -132,7 +133,6 @@ void silk_insertion_sort_decreasing_int16( } } #endif -#endif void silk_insertion_sort_increasing_all_values_int16( opus_int16 *a, /* I/O Unsorted / Sorted vector */ diff --git a/lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c b/lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c index 22d61a5f1d..62521a4f35 100644 --- a/lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c +++ b/lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/stereo_decode_pred.c b/lib/rbcodec/codecs/libopus/silk/stereo_decode_pred.c index 586b4d81df..56ba3925e8 100644 --- a/lib/rbcodec/codecs/libopus/silk/stereo_decode_pred.c +++ b/lib/rbcodec/codecs/libopus/silk/stereo_decode_pred.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/structs.h b/lib/rbcodec/codecs/libopus/silk/structs.h index 8828f44d03..1826b36a80 100644 --- a/lib/rbcodec/codecs/libopus/silk/structs.h +++ b/lib/rbcodec/codecs/libopus/silk/structs.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -171,6 +171,7 @@ typedef struct { opus_int32 pitchEstimationThreshold_Q16; /* Threshold for pitch estimator */ opus_int LTPQuantLowComplexity; /* Flag for low complexity LTP quantization */ opus_int mu_LTP_Q9; /* Rate-distortion tradeoff in LTP quantization */ + opus_int32 sum_log_gain_Q7; /* Cumulative max prediction gain */ opus_int NLSF_MSVQ_Survivors; /* Number of survivors in NLSF MSVQ */ opus_int first_frame_after_reset; /* Flag for deactivating NLSF interpolation, pitch prediction */ opus_int controlled_since_last_payload; /* Flag for ensuring codec_control only runs once per packet */ @@ -191,6 +192,8 @@ typedef struct { SideInfoIndices indices; opus_int8 pulses[ MAX_FRAME_LENGTH ]; + int arch; + /* Input/output buffering */ opus_int16 inputBuf[ MAX_FRAME_LENGTH + 2 ]; /* Buffer containing input signal */ opus_int inputBufIx; diff --git a/lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c b/lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c index 815489a4a6..12514c9917 100644 --- a/lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c +++ b/lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c b/lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c index 93a7039c15..ec9dc63927 100644 --- a/lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c +++ b/lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables.h b/lib/rbcodec/codecs/libopus/silk/tables.h index 6e4b670647..a91431e854 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables.h +++ b/lib/rbcodec/codecs/libopus/silk/tables.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -78,6 +78,8 @@ extern const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[ NB_LTP_CBKS ]; extern const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[ NB_LTP_CBKS ]; /* 3 */ extern const opus_int16 silk_LTP_gain_middle_avg_RD_Q14; extern const opus_int8 * const silk_LTP_vq_ptrs_Q7[ NB_LTP_CBKS ]; /* 168 */ +extern const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS]; + extern const opus_int8 silk_LTP_vq_sizes[ NB_LTP_CBKS ]; /* 3 */ extern const opus_uint8 silk_LTPscale_iCDF[ 3 ]; /* 4 */ diff --git a/lib/rbcodec/codecs/libopus/silk/tables_LTP.c b/lib/rbcodec/codecs/libopus/silk/tables_LTP.c index d16a511cc2..ea518652b8 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_LTP.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_LTP.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -51,6 +51,7 @@ static const opus_uint8 silk_LTP_gain_iCDF_2[32] = { 24, 20, 16, 12, 9, 5, 2, 0 }; +#if 0 const opus_int16 silk_LTP_gain_middle_avg_RD_Q14 = 12304; static const opus_uint8 silk_LTP_gain_BITS_Q5_0[8] = { @@ -68,6 +69,7 @@ static const opus_uint8 silk_LTP_gain_BITS_Q5_2[32] = { 160, 160, 166, 166, 173, 173, 182, 192, 182, 192, 192, 192, 205, 192, 205, 224 }; +#endif const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = { silk_LTP_gain_iCDF_0, @@ -75,11 +77,13 @@ const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = { silk_LTP_gain_iCDF_2 }; +#if 0 const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[NB_LTP_CBKS] = { silk_LTP_gain_BITS_Q5_0, silk_LTP_gain_BITS_Q5_1, silk_LTP_gain_BITS_Q5_2 }; +#endif static const opus_int8 silk_LTP_gain_vq_0[8][5] = { @@ -267,6 +271,32 @@ const opus_int8 * const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS] = { (opus_int8 *)&silk_LTP_gain_vq_2[0][0] }; +#if 0 +/* Maximum frequency-dependent response of the pitch taps above, + computed as max(abs(freqz(taps))) */ +static const opus_uint8 silk_LTP_gain_vq_0_gain[8] = { + 46, 2, 90, 87, 93, 91, 82, 98 +}; + +static const opus_uint8 silk_LTP_gain_vq_1_gain[16] = { + 109, 120, 118, 12, 113, 115, 117, 119, + 99, 59, 87, 111, 63, 111, 112, 80 +}; + +static const opus_uint8 silk_LTP_gain_vq_2_gain[32] = { + 126, 124, 125, 124, 129, 121, 126, 23, + 132, 127, 127, 127, 126, 127, 122, 133, + 130, 134, 101, 118, 119, 145, 126, 86, + 124, 120, 123, 119, 170, 173, 107, 109 +}; + +const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS] = { + &silk_LTP_gain_vq_0_gain[0], + &silk_LTP_gain_vq_1_gain[0], + &silk_LTP_gain_vq_2_gain[0] +}; + const opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS] = { 8, 16, 32 }; +#endif diff --git a/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_NB_MB.c b/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_NB_MB.c index 492ed61d75..8c59d207aa 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_NB_MB.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_NB_MB.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_WB.c b/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_WB.c index 0806d32f9e..50af87eb2e 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_WB.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_WB.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables_gain.c b/lib/rbcodec/codecs/libopus/silk/tables_gain.c index 8cf7d643b2..37e41d890c 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_gain.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_gain.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables_other.c b/lib/rbcodec/codecs/libopus/silk/tables_other.c index e4204f9366..398686bf26 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_other.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_other.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c b/lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c index 97869b7331..e80cc59a27 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/tables_pulses_per_block.c b/lib/rbcodec/codecs/libopus/silk/tables_pulses_per_block.c index 91060572d1..c7c01c8893 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_pulses_per_block.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_pulses_per_block.c @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/lib/rbcodec/codecs/libopus/silk/typedef.h b/lib/rbcodec/codecs/libopus/silk/typedef.h index 073aa28cc7..97b7e709be 100644 --- a/lib/rbcodec/codecs/libopus/silk/typedef.h +++ b/lib/rbcodec/codecs/libopus/silk/typedef.h @@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE. #define SILK_TYPEDEF_H #include "opus_types.h" +#include "opus_defines.h" #ifndef FIXED_POINT # include @@ -63,7 +64,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifdef __GNUC__ __attribute__((noreturn)) #endif -static inline void _silk_fatal(const char *str, const char *file, int line) +static OPUS_INLINE void _silk_fatal(const char *str, const char *file, int line) { fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); abort(); -- cgit v1.2.3