mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-27 21:54:16 +00:00
FS-3486 --resolve update silk
This commit is contained in:
1 parent
b426ec0bfa
commit
fdf74f449f
148 files changed
+2723
-7653
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@@ -31,16 +31,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/* Initialize Silk Encoder state */
|
||||
/*********************************/
|
||||
SKP_int SKP_Silk_init_encoder_FIX(
|
||||
SKP_Silk_encoder_state_FIX *psEnc /* I/O Pointer to Silk encoder state */
|
||||
)
|
||||
{
|
||||
SKP_Silk_encoder_state_FIX *psEnc /* I/O Pointer to Silk FIX encoder state */
|
||||
) {
|
||||
SKP_int ret = 0;
|
||||
/* Clear the entire encoder state */
|
||||
SKP_memset( psEnc, 0, sizeof( SKP_Silk_encoder_state_FIX ) );
|
||||
|
||||
/* Initialize to 24 kHz sampling, 20 ms packets, 25 kbps, 0% packet loss, and init non-zero values */
|
||||
ret = SKP_Silk_control_encoder_FIX( psEnc, 24, 20, 25, 0, 0, 0, 10, 1 );
|
||||
|
||||
#if HIGH_PASS_INPUT
|
||||
psEnc->variable_HP_smth1_Q15 = 200844; /* = SKP_Silk_log2(70)_Q0; */
|
||||
psEnc->variable_HP_smth2_Q15 = 200844; /* = SKP_Silk_log2(70)_Q0; */
|
||||
@@ -48,17 +44,13 @@ SKP_int SKP_Silk_init_encoder_FIX(
|
||||
|
||||
/* Used to deactivate e.g. LSF interpolation and fluctuation reduction */
|
||||
psEnc->sCmn.first_frame_after_reset = 1;
|
||||
psEnc->sCmn.fs_kHz_changed = 0;
|
||||
psEnc->sCmn.LBRR_enabled = 0;
|
||||
|
||||
/* Initialize Silk VAD */
|
||||
ret += SKP_Silk_VAD_Init( &psEnc->sCmn.sVAD );
|
||||
|
||||
/* Initialize NSQ */
|
||||
psEnc->sNSQ.prev_inv_gain_Q16 = 65536; /* 1.0 in Q16 */
|
||||
psEnc->sNSQ_LBRR.prev_inv_gain_Q16 = 65536; /* 1.0 in Q16 */
|
||||
|
||||
psEnc->sCmn.bitstream_v = USE_BIT_STREAM_V;
|
||||
psEnc->sNSQ.prev_inv_gain_Q16 = 65536;
|
||||
psEnc->sNSQ_LBRR.prev_inv_gain_Q16 = 65536;
|
||||
|
||||
return( ret );
|
||||
}
|
||||
Reference in new issue
Block a user