summaryrefslogtreecommitdiff
path: root/drivers/opus/silk/float
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2016-05-01 12:48:46 -0300
committerGeorge Marques <george@gmarqu.es>2016-05-02 13:18:34 -0300
commit7c59d819a7ebb936d51ca032e66a2489e4080d08 (patch)
treedf6747620113a36812194db3456729aac2fa1b08 /drivers/opus/silk/float
parenta3d81cab8a97eeece54ebadb82c40532188b4d57 (diff)
Update Opus driver to 1.1.2
And opusfile to 0.7.
Diffstat (limited to 'drivers/opus/silk/float')
-rw-r--r--drivers/opus/silk/float/LPC_analysis_filter_FLP.c3
-rw-r--r--drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c3
-rw-r--r--drivers/opus/silk/float/LTP_analysis_filter_FLP.c3
-rw-r--r--drivers/opus/silk/float/LTP_scale_ctrl_FLP.c3
-rw-r--r--drivers/opus/silk/float/apply_sine_window_FLP.c3
-rw-r--r--drivers/opus/silk/float/autocorrelation_FLP.c3
-rw-r--r--drivers/opus/silk/float/burg_modified_FLP.c3
-rw-r--r--drivers/opus/silk/float/bwexpander_FLP.c3
-rw-r--r--drivers/opus/silk/float/corrMatrix_FLP.c3
-rw-r--r--drivers/opus/silk/float/encode_frame_FLP.c5
-rw-r--r--drivers/opus/silk/float/energy_FLP.c3
-rw-r--r--drivers/opus/silk/float/find_LPC_FLP.c5
-rw-r--r--drivers/opus/silk/float/find_LTP_FLP.c3
-rw-r--r--drivers/opus/silk/float/find_pitch_lags_FLP.c3
-rw-r--r--drivers/opus/silk/float/find_pred_coefs_FLP.c10
-rw-r--r--drivers/opus/silk/float/inner_product_FLP.c3
-rw-r--r--drivers/opus/silk/float/k2a_FLP.c3
-rw-r--r--drivers/opus/silk/float/levinsondurbin_FLP.c3
-rw-r--r--drivers/opus/silk/float/main_FLP.h5
-rw-r--r--drivers/opus/silk/float/noise_shape_analysis_FLP.c3
-rw-r--r--drivers/opus/silk/float/pitch_analysis_core_FLP.c7
-rw-r--r--drivers/opus/silk/float/prefilter_FLP.c3
-rw-r--r--drivers/opus/silk/float/process_gains_FLP.c3
-rw-r--r--drivers/opus/silk/float/regularize_correlations_FLP.c3
-rw-r--r--drivers/opus/silk/float/residual_energy_FLP.c3
-rw-r--r--drivers/opus/silk/float/scale_copy_vector_FLP.c3
-rw-r--r--drivers/opus/silk/float/scale_vector_FLP.c3
-rw-r--r--drivers/opus/silk/float/schur_FLP.c3
-rw-r--r--drivers/opus/silk/float/solve_LS_FLP.c3
-rw-r--r--drivers/opus/silk/float/sort_FLP.c3
-rw-r--r--drivers/opus/silk/float/structs_FLP.h3
-rw-r--r--drivers/opus/silk/float/warped_autocorrelation_FLP.c3
-rw-r--r--drivers/opus/silk/float/wrappers_FLP.c12
33 files changed, 18 insertions, 107 deletions
diff --git a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c b/drivers/opus/silk/float/LPC_analysis_filter_FLP.c
index 438b704fe9..344e52ade2 100644
--- a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c
+++ b/drivers/opus/silk/float/LPC_analysis_filter_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include <stdlib.h>
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c b/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c
index 2e86e269eb..f99a427623 100644
--- a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c
+++ b/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/SigProc_FIX.h"
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c b/drivers/opus/silk/float/LTP_analysis_filter_FLP.c
index 5919ceb928..853040d160 100644
--- a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c
+++ b/drivers/opus/silk/float/LTP_analysis_filter_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c b/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c
index c952d810af..4219c14c5b 100644
--- a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c
+++ b/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/apply_sine_window_FLP.c b/drivers/opus/silk/float/apply_sine_window_FLP.c
index e8aa197bb0..0d9c894cd8 100644
--- a/drivers/opus/silk/float/apply_sine_window_FLP.c
+++ b/drivers/opus/silk/float/apply_sine_window_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/autocorrelation_FLP.c b/drivers/opus/silk/float/autocorrelation_FLP.c
index f4b90ff32d..0b78b0230d 100644
--- a/drivers/opus/silk/float/autocorrelation_FLP.c
+++ b/drivers/opus/silk/float/autocorrelation_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/typedef.h"
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/burg_modified_FLP.c b/drivers/opus/silk/float/burg_modified_FLP.c
index 5a16334240..567990b850 100644
--- a/drivers/opus/silk/float/burg_modified_FLP.c
+++ b/drivers/opus/silk/float/burg_modified_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/bwexpander_FLP.c b/drivers/opus/silk/float/bwexpander_FLP.c
index b3de4f6453..c47bfa9433 100644
--- a/drivers/opus/silk/float/bwexpander_FLP.c
+++ b/drivers/opus/silk/float/bwexpander_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/corrMatrix_FLP.c b/drivers/opus/silk/float/corrMatrix_FLP.c
index 551f8578d7..e34b42b541 100644
--- a/drivers/opus/silk/float/corrMatrix_FLP.c
+++ b/drivers/opus/silk/float/corrMatrix_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
/**********************************************************************
* Correlation matrix computations for LS estimate.
diff --git a/drivers/opus/silk/float/encode_frame_FLP.c b/drivers/opus/silk/float/encode_frame_FLP.c
index c5973b8922..4e46a52ee8 100644
--- a/drivers/opus/silk/float/encode_frame_FLP.c
+++ b/drivers/opus/silk/float/encode_frame_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
@@ -47,7 +44,7 @@ void silk_encode_do_VAD_FLP(
/****************************/
/* Voice Activity Detection */
/****************************/
- silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1 );
+ silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.arch );
/**************************************************/
/* Convert speech activity into VAD and DTX flags */
diff --git a/drivers/opus/silk/float/energy_FLP.c b/drivers/opus/silk/float/energy_FLP.c
index 9c6fad48d7..443f52bb16 100644
--- a/drivers/opus/silk/float/energy_FLP.c
+++ b/drivers/opus/silk/float/energy_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/find_LPC_FLP.c b/drivers/opus/silk/float/find_LPC_FLP.c
index 2b8c54388f..162a490d1d 100644
--- a/drivers/opus/silk/float/find_LPC_FLP.c
+++ b/drivers/opus/silk/float/find_LPC_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/define.h"
#include "opus/silk/float/main_FLP.h"
@@ -99,6 +96,6 @@ void silk_find_LPC_FLP(
silk_A2NLSF_FLP( NLSF_Q15, a, psEncC->predictLPCOrder );
}
- silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 ||
+ silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 ||
( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) );
}
diff --git a/drivers/opus/silk/float/find_LTP_FLP.c b/drivers/opus/silk/float/find_LTP_FLP.c
index 2f66de4684..9c03eeb6a7 100644
--- a/drivers/opus/silk/float/find_LTP_FLP.c
+++ b/drivers/opus/silk/float/find_LTP_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/find_pitch_lags_FLP.c b/drivers/opus/silk/float/find_pitch_lags_FLP.c
index a2d582c734..bb7ef8ec2e 100644
--- a/drivers/opus/silk/float/find_pitch_lags_FLP.c
+++ b/drivers/opus/silk/float/find_pitch_lags_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include <stdlib.h>
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/find_pred_coefs_FLP.c b/drivers/opus/silk/float/find_pred_coefs_FLP.c
index 61eead7573..c0496ff1b5 100644
--- a/drivers/opus/silk/float/find_pred_coefs_FLP.c
+++ b/drivers/opus/silk/float/find_pred_coefs_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
@@ -67,7 +64,8 @@ void silk_find_pred_coefs_FLP(
/* Quantize LTP gain parameters */
silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex,
- &psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr );
+ &psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr,
+ psEnc->sCmn.arch );
/* Control LTP scaling */
silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding );
@@ -90,13 +88,13 @@ void silk_find_pred_coefs_FLP(
}
silk_memset( psEncCtrl->LTPCoef, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( silk_float ) );
psEncCtrl->LTPredCodGain = 0.0f;
- psEnc->sCmn.sum_log_gain_Q7 = 0;
+ psEnc->sCmn.sum_log_gain_Q7 = 0;
}
/* Limit on total predictive coding gain */
if( psEnc->sCmn.first_frame_after_reset ) {
minInvGain = 1.0f / MAX_PREDICTION_POWER_GAIN_AFTER_RESET;
- } else {
+ } else {
minInvGain = (silk_float)pow( 2, psEncCtrl->LTPredCodGain / 3 ) / MAX_PREDICTION_POWER_GAIN;
minInvGain /= 0.25f + 0.75f * psEncCtrl->coding_quality;
}
diff --git a/drivers/opus/silk/float/inner_product_FLP.c b/drivers/opus/silk/float/inner_product_FLP.c
index e5f0308448..0586c4d7fb 100644
--- a/drivers/opus/silk/float/inner_product_FLP.c
+++ b/drivers/opus/silk/float/inner_product_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/k2a_FLP.c b/drivers/opus/silk/float/k2a_FLP.c
index 71dc4c3c44..26ba94e610 100644
--- a/drivers/opus/silk/float/k2a_FLP.c
+++ b/drivers/opus/silk/float/k2a_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/levinsondurbin_FLP.c b/drivers/opus/silk/float/levinsondurbin_FLP.c
index 8fbca230a5..7e3c9d6531 100644
--- a/drivers/opus/silk/float/levinsondurbin_FLP.c
+++ b/drivers/opus/silk/float/levinsondurbin_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/main_FLP.h b/drivers/opus/silk/float/main_FLP.h
index 4ec8ddeefc..8f35177549 100644
--- a/drivers/opus/silk/float/main_FLP.h
+++ b/drivers/opus/silk/float/main_FLP.h
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "opus/silk/float/SigProc_FLP.h"
#include "opus/silk/SigProc_FIX.h"
#include "opus/silk/float/structs_FLP.h"
-#include "opus/silk/silk_main.h"
+#include "opus/silk/main.h"
#include "opus/silk/define.h"
#include "opus/silk/debug.h"
#include "opus/celt/entenc.h"
@@ -205,7 +205,8 @@ void silk_quant_LTP_gains_FLP(
const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */
const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */
const opus_int lowComplexity, /* I Flag for low complexity */
- const opus_int nb_subfr /* I number of subframes */
+ const opus_int nb_subfr, /* I number of subframes */
+ int arch /* I Run-time architecture */
);
/* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */
diff --git a/drivers/opus/silk/float/noise_shape_analysis_FLP.c b/drivers/opus/silk/float/noise_shape_analysis_FLP.c
index 5d8bc6332a..cbb8ba4470 100644
--- a/drivers/opus/silk/float/noise_shape_analysis_FLP.c
+++ b/drivers/opus/silk/float/noise_shape_analysis_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/pitch_analysis_core_FLP.c b/drivers/opus/silk/float/pitch_analysis_core_FLP.c
index 2689c5008b..6a48ae498c 100644
--- a/drivers/opus/silk/float/pitch_analysis_core_FLP.c
+++ b/drivers/opus/silk/float/pitch_analysis_core_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
/*****************************************************************************
* Pitch analyser function
@@ -182,8 +179,8 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced,
/* Calculate first vector products before loop */
cross_corr = xcorr[ max_lag_4kHz - min_lag_4kHz ];
- normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) +
- silk_energy_FLP( basis_ptr, sf_length_8kHz ) +
+ normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) +
+ silk_energy_FLP( basis_ptr, sf_length_8kHz ) +
sf_length_8kHz * 4000.0f;
C[ 0 ][ min_lag_4kHz ] += (silk_float)( 2 * cross_corr / normalizer );
diff --git a/drivers/opus/silk/float/prefilter_FLP.c b/drivers/opus/silk/float/prefilter_FLP.c
index 0298ef2f8e..0857888b91 100644
--- a/drivers/opus/silk/float/prefilter_FLP.c
+++ b/drivers/opus/silk/float/prefilter_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/process_gains_FLP.c b/drivers/opus/silk/float/process_gains_FLP.c
index bd5e7ee7a2..3a1e46f096 100644
--- a/drivers/opus/silk/float/process_gains_FLP.c
+++ b/drivers/opus/silk/float/process_gains_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/regularize_correlations_FLP.c b/drivers/opus/silk/float/regularize_correlations_FLP.c
index 397e45b10b..20e9074a0b 100644
--- a/drivers/opus/silk/float/regularize_correlations_FLP.c
+++ b/drivers/opus/silk/float/regularize_correlations_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/residual_energy_FLP.c b/drivers/opus/silk/float/residual_energy_FLP.c
index 50bc728b71..cc462a9e54 100644
--- a/drivers/opus/silk/float/residual_energy_FLP.c
+++ b/drivers/opus/silk/float/residual_energy_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/scale_copy_vector_FLP.c b/drivers/opus/silk/float/scale_copy_vector_FLP.c
index 8c5bfadb3a..2656963e88 100644
--- a/drivers/opus/silk/float/scale_copy_vector_FLP.c
+++ b/drivers/opus/silk/float/scale_copy_vector_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/scale_vector_FLP.c b/drivers/opus/silk/float/scale_vector_FLP.c
index 191b3d6041..ea2aa0e330 100644
--- a/drivers/opus/silk/float/scale_vector_FLP.c
+++ b/drivers/opus/silk/float/scale_vector_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/schur_FLP.c b/drivers/opus/silk/float/schur_FLP.c
index 631dbe093a..f2071db214 100644
--- a/drivers/opus/silk/float/schur_FLP.c
+++ b/drivers/opus/silk/float/schur_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/SigProc_FLP.h"
diff --git a/drivers/opus/silk/float/solve_LS_FLP.c b/drivers/opus/silk/float/solve_LS_FLP.c
index b3757ce03f..9d625c695d 100644
--- a/drivers/opus/silk/float/solve_LS_FLP.c
+++ b/drivers/opus/silk/float/solve_LS_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
#include "opus/silk/tuning_parameters.h"
diff --git a/drivers/opus/silk/float/sort_FLP.c b/drivers/opus/silk/float/sort_FLP.c
index f2570503a5..ed212c63c9 100644
--- a/drivers/opus/silk/float/sort_FLP.c
+++ b/drivers/opus/silk/float/sort_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
/* Insertion sort (fast for already almost sorted arrays): */
/* Best case: O(n) for an already sorted array */
diff --git a/drivers/opus/silk/float/structs_FLP.h b/drivers/opus/silk/float/structs_FLP.h
index 798aec2f43..9eb5eb05eb 100644
--- a/drivers/opus/silk/float/structs_FLP.h
+++ b/drivers/opus/silk/float/structs_FLP.h
@@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define SILK_STRUCTS_FLP_H
#include "opus/silk/typedef.h"
-#include "opus/silk/silk_main.h"
+#include "opus/silk/main.h"
#include "opus/silk/structs.h"
#ifdef __cplusplus
@@ -115,6 +115,7 @@ typedef struct {
typedef struct {
silk_encoder_state_FLP state_Fxx[ ENCODER_NUM_CHANNELS ];
stereo_enc_state sStereo;
+ opus_int32 nBitsUsedLBRR;
opus_int32 nBitsExceeded;
opus_int nChannelsAPI;
opus_int nChannelsInternal;
diff --git a/drivers/opus/silk/float/warped_autocorrelation_FLP.c b/drivers/opus/silk/float/warped_autocorrelation_FLP.c
index 092b998d93..b814661b92 100644
--- a/drivers/opus/silk/float/warped_autocorrelation_FLP.c
+++ b/drivers/opus/silk/float/warped_autocorrelation_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
diff --git a/drivers/opus/silk/float/wrappers_FLP.c b/drivers/opus/silk/float/wrappers_FLP.c
index 31586cf2a9..c80c618a92 100644
--- a/drivers/opus/silk/float/wrappers_FLP.c
+++ b/drivers/opus/silk/float/wrappers_FLP.c
@@ -24,10 +24,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-
-#ifdef OPUS_ENABLED
#include "opus/opus_config.h"
-#endif
#include "opus/silk/float/main_FLP.h"
@@ -161,10 +158,10 @@ void silk_NSQ_wrapper_FLP(
/* Call NSQ */
if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) {
silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14,
- AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14 );
+ AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14, psEnc->sCmn.arch );
} else {
silk_NSQ( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14,
- AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14 );
+ AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14, psEnc->sCmn.arch );
}
}
@@ -179,7 +176,8 @@ void silk_quant_LTP_gains_FLP(
const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */
const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */
const opus_int lowComplexity, /* I Flag for low complexity */
- const opus_int nb_subfr /* I number of subframes */
+ const opus_int nb_subfr, /* I number of subframes */
+ int arch /* I Run-time architecture */
)
{
opus_int i;
@@ -193,7 +191,7 @@ void silk_quant_LTP_gains_FLP(
W_Q18[ i ] = (opus_int32)silk_float2int( W[ i ] * 262144.0f );
}
- silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, W_Q18, mu_Q10, lowComplexity, nb_subfr );
+ silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, W_Q18, mu_Q10, lowComplexity, nb_subfr, arch );
for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) {
B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f );