Loading lib_com/prot.h +34 −1 Original line number Diff line number Diff line Loading @@ -2784,6 +2784,10 @@ void calc_tilt_bwe( const float *sp, /* i : input signal */ float *tilt, /* o : signal tilt */ const int16_t N /* i : signal length */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i : IVAS element mode */ #endif ); void fd_bwe_enc_init( Loading Loading @@ -7083,6 +7087,10 @@ void qlpc_avq( int16_t *nbbits, /* o : Number of quantization bits */ const int16_t core, /* i : core */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i" IVAS element mode */ #endif ); int16_t encode_lpc_avq( Loading @@ -7098,6 +7106,10 @@ int16_t dlpc_avq( float *LSF_Q, /* o : Quantized LSF vectors */ const int16_t numlpc, /* i : Number of sets of lpc */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); int16_t decode_lpc_avq( Loading @@ -7124,6 +7136,10 @@ int16_t vlpc_2st_cod( int16_t *indx, /* o : index[] (4 bits per words) */ const int16_t mode, /* i : 0=abs, >0=rel */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i" IVAS element mode */ #endif ); void vlpc_2st_dec( Loading @@ -7131,13 +7147,22 @@ void vlpc_2st_dec( int16_t *indx, /* i : index[] (4 bits per words) */ const int16_t mode, /* i : 0=abs, >0=rel */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, const int32_t sr_core ); const int32_t sr_core #ifdef FIX_I120_INV_SQRT , const int16_t element_mode #endif ); void mdct_window_sine( float *window, Loading Loading @@ -8367,6 +8392,10 @@ int16_t vad_proc( VAD_CLDFB_HANDLE hVAD_CLDFB, /* i/o: CLDFB VAD state */ int16_t *cldfb_addition, const int16_t vada_flag /* i : VAD flag */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void subband_FFT( Loading @@ -8389,6 +8418,10 @@ void frame_spec_dif_cor_rate( float spec_amp[], /* i : spectral amplitude */ float pre_spec_low_dif[], /* i/o: low spectrum different */ float f_tonality_rate[] /* o : tonality rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void ltd_stable( Loading lib_com/swb_bwe_com.c +14 −3 Original line number Diff line number Diff line Loading @@ -288,6 +288,10 @@ void calc_tilt_bwe( const float *sp, /* i : input signal */ float *tilt, /* o : signal tilt */ const int16_t N /* i : signal length */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i : IVAS element mode */ #endif ) { int16_t i; Loading @@ -309,9 +313,16 @@ void calc_tilt_bwe( } #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { *tilt = r1 * inv_sqrt( r0 ); #else } else { #endif *tilt = (float) ( r1 / sqrt( r0 ) ); #ifdef FIX_I120_INV_SQRT } #endif return; Loading lib_com/vlpc_2st_com.c +35 −10 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, const int32_t sr_core ) const int32_t sr_core #ifdef FIX_I120_INV_SQRT ,const int16_t element_mode #endif ) { int16_t i; float d[M + 1]; Loading @@ -75,25 +79,46 @@ void lsf_weight_2st( if ( mode == 0 ) { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 60.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* abs */ #else } else { #endif w[i] = (float) ( 60.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* abs */ #ifdef FIX_I120_INV_SQRT } #endif } else if ( mode == 1 ) { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 65.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* mid */ #else } else { #endif w[i] = (float) ( 65.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* mid */ #ifdef FIX_I120_INV_SQRT } #endif } else { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 63.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* rel2 */ #else } else { #endif w[i] = (float) ( 63.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* rel2 */ #ifdef FIX_I120_INV_SQRT } #endif } } Loading lib_dec/core_switching_dec.c +11 −2 Original line number Diff line number Diff line Loading @@ -1051,7 +1051,11 @@ void bw_switching_pre_proc( if ( st->core == ACELP_CORE && !( st->bfi == 1 && st->con_tcx == 1 ) && st->hBWE_FD != NULL && !( st->core_brate <= SID_2k40 && st->element_mode == IVAS_CPE_DFT && nchan_out == 2 ) && !( st->element_mode == IVAS_CPE_MDCT && nchan_out == 1 && st->idchan == 1 && last_element_brate <= IVAS_SID_4k4 ) ) { /* Calculate tilt of the ACELP core synthesis - needed in SWB BWE decoding */ calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame ); calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame #ifdef FIX_I120_INV_SQRT ,st->element_mode #endif ); } return; Loading @@ -1063,7 +1067,12 @@ void bw_switching_pre_proc( * Calculate tilt of the ACELP core synthesis *----------------------------------------------------------------------*/ calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame ); calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame #ifdef FIX_I120_INV_SQRT , st->element_mode #endif ); /*-------------------------------------------------------------------------------* * Calculate frequency energy of 0~3.2kHz and 3.2~6.4kHz the ACELP core synthesis Loading lib_dec/dlpc_avq.c +21 −4 Original line number Diff line number Diff line Loading @@ -51,13 +51,16 @@ int16_t dlpc_avq( float *LSF_Q, /* o : Quantized LSF vectors */ const int16_t numlpc, /* i : Number of sets of lpc */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ) { int16_t i, nbi, last; int16_t *p_index, q_type; /* Last LPC index */ if ( numlpc == 1 ) { last = 0; Loading @@ -77,7 +80,11 @@ int16_t dlpc_avq( vlpc_1st_dec( p_index[0], &LSF_Q[last], sr_core ); p_index++; vlpc_2st_dec( &LSF_Q[last], &p_index[0], 0, sr_core ); vlpc_2st_dec( &LSF_Q[last], &p_index[0], 0, sr_core #ifdef FIX_I120_INV_SQRT ,element_mode #endif ); nbi = 2 + p_index[0] + p_index[1]; p_index += nbi; Loading @@ -97,7 +104,12 @@ int16_t dlpc_avq( } vlpc_1st_dec( p_index[0], &LSF_Q[0], sr_core ); p_index++; vlpc_2st_dec( &LSF_Q[0], &p_index[0], 0, sr_core ); vlpc_2st_dec( &LSF_Q[0], &p_index[0], 0, sr_core #ifdef FIX_I120_INV_SQRT , element_mode #endif ); } else if ( q_type == 1 ) { Loading @@ -106,7 +118,12 @@ int16_t dlpc_avq( LSF_Q[i] = LSF_Q[M + i]; } vlpc_2st_dec( &LSF_Q[0], &p_index[0], 3, sr_core ); vlpc_2st_dec( &LSF_Q[0], &p_index[0], 3, sr_core #ifdef FIX_I120_INV_SQRT , element_mode #endif ); } nbi = 2 + p_index[0] + p_index[1]; Loading Loading
lib_com/prot.h +34 −1 Original line number Diff line number Diff line Loading @@ -2784,6 +2784,10 @@ void calc_tilt_bwe( const float *sp, /* i : input signal */ float *tilt, /* o : signal tilt */ const int16_t N /* i : signal length */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i : IVAS element mode */ #endif ); void fd_bwe_enc_init( Loading Loading @@ -7083,6 +7087,10 @@ void qlpc_avq( int16_t *nbbits, /* o : Number of quantization bits */ const int16_t core, /* i : core */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i" IVAS element mode */ #endif ); int16_t encode_lpc_avq( Loading @@ -7098,6 +7106,10 @@ int16_t dlpc_avq( float *LSF_Q, /* o : Quantized LSF vectors */ const int16_t numlpc, /* i : Number of sets of lpc */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); int16_t decode_lpc_avq( Loading @@ -7124,6 +7136,10 @@ int16_t vlpc_2st_cod( int16_t *indx, /* o : index[] (4 bits per words) */ const int16_t mode, /* i : 0=abs, >0=rel */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i" IVAS element mode */ #endif ); void vlpc_2st_dec( Loading @@ -7131,13 +7147,22 @@ void vlpc_2st_dec( int16_t *indx, /* i : index[] (4 bits per words) */ const int16_t mode, /* i : 0=abs, >0=rel */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, const int32_t sr_core ); const int32_t sr_core #ifdef FIX_I120_INV_SQRT , const int16_t element_mode #endif ); void mdct_window_sine( float *window, Loading Loading @@ -8367,6 +8392,10 @@ int16_t vad_proc( VAD_CLDFB_HANDLE hVAD_CLDFB, /* i/o: CLDFB VAD state */ int16_t *cldfb_addition, const int16_t vada_flag /* i : VAD flag */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void subband_FFT( Loading @@ -8389,6 +8418,10 @@ void frame_spec_dif_cor_rate( float spec_amp[], /* i : spectral amplitude */ float pre_spec_low_dif[], /* i/o: low spectrum different */ float f_tonality_rate[] /* o : tonality rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ); void ltd_stable( Loading
lib_com/swb_bwe_com.c +14 −3 Original line number Diff line number Diff line Loading @@ -288,6 +288,10 @@ void calc_tilt_bwe( const float *sp, /* i : input signal */ float *tilt, /* o : signal tilt */ const int16_t N /* i : signal length */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i : IVAS element mode */ #endif ) { int16_t i; Loading @@ -309,9 +313,16 @@ void calc_tilt_bwe( } #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { *tilt = r1 * inv_sqrt( r0 ); #else } else { #endif *tilt = (float) ( r1 / sqrt( r0 ) ); #ifdef FIX_I120_INV_SQRT } #endif return; Loading
lib_com/vlpc_2st_com.c +35 −10 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, const int32_t sr_core ) const int32_t sr_core #ifdef FIX_I120_INV_SQRT ,const int16_t element_mode #endif ) { int16_t i; float d[M + 1]; Loading @@ -75,25 +79,46 @@ void lsf_weight_2st( if ( mode == 0 ) { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 60.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* abs */ #else } else { #endif w[i] = (float) ( 60.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* abs */ #ifdef FIX_I120_INV_SQRT } #endif } else if ( mode == 1 ) { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 65.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* mid */ #else } else { #endif w[i] = (float) ( 65.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* mid */ #ifdef FIX_I120_INV_SQRT } #endif } else { #ifdef FIX_I120_INV_SQRT if ( element_mode != EVS_MONO ) { w[i] = (float) ( 63.0f / ( freq_div * inv_sqrt( d[i] * d[i + 1] ) ) ); /* rel2 */ #else } else { #endif w[i] = (float) ( 63.0f / ( freq_div / sqrt( d[i] * d[i + 1] ) ) ); /* rel2 */ #ifdef FIX_I120_INV_SQRT } #endif } } Loading
lib_dec/core_switching_dec.c +11 −2 Original line number Diff line number Diff line Loading @@ -1051,7 +1051,11 @@ void bw_switching_pre_proc( if ( st->core == ACELP_CORE && !( st->bfi == 1 && st->con_tcx == 1 ) && st->hBWE_FD != NULL && !( st->core_brate <= SID_2k40 && st->element_mode == IVAS_CPE_DFT && nchan_out == 2 ) && !( st->element_mode == IVAS_CPE_MDCT && nchan_out == 1 && st->idchan == 1 && last_element_brate <= IVAS_SID_4k4 ) ) { /* Calculate tilt of the ACELP core synthesis - needed in SWB BWE decoding */ calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame ); calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame #ifdef FIX_I120_INV_SQRT ,st->element_mode #endif ); } return; Loading @@ -1063,7 +1067,12 @@ void bw_switching_pre_proc( * Calculate tilt of the ACELP core synthesis *----------------------------------------------------------------------*/ calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame ); calc_tilt_bwe( old_syn_12k8_16k, &st->tilt_wb, st->L_frame #ifdef FIX_I120_INV_SQRT , st->element_mode #endif ); /*-------------------------------------------------------------------------------* * Calculate frequency energy of 0~3.2kHz and 3.2~6.4kHz the ACELP core synthesis Loading
lib_dec/dlpc_avq.c +21 −4 Original line number Diff line number Diff line Loading @@ -51,13 +51,16 @@ int16_t dlpc_avq( float *LSF_Q, /* o : Quantized LSF vectors */ const int16_t numlpc, /* i : Number of sets of lpc */ const int32_t sr_core /* i : internal sampling rate */ #ifdef FIX_I120_INV_SQRT , const int16_t element_mode /* i: IVAS element mode */ #endif ) { int16_t i, nbi, last; int16_t *p_index, q_type; /* Last LPC index */ if ( numlpc == 1 ) { last = 0; Loading @@ -77,7 +80,11 @@ int16_t dlpc_avq( vlpc_1st_dec( p_index[0], &LSF_Q[last], sr_core ); p_index++; vlpc_2st_dec( &LSF_Q[last], &p_index[0], 0, sr_core ); vlpc_2st_dec( &LSF_Q[last], &p_index[0], 0, sr_core #ifdef FIX_I120_INV_SQRT ,element_mode #endif ); nbi = 2 + p_index[0] + p_index[1]; p_index += nbi; Loading @@ -97,7 +104,12 @@ int16_t dlpc_avq( } vlpc_1st_dec( p_index[0], &LSF_Q[0], sr_core ); p_index++; vlpc_2st_dec( &LSF_Q[0], &p_index[0], 0, sr_core ); vlpc_2st_dec( &LSF_Q[0], &p_index[0], 0, sr_core #ifdef FIX_I120_INV_SQRT , element_mode #endif ); } else if ( q_type == 1 ) { Loading @@ -106,7 +118,12 @@ int16_t dlpc_avq( LSF_Q[i] = LSF_Q[M + i]; } vlpc_2st_dec( &LSF_Q[0], &p_index[0], 3, sr_core ); vlpc_2st_dec( &LSF_Q[0], &p_index[0], 3, sr_core #ifdef FIX_I120_INV_SQRT , element_mode #endif ); } nbi = 2 + p_index[0] + p_index[1]; Loading