Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/silk
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2011-09-28 23:44:53 +0400
committerGregory Maxwell <greg@xiph.org>2011-09-29 00:28:18 +0400
commit59647fdb655bf6dc363c155b23bc817d195dc17d (patch)
tree38ba24728a3b3d35ad6fcb46203282c9a6d49a1d /silk
parentafc8d53b1b1d4a740551b3bbf8c2ac45061786ed (diff)
Misc. silk/ cleanups: static inline things which are only used in one file.
Diffstat (limited to 'silk')
-rw-r--r--silk/NLSF_decode.c2
-rw-r--r--silk/PLC.c16
-rw-r--r--silk/PLC.h11
-rw-r--r--silk/SigProc_FIX.h7
-rw-r--r--silk/VAD.c8
-rw-r--r--silk/float/LPC_analysis_filter_FLP.c12
-rw-r--r--silk/float/encode_frame_FLP.c9
-rw-r--r--silk/float/main_FLP.h7
-rw-r--r--silk/float/solve_LS_FLP.c12
-rw-r--r--silk/main.h6
-rw-r--r--silk/resampler.c12
11 files changed, 42 insertions, 60 deletions
diff --git a/silk/NLSF_decode.c b/silk/NLSF_decode.c
index b6588c14..43f4f9fc 100644
--- a/silk/NLSF_decode.c
+++ b/silk/NLSF_decode.c
@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "main.h"
/* Predictive dequantizer for NLSF residuals */
-void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */
+static 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/silk/PLC.c b/silk/PLC.c
index d4029fb0..50e0ddae 100644
--- a/silk/PLC.c
+++ b/silk/PLC.c
@@ -37,6 +37,18 @@ 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(
+ silk_decoder_state *psDec, /* I/O Decoder state */
+ silk_decoder_control *psDecCtrl /* I/O Decoder control */
+);
+
+static inline void silk_PLC_conceal(
+ silk_decoder_state *psDec, /* I/O Decoder state */
+ silk_decoder_control *psDecCtrl, /* I/O Decoder control */
+ opus_int16 signal[] /* O LPC residual signal */
+);
+
+
void silk_PLC_Reset(
silk_decoder_state *psDec /* I/O Decoder state */
)
@@ -75,7 +87,7 @@ void silk_PLC(
/**************************************************/
/* Update state of PLC */
/**************************************************/
-void silk_PLC_update(
+static inline void silk_PLC_update(
silk_decoder_state *psDec, /* (I/O) Decoder state */
silk_decoder_control *psDecCtrl /* (I/O) Decoder control */
)
@@ -147,7 +159,7 @@ void silk_PLC_update(
silk_memcpy( psPLC->prevGain_Q16, psDecCtrl->Gains_Q16, psDec->nb_subfr * sizeof( opus_int32 ) );
}
-void silk_PLC_conceal(
+static 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 concealed signal */
diff --git a/silk/PLC.h b/silk/PLC.h
index ea6266f4..4d985a61 100644
--- a/silk/PLC.h
+++ b/silk/PLC.h
@@ -53,17 +53,6 @@ void silk_PLC(
opus_int lost /* I Loss flag */
);
-void silk_PLC_update(
- silk_decoder_state *psDec, /* I/O Decoder state */
- silk_decoder_control *psDecCtrl /* I/O Decoder control */
-);
-
-void silk_PLC_conceal(
- silk_decoder_state *psDec, /* I/O Decoder state */
- silk_decoder_control *psDecCtrl, /* I/O Decoder control */
- opus_int16 signal[] /* O LPC residual signal */
-);
-
void silk_PLC_glue_frames(
silk_decoder_state *psDec, /* I/O decoder state */
opus_int16 signal[], /* I/O signal */
diff --git a/silk/SigProc_FIX.h b/silk/SigProc_FIX.h
index 619f1733..a65ac13f 100644
--- a/silk/SigProc_FIX.h
+++ b/silk/SigProc_FIX.h
@@ -58,13 +58,6 @@ opus_int silk_resampler_init(
);
/*!
- * Clear the states of all resampling filters, without resetting sampling rate ratio
- */
-opus_int silk_resampler_clear(
- silk_resampler_state_struct *S /* I/O: Resampler state */
-);
-
-/*!
* Resampler: convert from one sampling rate to another
*/
opus_int silk_resampler(
diff --git a/silk/VAD.c b/silk/VAD.c
index 377b4058..5b13b903 100644
--- a/silk/VAD.c
+++ b/silk/VAD.c
@@ -32,6 +32,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#include "main.h"
+/* Silk VAD noise level estimation */
+static inline void silk_VAD_GetNoiseLevels(
+ const opus_int32 pX[ VAD_N_BANDS ], /* I subband energies */
+ silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */
+);
+
/**********************************/
/* Initialization of the Silk VAD */
/**********************************/
@@ -264,7 +270,7 @@ opus_int silk_VAD_GetSA_Q8( /* O Return value, 0 if
/**************************/
/* Noise level estimation */
/**************************/
-void silk_VAD_GetNoiseLevels(
+static inline void silk_VAD_GetNoiseLevels(
const opus_int32 pX[ VAD_N_BANDS ], /* I subband energies */
silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */
)
diff --git a/silk/float/LPC_analysis_filter_FLP.c b/silk/float/LPC_analysis_filter_FLP.c
index 66911530..c91ef0ba 100644
--- a/silk/float/LPC_analysis_filter_FLP.c
+++ b/silk/float/LPC_analysis_filter_FLP.c
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/************************************************/
/* 16th order LPC analysis filter, does not write first 16 samples */
-void silk_LPC_analysis_filter16_FLP(
+static inline void silk_LPC_analysis_filter16_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
@@ -78,7 +78,7 @@ void silk_LPC_analysis_filter16_FLP(
}
/* 14th order LPC analysis filter, does not write first 14 samples */
-void silk_LPC_analysis_filter14_FLP(
+static inline void silk_LPC_analysis_filter14_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
@@ -114,7 +114,7 @@ void silk_LPC_analysis_filter14_FLP(
}
/* 12th order LPC analysis filter, does not write first 12 samples */
-void silk_LPC_analysis_filter12_FLP(
+static inline void silk_LPC_analysis_filter12_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
@@ -148,7 +148,7 @@ void silk_LPC_analysis_filter12_FLP(
}
/* 10th order LPC analysis filter, does not write first 10 samples */
-void silk_LPC_analysis_filter10_FLP(
+static inline void silk_LPC_analysis_filter10_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
@@ -180,7 +180,7 @@ void silk_LPC_analysis_filter10_FLP(
}
/* 8th order LPC analysis filter, does not write first 8 samples */
-void silk_LPC_analysis_filter8_FLP(
+static inline void silk_LPC_analysis_filter8_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
@@ -210,7 +210,7 @@ void silk_LPC_analysis_filter8_FLP(
}
/* 6th order LPC analysis filter, does not write first 6 samples */
-void silk_LPC_analysis_filter6_FLP(
+static inline void silk_LPC_analysis_filter6_FLP(
silk_float r_LPC[], /* O LPC residual signal */
const silk_float PredCoef[], /* I LPC coefficients */
const silk_float s[], /* I Input signal */
diff --git a/silk/float/encode_frame_FLP.c b/silk/float/encode_frame_FLP.c
index 053bcae9..4d156a03 100644
--- a/silk/float/encode_frame_FLP.c
+++ b/silk/float/encode_frame_FLP.c
@@ -32,6 +32,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "main_FLP.h"
#include "tuning_parameters.h"
+/* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */
+static inline void silk_LBRR_encode_FLP(
+ silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */
+ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */
+ const silk_float xfw[] /* I Input signal */
+);
+
/****************/
/* Encode frame */
/****************/
@@ -212,7 +219,7 @@ TOC(ENCODE_FRAME)
}
/* Low-Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode excitation at lower bitrate */
-void silk_LBRR_encode_FLP(
+static inline void silk_LBRR_encode_FLP(
silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */
silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */
const silk_float xfw[] /* I Input signal */
diff --git a/silk/float/main_FLP.h b/silk/float/main_FLP.h
index b81c7dca..605fd384 100644
--- a/silk/float/main_FLP.h
+++ b/silk/float/main_FLP.h
@@ -60,13 +60,6 @@ opus_int silk_encode_frame_FLP(
ec_enc *psRangeEnc /* I/O compressor data structure */
);
-/* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */
-void silk_LBRR_encode_FLP(
- silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */
- silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */
- const silk_float xfw[] /* I Input signal */
-);
-
/* Initializes the Silk encoder state */
opus_int silk_init_encoder(
silk_encoder_state_FLP *psEnc /* I/O Encoder state FLP */
diff --git a/silk/float/solve_LS_FLP.c b/silk/float/solve_LS_FLP.c
index 8baf2c61..c04cb59d 100644
--- a/silk/float/solve_LS_FLP.c
+++ b/silk/float/solve_LS_FLP.c
@@ -37,7 +37,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Matrix D (only the diagonal elements returned in a vector)such that
* the symmetric matric A is given by A = L*D*L'.
**********************************************************************/
-void silk_LDL_FLP(
+static inline void silk_LDL_FLP(
silk_float *A, /* (I/O) Pointer to Symetric Square Matrix */
opus_int M, /* (I) Size of Matrix */
silk_float *L, /* (I/O) Pointer to Square Upper triangular Matrix */
@@ -48,7 +48,7 @@ void silk_LDL_FLP(
* Function to solve linear equation Ax = b, when A is a MxM lower
* triangular matrix, with ones on the diagonal.
**********************************************************************/
-void silk_SolveWithLowerTriangularWdiagOnes_FLP(
+static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP(
const silk_float *L, /* (I) Pointer to Lower Triangular Matrix */
opus_int M, /* (I) Dim of Matrix equation */
const silk_float *b, /* (I) b Vector */
@@ -59,7 +59,7 @@ void silk_SolveWithLowerTriangularWdiagOnes_FLP(
* Function to solve linear equation (A^T)x = b, when A is a MxM lower
* triangular, with ones on the diagonal. (ie then A^T is upper triangular)
**********************************************************************/
-void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP(
+static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP(
const silk_float *L, /* (I) Pointer to Lower Triangular Matrix */
opus_int M, /* (I) Dim of Matrix equation */
const silk_float *b, /* (I) b Vector */
@@ -109,7 +109,7 @@ void silk_solve_LDL_FLP(
silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( &L[ 0 ][ 0 ], M, T, x );
}
-void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP(
+static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP(
const silk_float *L, /* (I) Pointer to Lower Triangular Matrix */
opus_int M, /* (I) Dim of Matrix equation */
const silk_float *b, /* (I) b Vector */
@@ -131,7 +131,7 @@ void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP(
}
}
-void silk_SolveWithLowerTriangularWdiagOnes_FLP(
+static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP(
const silk_float *L, /* (I) Pointer to Lower Triangular Matrix */
opus_int M, /* (I) Dim of Matrix equation */
const silk_float *b, /* (I) b Vector */
@@ -153,7 +153,7 @@ void silk_SolveWithLowerTriangularWdiagOnes_FLP(
}
}
-void silk_LDL_FLP(
+static inline void silk_LDL_FLP(
silk_float *A, /* (I/O) Pointer to Symetric Square Matrix */
opus_int M, /* (I) Size of Matrix */
silk_float *L, /* (I/O) Pointer to Square Upper triangular Matrix */
diff --git a/silk/main.h b/silk/main.h
index c3178ba4..c30c63ff 100644
--- a/silk/main.h
+++ b/silk/main.h
@@ -268,12 +268,6 @@ opus_int silk_VAD_Init( /* O Return value, 0 if
silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */
);
-/* Silk VAD noise level estimation */
-void silk_VAD_GetNoiseLevels(
- const opus_int32 pX[ VAD_N_BANDS ], /* I subband energies */
- silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */
-);
-
/* Get speech activity level in Q8 */
opus_int silk_VAD_GetSA_Q8( /* O Return value, 0 if success */
silk_encoder_state *psEncC, /* I/O Encoder state */
diff --git a/silk/resampler.c b/silk/resampler.c
index 377ef271..3102d42b 100644
--- a/silk/resampler.c
+++ b/silk/resampler.c
@@ -141,18 +141,6 @@ opus_int silk_resampler_init(
return 0;
}
-/* Clear the states of all resampling filters, without resetting sampling rate ratio */
-opus_int silk_resampler_clear(
- silk_resampler_state_struct *S /* I/O: Resampler state */
-)
-{
- /* Clear state */
- silk_memset( S->sDown2, 0, sizeof( S->sDown2 ) );
- silk_memset( S->sIIR, 0, sizeof( S->sIIR ) );
- silk_memset( S->sFIR, 0, sizeof( S->sFIR ) );
- return 0;
-}
-
/* Resampler: convert from one sampling rate to another */
opus_int silk_resampler(
silk_resampler_state_struct *S, /* I/O: Resampler state */