123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- #ifndef SILK_SIGPROC_FLP_H
- #define SILK_SIGPROC_FLP_H
- #include "SigProc_FIX.h"
- #include "float_cast.h"
- #include <math.h>
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- void silk_bwexpander_FLP(
- silk_float *ar,
- const opus_int d,
- const silk_float chirp
- );
- silk_float silk_LPC_inverse_pred_gain_FLP(
- const silk_float *A,
- opus_int32 order
- );
- silk_float silk_schur_FLP(
- silk_float refl_coef[],
- const silk_float auto_corr[],
- opus_int order
- );
- void silk_k2a_FLP(
- silk_float *A,
- const silk_float *rc,
- opus_int32 order
- );
- void silk_autocorrelation_FLP(
- silk_float *results,
- const silk_float *inputData,
- opus_int inputDataSize,
- opus_int correlationCount
- );
- opus_int silk_pitch_analysis_core_FLP(
- const silk_float *frame,
- opus_int *pitch_out,
- opus_int16 *lagIndex,
- opus_int8 *contourIndex,
- silk_float *LTPCorr,
- opus_int prevLag,
- const silk_float search_thres1,
- const silk_float search_thres2,
- const opus_int Fs_kHz,
- const opus_int complexity,
- const opus_int nb_subfr,
- int arch
- );
- void silk_insertion_sort_decreasing_FLP(
- silk_float *a,
- opus_int *idx,
- const opus_int L,
- const opus_int K
- );
- silk_float silk_burg_modified_FLP(
- silk_float A[],
- const silk_float x[],
- const silk_float minInvGain,
- const opus_int subfr_length,
- const opus_int nb_subfr,
- const opus_int D
- );
- void silk_scale_vector_FLP(
- silk_float *data1,
- silk_float gain,
- opus_int dataSize
- );
- void silk_scale_copy_vector_FLP(
- silk_float *data_out,
- const silk_float *data_in,
- silk_float gain,
- opus_int dataSize
- );
- double silk_inner_product_FLP(
- const silk_float *data1,
- const silk_float *data2,
- opus_int dataSize
- );
- double silk_energy_FLP(
- const silk_float *data,
- opus_int dataSize
- );
- #define PI (3.1415926536f)
- #define silk_min_float( a, b ) (((a) < (b)) ? (a) : (b))
- #define silk_max_float( a, b ) (((a) > (b)) ? (a) : (b))
- #define silk_abs_float( a ) ((silk_float)fabs(a))
- static OPUS_INLINE silk_float silk_sigmoid( silk_float x )
- {
- return (silk_float)(1.0 / (1.0 + exp(-x)));
- }
- static OPUS_INLINE opus_int32 silk_float2int( silk_float x )
- {
- return (opus_int32)float2int( x );
- }
- static OPUS_INLINE void silk_float2short_array(
- opus_int16 *out,
- const silk_float *in,
- opus_int32 length
- )
- {
- opus_int32 k;
- for( k = length - 1; k >= 0; k-- ) {
- out[k] = silk_SAT16( (opus_int32)float2int( in[k] ) );
- }
- }
- static OPUS_INLINE void silk_short2float_array(
- silk_float *out,
- const opus_int16 *in,
- opus_int32 length
- )
- {
- opus_int32 k;
- for( k = length - 1; k >= 0; k-- ) {
- out[k] = (silk_float)in[k];
- }
- }
- static OPUS_INLINE silk_float silk_log2( double x )
- {
- return ( silk_float )( 3.32192809488736 * log10( x ) );
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|