Loading lib_com/gs_bitallocation_ivas_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "ivas_prot.h" /* Function prototypes */ #include "assert.h" /* Debug prototypes */ #include "stl.h" #include "ivas_prot_fx.h" static void reajust_bits_fx( Word32 *bits_per_bands, const Word16 st_band, const Word16 end_band, const Word16 sum_bit_in, const Word16 bit_bdgt_in ); Loading lib_com/ivas_cov_smooth.c +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "wmc_auto.h" #include "prot.h" #include "prot_fx.h" #include "ivas_prot_fx.h" /*-----------------------------------------------------------------------------------------* * Local constants Loading lib_com/ivas_filters.c +18 −12 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ #include "wmc_auto.h" #ifdef IVAS_FLOAT_FIXED #include "ivas_rom_com.h" #include "ivas_prot_fx.h" #endif /*------------------------------------------------------------------------------------------* Loading @@ -46,7 +47,12 @@ #ifndef IVAS_FLOAT_FIXED static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length, const int16_t stage ); #else static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, const Word16 length, const Word16 stage, Word16 *pIn_Out_e ); static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, // Q(31-*pIn_Out_e) const Word16 length, const Word16 stage, Word16 *pIn_Out_e ); #endif /*-----------------------------------------------------------------------------------------* * Function ivas_filters_init() Loading Loading @@ -102,7 +108,7 @@ void ivas_filters_init( #else void ivas_filters_init_fx( ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const Word32 *filt_coeff_fx, /* i : filter coefficients */ const Word32 *filt_coeff_fx, /* i : filter coefficients Q31- *filt_coeff_e */ const Word16 *filt_coeff_e, /* i : exponents of filter coefficients */ const Word16 order ) /* i : filter order */ { Loading Loading @@ -233,7 +239,7 @@ void ivas_filter_process( #else void ivas_filter_process_fx( ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ Word32 *pIn_Out_fx, /* i/o: signal subject to filtering */ Word32 *pIn_Out_fx, /* i/o: signal subject to filtering Q(q_factor) */ const Word16 length, /* i : filter order */ Word16 q_factor ) { Loading @@ -248,7 +254,7 @@ void ivas_filter_process_fx( /* Scale pIn_Out_fx back to input Q */ FOR( i = 0; i < length; i++ ) { pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); // Q(31-pIn_Out_e[i]) -> Q(q_factor) move32(); } BREAK; Loading @@ -261,7 +267,7 @@ void ivas_filter_process_fx( /* Scale pIn_Out_fx back to input Q */ FOR( i = 0; i < length; i++ ) { pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); // Q(31-pIn_Out_e[i]) -> Q(q_factor) move32(); } BREAK; Loading Loading @@ -308,7 +314,7 @@ static void ivas_iir_2_filter( #else static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, Word32 *pIn_Out_fx, // Q(31-*pIn_Out_e) const Word16 length, const Word16 stage, Word16 *pIn_Out_e ) Loading @@ -330,23 +336,23 @@ static void ivas_iir_2_filter_fx( tmp_pIn_buf_i_e = pIn_Out_e[i]; move16(); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][0], pIn_fx[i] ); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][0], pIn_fx[i] ); // Q31 -(pIn_Out_e[i]+ filter_state->num_e[stage][0]) L_prod_e = add( pIn_Out_e[i], filter_state->num_e[stage][0] ); pOut_fx[i] = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][0], filter_state->state_e[stage][0], L_tmp_prod, L_prod_e, &pIn_Out_e[i] ); pOut_fx[i] = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][0], filter_state->state_e[stage][0], L_tmp_prod, L_prod_e, &pIn_Out_e[i] ); // Q31 - pIn_Out_e[i] move32(); FOR( j = 1; j < filter_state->filt_len; j++ ) { L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][j], tmp_pIn_buf_i_fx ); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][j], tmp_pIn_buf_i_fx ); // Q31-L_prod_e L_prod_e = add( filter_state->num_e[stage][j], tmp_pIn_buf_i_e ); L_tmp = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][j], filter_state->state_e[stage][j], L_tmp_prod, L_prod_e, &L_tmp_e ); L_tmp = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][j], filter_state->state_e[stage][j], L_tmp_prod, L_prod_e, &L_tmp_e ); // Q31 - L_tmp_e L_tmp_prod = Mpy_32_32( filter_state->den_fx[stage][j], pOut_fx[i] ); L_tmp_prod = Mpy_32_32( filter_state->den_fx[stage][j], pOut_fx[i] ); // Q31 - ( pIn_Out_e[i]+filter_state->den_e[stage][j] ) L_prod_e = add( pIn_Out_e[i], filter_state->den_e[stage][j] ); filter_state->state_fx[stage][j - 1] = BASOP_Util_Add_Mant32Exp( L_tmp, L_tmp_e, L_negate( L_tmp_prod ), L_prod_e, &filter_state->state_e[stage][j - 1] ); filter_state->state_fx[stage][j - 1] = BASOP_Util_Add_Mant32Exp( L_tmp, L_tmp_e, L_negate( L_tmp_prod ), L_prod_e, &filter_state->state_e[stage][j - 1] ); // Q31 - filter_state->state_e[stage][j - 1] move32(); } } Loading lib_com/ivas_ism_com.c +55 −54 Original line number Diff line number Diff line Loading @@ -52,10 +52,10 @@ #define BITS_ISM_INACTIVE ( BRATE_ISM_INACTIVE / FRAMES_PER_SEC ) #define BETA_ISM_LOW_IMP 0.6f #define BETA_ISM_LOW_IMP_Q31 ( 1288490189 ) #define BETA_ISM_LOW_IMP_Q31 ( 1288490189 ) // 0.6 in Q31 #define BETA_ISM_MEDIUM_IMP 0.8f #define BETA_ISM_MEDIUM_IMP_Q31 ( 1717986918 ) #define BETA_ISM_MEDIUM_IMP_BY_8_Q31 ( 214748365 ) #define BETA_ISM_MEDIUM_IMP_Q31 ( 1717986918 ) // 0.8 in Q31 #define BETA_ISM_MEDIUM_IMP_BY_8_Q31 ( 214748365 ) // 0.8 in Q29 #define MAX_BRATE_TCX_32k 48000 #define BITS_IVAS_512k ( IVAS_512k / FRAMES_PER_SEC ) Loading @@ -74,8 +74,8 @@ #ifdef IVAS_FLOAT_FIXED void bitbudget_to_brate( const Word16 x[], /* i : bitbudgets */ Word32 y[], /* o : bitrates */ const Word16 x[], /* i : bitbudgets Q0 */ Word32 y[], /* o : bitrates Q0 */ const Word16 N /* i : number of entries to be converted */ ) { Loading @@ -83,7 +83,7 @@ void bitbudget_to_brate( FOR( i = 0; i < N; i++ ) { y[i] = FRAMES_PER_SEC * x[i]; y[i] = L_mult0( FRAMES_PER_SEC, x[i] ); move32(); } Loading Loading @@ -466,10 +466,10 @@ ivas_error ivas_ism_config_fx( { /* combined format: decision about bitrates per channel - variable during the session (at one ivas_total_brate) */ // bits_ism = (Word16) ( ism_total_brate / FRAMES_PER_SEC ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); // 42949673 is 1/FRAMES_PER_SEC in Q31 tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); // Q15 - exp set16_fx( bits_element, shr( tmp1, sub( 15, exp ) ), n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); // Q0 move16(); /* ISM common signaling bits are counted in MASA MD bit-budget */ Loading @@ -480,17 +480,17 @@ ivas_error ivas_ism_config_fx( // bits_ism = (Word16) ( ism_total_brate / FRAMES_PER_SEC ); // 1 / 50 * 2 ^ 31 -- > 42949673, --> Q31, //(Q31 +Q0) - Q31 --> Q0 bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); // 42949673 is 1/FRAMES_PER_SEC in Q31 tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); // Q15 - exp set16_fx( bits_element, shr( tmp1, sub( 15, exp ) ), n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); // Q0 move16(); bitbudget_to_brate( bits_element, element_brate, n_ISms ); /* count ISm common signaling bits */ IF( hIsmMeta != NULL ) { nb_bits_metadata[0] = add( nb_bits_metadata[0], add( n_ISms * ISM_METADATA_FLAG_BITS, nchan_ism ) ); nb_bits_metadata[0] = add( nb_bits_metadata[0], add( imult1616( n_ISms, ISM_METADATA_FLAG_BITS ), nchan_ism ) ); move16(); IF( GE_32( ism_total_brate, ISM_EXTENDED_METADATA_BRATE ) ) Loading Loading @@ -534,9 +534,9 @@ ivas_error ivas_ism_config_fx( IF( nb_bits_metadata != NULL ) { bits_side = sum_s( nb_bits_metadata, n_ISms ); tmp1 = BASOP_Util_Divide1616_Scale( bits_side, n_ISms, &exp ); set16_fx( nb_bits_metadata, shr( tmp1, ( 15 - exp ) ), n_ISms ); nb_bits_metadata[n_ISms - 1] = add( nb_bits_metadata[n_ISms - 1], bits_side % n_ISms ); tmp1 = BASOP_Util_Divide1616_Scale( bits_side, n_ISms, &exp ); // Q15 - exp set16_fx( nb_bits_metadata, shr( tmp1, sub( 15, exp ) ), n_ISms ); nb_bits_metadata[n_ISms - 1] = add( nb_bits_metadata[n_ISms - 1], bits_side % n_ISms ); // Q0 move16(); v_sub_s( bits_element, nb_bits_metadata, bits_CoreCoder, n_ISms ); bitbudget_to_brate( bits_CoreCoder, total_brate, n_ISms ); Loading Loading @@ -629,7 +629,7 @@ ivas_error ivas_ism_config_fx( ELSE IF( EQ_16( ism_imp[ch], ISM_MEDIUM_IMP ) ) { // tmp = (Word16) ( BETA_ISM_MEDIUM_IMP * bits_CoreCoder[ch] ); tmp = extract_l( Mpy_32_32( BETA_ISM_MEDIUM_IMP_BY_8_Q31, L_shl( bits_CoreCoder[ch], Q3 ) ) ); tmp = extract_l( Mpy_32_32( BETA_ISM_MEDIUM_IMP_BY_8_Q31, L_shl( bits_CoreCoder[ch], Q3 ) ) ); // Q0 tmp = s_max( limit, tmp ); } ELSE /* ism_imp[ch] == ISM_HIGH_IMP */ Loading @@ -638,7 +638,7 @@ ivas_error ivas_ism_config_fx( move16(); } diff = add( diff, sub( bits_CoreCoder[ch], tmp ) ); diff = add( diff, sub( bits_CoreCoder[ch], tmp ) ); // Q0 bits_CoreCoder[ch] = tmp; move16(); } Loading @@ -646,8 +646,8 @@ ivas_error ivas_ism_config_fx( test(); IF( diff > 0 && n_higher > 0 ) { tmp = BASOP_Util_Divide1616_Scale( diff, n_higher, &exp ); tmp = shr( tmp, sub( 15, exp ) ); tmp = BASOP_Util_Divide1616_Scale( diff, n_higher, &exp ); // Q15-exp tmp = shr( tmp, sub( 15, exp ) ); // Q0 FOR( ch = 0; ch < n_ISms; ch++ ) { IF( flag_higher[ch] ) Loading Loading @@ -696,7 +696,7 @@ ivas_error ivas_ism_config_fx( diff = 0; move16(); limit_high = BITS_MAX_BRATE_TCX_32k; move16(); FOR( ch = 0; ch < n_ISms; ch++ ) { tmp = (Word16) s_min( bits_CoreCoder[ch], limit_high ); Loading Loading @@ -788,7 +788,7 @@ void ivas_ism_reset_metadata( move32(); hIsmMeta->pitch_fx = 0; move32(); hIsmMeta->radius_fx = 1 << 9; hIsmMeta->radius_fx = ONE_IN_Q9; // Q9 move16(); hIsmMeta->ism_metadata_flag = 0; Loading @@ -811,7 +811,7 @@ void ivas_ism_reset_metadata_enc( move32(); hIsmMeta->pitch_fx = 0; move32(); hIsmMeta->radius_fx = 1 << 9; // Q9 hIsmMeta->radius_fx = ONE_IN_Q9; // Q9 move16(); hIsmMeta->ism_metadata_flag = 0; move16(); Loading Loading @@ -897,8 +897,8 @@ Word16 ism_quant_meta_fx( { qlow_fx = borders_fx[1]; move32(); tmp = BASOP_Util_Divide3232_Scale( L_sub( borders_fx[1], borders_fx[0] ), q_step_border_fx, &tmp_e ); idx_start = shr( tmp, sub( 15, tmp_e ) ); tmp = BASOP_Util_Divide3232_Scale( L_sub( borders_fx[1], borders_fx[0] ), q_step_border_fx, &tmp_e ); // Q15-tmp_e idx_start = shr( tmp, sub( 15, tmp_e ) ); // Q0 step_fx = q_step_fx; move32(); } Loading @@ -906,21 +906,21 @@ Word16 ism_quant_meta_fx( { qlow_fx = borders_fx[2]; move32(); tmp = BASOP_Util_Divide3232_Scale( L_add( L_sub( borders_fx[3], borders_fx[2] ), L_sub( q_step_border_fx, ONE_IN_Q22 ) ), q_step_border_fx, &tmp_e ); idx_start = sub( cbsize, add( 1, shr( tmp, sub( 15, tmp_e ) ) ) ); tmp = BASOP_Util_Divide3232_Scale( L_add( L_sub( borders_fx[3], borders_fx[2] ), L_sub( q_step_border_fx, ONE_IN_Q22 ) ), q_step_border_fx, &tmp_e ); // Q15-tmp_e idx_start = sub( cbsize, add( 1, shr( tmp, sub( 15, tmp_e ) ) ) ); // Q0 step_fx = q_step_border_fx; move32(); } tmp = BASOP_Util_Divide3232_Scale( L_sub( val, qlow_fx ), step_fx, &tmp_e ); tmp = shl( tmp, sub( Q1, sub( 15, tmp_e ) ) ); tmp = BASOP_Util_Divide3232_Scale( L_sub( val, qlow_fx ), step_fx, &tmp_e ); // Q15-tmp_e tmp = shl( tmp, sub( Q1, sub( 15, tmp_e ) ) ); // Q0 tmp = add( tmp, 1 ); tmp = shr( tmp, 1 ); idx = add( idx_start, s_max( 0, s_min( sub( cbsize, 1 ), tmp ) ) ); idx = add( idx_start, s_max( 0, s_min( sub( cbsize, 1 ), tmp ) ) ); // Q0 // idx = idx_start + (int16_t) max( 0.f, min( cbsize - 1, ( ( val - qlow_fx ) / step_fx + 0.5f ) ) ); *valQ = L_add( imult3216( step_fx, sub( idx, idx_start ) ), qlow_fx ); *valQ = L_add( imult3216( step_fx, sub( idx, idx_start ) ), qlow_fx ); // Q0 move32(); return idx; Loading Loading @@ -973,11 +973,11 @@ int16_t ism_quant_meta( /*! r: dequantized value */ #ifdef IVAS_FLOAT_FIXED Word32 ism_dequant_meta_fx( Word32 ism_dequant_meta_fx( /* o : Q22*/ const Word16 idx, /* i : quantizer index */ const Word32 borders_fx[], /* i : level borders */ const Word32 q_step_fx, /* i : quantization step */ const Word32 q_step_border_fx, /* i : quantization step at the border */ const Word32 borders_fx[], /* i : level borders Q22*/ const Word32 q_step_fx, /* i : quantization step Q22 */ const Word32 q_step_border_fx, /* i : quantization step at the border Q22*/ const Word16 cbsize /* i : codebook size */ ) { Loading @@ -985,17 +985,17 @@ Word32 ism_dequant_meta_fx( Word32 qlow_fx, step_fx, valQ_fx; tmp1 = BASOP_Util_Divide3232_Scale( L_shr( L_sub( borders_fx[1], borders_fx[0] ), 21 ), L_shr( q_step_border_fx, 21 ), &exp1 ); tmp1 = shr( tmp1, sub( 15, exp1 ) ); tmp1 = shr( tmp1, sub( 15, exp1 ) ); // Q0 tmp2 = BASOP_Util_Divide3232_Scale( L_shr( L_sub( borders_fx[3], borders_fx[2] ), 21 ), L_shr( q_step_border_fx, 21 ), &exp2 ); tmp2 = shr( tmp2, sub( 15, exp2 ) ); tmp2 = shr( tmp2, sub( 15, exp2 ) ); // Q0 IF( LE_16( idx, tmp1 ) ) { qlow_fx = borders_fx[0]; qlow_fx = borders_fx[0]; // Q22 idx_start = 0; step_fx = q_step_border_fx; step_fx = q_step_border_fx; // Q22 move32(); move32(); Loading @@ -1003,9 +1003,9 @@ Word32 ism_dequant_meta_fx( } ELSE IF( LE_16( idx, sub( sub( cbsize, 1 ), tmp2 ) ) ) { qlow_fx = borders_fx[1]; qlow_fx = borders_fx[1]; // Q22 idx_start = tmp1; step_fx = q_step_fx; step_fx = q_step_fx; // Q22 move32(); move32(); Loading @@ -1015,14 +1015,14 @@ Word32 ism_dequant_meta_fx( { qlow_fx = borders_fx[2]; idx_start = (Word16) sub( sub( cbsize, 1 ), tmp2 ); step_fx = q_step_border_fx; step_fx = q_step_border_fx; // Q22 move32(); move32(); move16(); } valQ_fx = L_add( sub( idx, idx_start ) * step_fx, qlow_fx ); valQ_fx = L_add( sub( idx, idx_start ) * step_fx, qlow_fx ); // Q22 return valQ_fx; } Loading Loading @@ -1129,7 +1129,8 @@ void ivas_param_ism_config_fx( move16(); } hParamIsm->last_dmx_gain_fx = (Word16) 16384; hParamIsm->last_dmx_gain_fx = (Word16) 16384; // Q15-last_dmx_gain_e move16(); hParamIsm->last_dmx_gain_e = 1; move16(); set16_fx( hParamIsm->last_cardioid_left_fx, (Word16) 16384, MAX_NUM_OBJECTS ); Loading Loading @@ -1293,9 +1294,9 @@ void update_last_metadata_fx( { IF( EQ_16( updt_flag[ch], 1 ) ) { hIsmMeta[ch]->last_azimuth_fx = hIsmMeta[ch]->azimuth_fx; hIsmMeta[ch]->last_azimuth_fx = hIsmMeta[ch]->azimuth_fx; // Q22 move32(); hIsmMeta[ch]->last_elevation_fx = hIsmMeta[ch]->elevation_fx; hIsmMeta[ch]->last_elevation_fx = hIsmMeta[ch]->elevation_fx; // Q22 move32(); } } Loading @@ -1315,16 +1316,16 @@ void ivas_get_ism_sid_quan_bitbudget_fx( const Word16 nchan_ism, /* i : number of objects */ Word16 *nBits_azimuth, /* o : number of Q bits for azimuth */ Word16 *nBits_elevation, /* o : number of Q bits for elevation */ Word32 *q_step_fx, /* o : quantization step */ Word32 *q_step_border_fx, /* o : quantization step at the border */ Word32 *q_step_fx, /* o : quantization step Q22*/ Word32 *q_step_border_fx, /* o : quantization step at the border Q22*/ Word16 *nBits_coh, /* o : number of Q bits for coherence */ Word16 *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ) { *nBits_azimuth = ISM_DTX_AZI_BITS_HIGH; *nBits_elevation = ISM_DTX_ELE_BITS_HIGH; *q_step_fx = ISM_Q_STEP_HIGH_FX; *q_step_border_fx = ISM_Q_STEP_BORDER_HIGH_FX; *q_step_fx = ISM_Q_STEP_HIGH_FX; // Q22 *q_step_border_fx = ISM_Q_STEP_BORDER_HIGH_FX; // Q22 *nBits_coh = ISM_DTX_COH_SCA_BITS; *nBits_sce_id = 1; Loading @@ -1339,8 +1340,8 @@ void ivas_get_ism_sid_quan_bitbudget_fx( { *nBits_azimuth = ISM_DTX_AZI_BITS_LOW; *nBits_elevation = ISM_DTX_ELE_BITS_LOW; *q_step_fx = ISM_Q_STEP_LOW_FX; *q_step_border_fx = ISM_Q_STEP_BORDER_LOW_FX; *q_step_fx = ISM_Q_STEP_LOW_FX; // Q22 *q_step_border_fx = ISM_Q_STEP_BORDER_LOW_FX; // Q22 *nBits_sce_id = 2; move16(); Loading lib_com/ivas_lfe_com.c +9 −9 Original line number Diff line number Diff line Loading @@ -116,13 +116,13 @@ void ivas_lfe_lpf_select_filt_coeff_fx( SWITCH( sampling_rate ) { case 16000: *ppFilt_coeff_fx = ivas_lpf_2_butter_16k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_16k_fx; // Q30 BREAK; case 32000: *ppFilt_coeff_fx = ivas_lpf_2_butter_32k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_32k_fx; // Q30 BREAK; case 48000: *ppFilt_coeff_fx = ivas_lpf_2_butter_48k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_48k_fx; // Q30 BREAK; default: BREAK; Loading @@ -132,15 +132,15 @@ void ivas_lfe_lpf_select_filt_coeff_fx( SWITCH( sampling_rate ) { case 16000: *ppFilt_coeff_fx = ivas_lpf_4_butter_16k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_16k_sos_fx; // Q31-ivas_lpf_4_butter_16k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_16k_sos_e; BREAK; case 32000: *ppFilt_coeff_fx = ivas_lpf_4_butter_32k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_32k_sos_fx; // Q31-ivas_lpf_4_butter_32k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_32k_sos_e; BREAK; case 48000: *ppFilt_coeff_fx = ivas_lpf_4_butter_48k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_48k_sos_fx; // Q31-ivas_lpf_4_butter_48k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_48k_sos_e; BREAK; default: Loading Loading @@ -172,15 +172,15 @@ void ivas_lfe_window_init_fx( /* Set window coefficients */ IF( EQ_32( sampling_rate, 48000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_48k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_48k_fx; // Q31 } ELSE IF( EQ_32( sampling_rate, 32000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_32k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_32k_fx; // Q31 } ELSE IF( EQ_32( sampling_rate, 16000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_16k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_16k_fx; // Q31 } ELSE { Loading Loading
lib_com/gs_bitallocation_ivas_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "ivas_prot.h" /* Function prototypes */ #include "assert.h" /* Debug prototypes */ #include "stl.h" #include "ivas_prot_fx.h" static void reajust_bits_fx( Word32 *bits_per_bands, const Word16 st_band, const Word16 end_band, const Word16 sum_bit_in, const Word16 bit_bdgt_in ); Loading
lib_com/ivas_cov_smooth.c +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "wmc_auto.h" #include "prot.h" #include "prot_fx.h" #include "ivas_prot_fx.h" /*-----------------------------------------------------------------------------------------* * Local constants Loading
lib_com/ivas_filters.c +18 −12 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ #include "wmc_auto.h" #ifdef IVAS_FLOAT_FIXED #include "ivas_rom_com.h" #include "ivas_prot_fx.h" #endif /*------------------------------------------------------------------------------------------* Loading @@ -46,7 +47,12 @@ #ifndef IVAS_FLOAT_FIXED static void ivas_iir_2_filter( ivas_filters_process_state_t *filter_state, float *pIn_Out, const int16_t length, const int16_t stage ); #else static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, const Word16 length, const Word16 stage, Word16 *pIn_Out_e ); static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, // Q(31-*pIn_Out_e) const Word16 length, const Word16 stage, Word16 *pIn_Out_e ); #endif /*-----------------------------------------------------------------------------------------* * Function ivas_filters_init() Loading Loading @@ -102,7 +108,7 @@ void ivas_filters_init( #else void ivas_filters_init_fx( ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ const Word32 *filt_coeff_fx, /* i : filter coefficients */ const Word32 *filt_coeff_fx, /* i : filter coefficients Q31- *filt_coeff_e */ const Word16 *filt_coeff_e, /* i : exponents of filter coefficients */ const Word16 order ) /* i : filter order */ { Loading Loading @@ -233,7 +239,7 @@ void ivas_filter_process( #else void ivas_filter_process_fx( ivas_filters_process_state_t *filter_state, /* i/o: filter state handle */ Word32 *pIn_Out_fx, /* i/o: signal subject to filtering */ Word32 *pIn_Out_fx, /* i/o: signal subject to filtering Q(q_factor) */ const Word16 length, /* i : filter order */ Word16 q_factor ) { Loading @@ -248,7 +254,7 @@ void ivas_filter_process_fx( /* Scale pIn_Out_fx back to input Q */ FOR( i = 0; i < length; i++ ) { pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); // Q(31-pIn_Out_e[i]) -> Q(q_factor) move32(); } BREAK; Loading @@ -261,7 +267,7 @@ void ivas_filter_process_fx( /* Scale pIn_Out_fx back to input Q */ FOR( i = 0; i < length; i++ ) { pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); pIn_Out_fx[i] = L_shr_r_sat( pIn_Out_fx[i], sub( sub( 31, q_factor ), pIn_Out_e[i] ) ); // Q(31-pIn_Out_e[i]) -> Q(q_factor) move32(); } BREAK; Loading Loading @@ -308,7 +314,7 @@ static void ivas_iir_2_filter( #else static void ivas_iir_2_filter_fx( ivas_filters_process_state_t *filter_state, Word32 *pIn_Out_fx, Word32 *pIn_Out_fx, // Q(31-*pIn_Out_e) const Word16 length, const Word16 stage, Word16 *pIn_Out_e ) Loading @@ -330,23 +336,23 @@ static void ivas_iir_2_filter_fx( tmp_pIn_buf_i_e = pIn_Out_e[i]; move16(); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][0], pIn_fx[i] ); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][0], pIn_fx[i] ); // Q31 -(pIn_Out_e[i]+ filter_state->num_e[stage][0]) L_prod_e = add( pIn_Out_e[i], filter_state->num_e[stage][0] ); pOut_fx[i] = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][0], filter_state->state_e[stage][0], L_tmp_prod, L_prod_e, &pIn_Out_e[i] ); pOut_fx[i] = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][0], filter_state->state_e[stage][0], L_tmp_prod, L_prod_e, &pIn_Out_e[i] ); // Q31 - pIn_Out_e[i] move32(); FOR( j = 1; j < filter_state->filt_len; j++ ) { L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][j], tmp_pIn_buf_i_fx ); L_tmp_prod = Mpy_32_32( filter_state->num_fx[stage][j], tmp_pIn_buf_i_fx ); // Q31-L_prod_e L_prod_e = add( filter_state->num_e[stage][j], tmp_pIn_buf_i_e ); L_tmp = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][j], filter_state->state_e[stage][j], L_tmp_prod, L_prod_e, &L_tmp_e ); L_tmp = BASOP_Util_Add_Mant32Exp( filter_state->state_fx[stage][j], filter_state->state_e[stage][j], L_tmp_prod, L_prod_e, &L_tmp_e ); // Q31 - L_tmp_e L_tmp_prod = Mpy_32_32( filter_state->den_fx[stage][j], pOut_fx[i] ); L_tmp_prod = Mpy_32_32( filter_state->den_fx[stage][j], pOut_fx[i] ); // Q31 - ( pIn_Out_e[i]+filter_state->den_e[stage][j] ) L_prod_e = add( pIn_Out_e[i], filter_state->den_e[stage][j] ); filter_state->state_fx[stage][j - 1] = BASOP_Util_Add_Mant32Exp( L_tmp, L_tmp_e, L_negate( L_tmp_prod ), L_prod_e, &filter_state->state_e[stage][j - 1] ); filter_state->state_fx[stage][j - 1] = BASOP_Util_Add_Mant32Exp( L_tmp, L_tmp_e, L_negate( L_tmp_prod ), L_prod_e, &filter_state->state_e[stage][j - 1] ); // Q31 - filter_state->state_e[stage][j - 1] move32(); } } Loading
lib_com/ivas_ism_com.c +55 −54 Original line number Diff line number Diff line Loading @@ -52,10 +52,10 @@ #define BITS_ISM_INACTIVE ( BRATE_ISM_INACTIVE / FRAMES_PER_SEC ) #define BETA_ISM_LOW_IMP 0.6f #define BETA_ISM_LOW_IMP_Q31 ( 1288490189 ) #define BETA_ISM_LOW_IMP_Q31 ( 1288490189 ) // 0.6 in Q31 #define BETA_ISM_MEDIUM_IMP 0.8f #define BETA_ISM_MEDIUM_IMP_Q31 ( 1717986918 ) #define BETA_ISM_MEDIUM_IMP_BY_8_Q31 ( 214748365 ) #define BETA_ISM_MEDIUM_IMP_Q31 ( 1717986918 ) // 0.8 in Q31 #define BETA_ISM_MEDIUM_IMP_BY_8_Q31 ( 214748365 ) // 0.8 in Q29 #define MAX_BRATE_TCX_32k 48000 #define BITS_IVAS_512k ( IVAS_512k / FRAMES_PER_SEC ) Loading @@ -74,8 +74,8 @@ #ifdef IVAS_FLOAT_FIXED void bitbudget_to_brate( const Word16 x[], /* i : bitbudgets */ Word32 y[], /* o : bitrates */ const Word16 x[], /* i : bitbudgets Q0 */ Word32 y[], /* o : bitrates Q0 */ const Word16 N /* i : number of entries to be converted */ ) { Loading @@ -83,7 +83,7 @@ void bitbudget_to_brate( FOR( i = 0; i < N; i++ ) { y[i] = FRAMES_PER_SEC * x[i]; y[i] = L_mult0( FRAMES_PER_SEC, x[i] ); move32(); } Loading Loading @@ -466,10 +466,10 @@ ivas_error ivas_ism_config_fx( { /* combined format: decision about bitrates per channel - variable during the session (at one ivas_total_brate) */ // bits_ism = (Word16) ( ism_total_brate / FRAMES_PER_SEC ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); // 42949673 is 1/FRAMES_PER_SEC in Q31 tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); // Q15 - exp set16_fx( bits_element, shr( tmp1, sub( 15, exp ) ), n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); // Q0 move16(); /* ISM common signaling bits are counted in MASA MD bit-budget */ Loading @@ -480,17 +480,17 @@ ivas_error ivas_ism_config_fx( // bits_ism = (Word16) ( ism_total_brate / FRAMES_PER_SEC ); // 1 / 50 * 2 ^ 31 -- > 42949673, --> Q31, //(Q31 +Q0) - Q31 --> Q0 bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); bits_ism = (Word16) Mpy_32_32( 42949673, ism_total_brate ); // 42949673 is 1/FRAMES_PER_SEC in Q31 tmp1 = BASOP_Util_Divide1616_Scale( bits_ism, n_ISms, &exp ); // Q15 - exp set16_fx( bits_element, shr( tmp1, sub( 15, exp ) ), n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); bits_element[n_ISms - 1] = add( bits_element[n_ISms - 1], bits_ism % n_ISms ); // Q0 move16(); bitbudget_to_brate( bits_element, element_brate, n_ISms ); /* count ISm common signaling bits */ IF( hIsmMeta != NULL ) { nb_bits_metadata[0] = add( nb_bits_metadata[0], add( n_ISms * ISM_METADATA_FLAG_BITS, nchan_ism ) ); nb_bits_metadata[0] = add( nb_bits_metadata[0], add( imult1616( n_ISms, ISM_METADATA_FLAG_BITS ), nchan_ism ) ); move16(); IF( GE_32( ism_total_brate, ISM_EXTENDED_METADATA_BRATE ) ) Loading Loading @@ -534,9 +534,9 @@ ivas_error ivas_ism_config_fx( IF( nb_bits_metadata != NULL ) { bits_side = sum_s( nb_bits_metadata, n_ISms ); tmp1 = BASOP_Util_Divide1616_Scale( bits_side, n_ISms, &exp ); set16_fx( nb_bits_metadata, shr( tmp1, ( 15 - exp ) ), n_ISms ); nb_bits_metadata[n_ISms - 1] = add( nb_bits_metadata[n_ISms - 1], bits_side % n_ISms ); tmp1 = BASOP_Util_Divide1616_Scale( bits_side, n_ISms, &exp ); // Q15 - exp set16_fx( nb_bits_metadata, shr( tmp1, sub( 15, exp ) ), n_ISms ); nb_bits_metadata[n_ISms - 1] = add( nb_bits_metadata[n_ISms - 1], bits_side % n_ISms ); // Q0 move16(); v_sub_s( bits_element, nb_bits_metadata, bits_CoreCoder, n_ISms ); bitbudget_to_brate( bits_CoreCoder, total_brate, n_ISms ); Loading Loading @@ -629,7 +629,7 @@ ivas_error ivas_ism_config_fx( ELSE IF( EQ_16( ism_imp[ch], ISM_MEDIUM_IMP ) ) { // tmp = (Word16) ( BETA_ISM_MEDIUM_IMP * bits_CoreCoder[ch] ); tmp = extract_l( Mpy_32_32( BETA_ISM_MEDIUM_IMP_BY_8_Q31, L_shl( bits_CoreCoder[ch], Q3 ) ) ); tmp = extract_l( Mpy_32_32( BETA_ISM_MEDIUM_IMP_BY_8_Q31, L_shl( bits_CoreCoder[ch], Q3 ) ) ); // Q0 tmp = s_max( limit, tmp ); } ELSE /* ism_imp[ch] == ISM_HIGH_IMP */ Loading @@ -638,7 +638,7 @@ ivas_error ivas_ism_config_fx( move16(); } diff = add( diff, sub( bits_CoreCoder[ch], tmp ) ); diff = add( diff, sub( bits_CoreCoder[ch], tmp ) ); // Q0 bits_CoreCoder[ch] = tmp; move16(); } Loading @@ -646,8 +646,8 @@ ivas_error ivas_ism_config_fx( test(); IF( diff > 0 && n_higher > 0 ) { tmp = BASOP_Util_Divide1616_Scale( diff, n_higher, &exp ); tmp = shr( tmp, sub( 15, exp ) ); tmp = BASOP_Util_Divide1616_Scale( diff, n_higher, &exp ); // Q15-exp tmp = shr( tmp, sub( 15, exp ) ); // Q0 FOR( ch = 0; ch < n_ISms; ch++ ) { IF( flag_higher[ch] ) Loading Loading @@ -696,7 +696,7 @@ ivas_error ivas_ism_config_fx( diff = 0; move16(); limit_high = BITS_MAX_BRATE_TCX_32k; move16(); FOR( ch = 0; ch < n_ISms; ch++ ) { tmp = (Word16) s_min( bits_CoreCoder[ch], limit_high ); Loading Loading @@ -788,7 +788,7 @@ void ivas_ism_reset_metadata( move32(); hIsmMeta->pitch_fx = 0; move32(); hIsmMeta->radius_fx = 1 << 9; hIsmMeta->radius_fx = ONE_IN_Q9; // Q9 move16(); hIsmMeta->ism_metadata_flag = 0; Loading @@ -811,7 +811,7 @@ void ivas_ism_reset_metadata_enc( move32(); hIsmMeta->pitch_fx = 0; move32(); hIsmMeta->radius_fx = 1 << 9; // Q9 hIsmMeta->radius_fx = ONE_IN_Q9; // Q9 move16(); hIsmMeta->ism_metadata_flag = 0; move16(); Loading Loading @@ -897,8 +897,8 @@ Word16 ism_quant_meta_fx( { qlow_fx = borders_fx[1]; move32(); tmp = BASOP_Util_Divide3232_Scale( L_sub( borders_fx[1], borders_fx[0] ), q_step_border_fx, &tmp_e ); idx_start = shr( tmp, sub( 15, tmp_e ) ); tmp = BASOP_Util_Divide3232_Scale( L_sub( borders_fx[1], borders_fx[0] ), q_step_border_fx, &tmp_e ); // Q15-tmp_e idx_start = shr( tmp, sub( 15, tmp_e ) ); // Q0 step_fx = q_step_fx; move32(); } Loading @@ -906,21 +906,21 @@ Word16 ism_quant_meta_fx( { qlow_fx = borders_fx[2]; move32(); tmp = BASOP_Util_Divide3232_Scale( L_add( L_sub( borders_fx[3], borders_fx[2] ), L_sub( q_step_border_fx, ONE_IN_Q22 ) ), q_step_border_fx, &tmp_e ); idx_start = sub( cbsize, add( 1, shr( tmp, sub( 15, tmp_e ) ) ) ); tmp = BASOP_Util_Divide3232_Scale( L_add( L_sub( borders_fx[3], borders_fx[2] ), L_sub( q_step_border_fx, ONE_IN_Q22 ) ), q_step_border_fx, &tmp_e ); // Q15-tmp_e idx_start = sub( cbsize, add( 1, shr( tmp, sub( 15, tmp_e ) ) ) ); // Q0 step_fx = q_step_border_fx; move32(); } tmp = BASOP_Util_Divide3232_Scale( L_sub( val, qlow_fx ), step_fx, &tmp_e ); tmp = shl( tmp, sub( Q1, sub( 15, tmp_e ) ) ); tmp = BASOP_Util_Divide3232_Scale( L_sub( val, qlow_fx ), step_fx, &tmp_e ); // Q15-tmp_e tmp = shl( tmp, sub( Q1, sub( 15, tmp_e ) ) ); // Q0 tmp = add( tmp, 1 ); tmp = shr( tmp, 1 ); idx = add( idx_start, s_max( 0, s_min( sub( cbsize, 1 ), tmp ) ) ); idx = add( idx_start, s_max( 0, s_min( sub( cbsize, 1 ), tmp ) ) ); // Q0 // idx = idx_start + (int16_t) max( 0.f, min( cbsize - 1, ( ( val - qlow_fx ) / step_fx + 0.5f ) ) ); *valQ = L_add( imult3216( step_fx, sub( idx, idx_start ) ), qlow_fx ); *valQ = L_add( imult3216( step_fx, sub( idx, idx_start ) ), qlow_fx ); // Q0 move32(); return idx; Loading Loading @@ -973,11 +973,11 @@ int16_t ism_quant_meta( /*! r: dequantized value */ #ifdef IVAS_FLOAT_FIXED Word32 ism_dequant_meta_fx( Word32 ism_dequant_meta_fx( /* o : Q22*/ const Word16 idx, /* i : quantizer index */ const Word32 borders_fx[], /* i : level borders */ const Word32 q_step_fx, /* i : quantization step */ const Word32 q_step_border_fx, /* i : quantization step at the border */ const Word32 borders_fx[], /* i : level borders Q22*/ const Word32 q_step_fx, /* i : quantization step Q22 */ const Word32 q_step_border_fx, /* i : quantization step at the border Q22*/ const Word16 cbsize /* i : codebook size */ ) { Loading @@ -985,17 +985,17 @@ Word32 ism_dequant_meta_fx( Word32 qlow_fx, step_fx, valQ_fx; tmp1 = BASOP_Util_Divide3232_Scale( L_shr( L_sub( borders_fx[1], borders_fx[0] ), 21 ), L_shr( q_step_border_fx, 21 ), &exp1 ); tmp1 = shr( tmp1, sub( 15, exp1 ) ); tmp1 = shr( tmp1, sub( 15, exp1 ) ); // Q0 tmp2 = BASOP_Util_Divide3232_Scale( L_shr( L_sub( borders_fx[3], borders_fx[2] ), 21 ), L_shr( q_step_border_fx, 21 ), &exp2 ); tmp2 = shr( tmp2, sub( 15, exp2 ) ); tmp2 = shr( tmp2, sub( 15, exp2 ) ); // Q0 IF( LE_16( idx, tmp1 ) ) { qlow_fx = borders_fx[0]; qlow_fx = borders_fx[0]; // Q22 idx_start = 0; step_fx = q_step_border_fx; step_fx = q_step_border_fx; // Q22 move32(); move32(); Loading @@ -1003,9 +1003,9 @@ Word32 ism_dequant_meta_fx( } ELSE IF( LE_16( idx, sub( sub( cbsize, 1 ), tmp2 ) ) ) { qlow_fx = borders_fx[1]; qlow_fx = borders_fx[1]; // Q22 idx_start = tmp1; step_fx = q_step_fx; step_fx = q_step_fx; // Q22 move32(); move32(); Loading @@ -1015,14 +1015,14 @@ Word32 ism_dequant_meta_fx( { qlow_fx = borders_fx[2]; idx_start = (Word16) sub( sub( cbsize, 1 ), tmp2 ); step_fx = q_step_border_fx; step_fx = q_step_border_fx; // Q22 move32(); move32(); move16(); } valQ_fx = L_add( sub( idx, idx_start ) * step_fx, qlow_fx ); valQ_fx = L_add( sub( idx, idx_start ) * step_fx, qlow_fx ); // Q22 return valQ_fx; } Loading Loading @@ -1129,7 +1129,8 @@ void ivas_param_ism_config_fx( move16(); } hParamIsm->last_dmx_gain_fx = (Word16) 16384; hParamIsm->last_dmx_gain_fx = (Word16) 16384; // Q15-last_dmx_gain_e move16(); hParamIsm->last_dmx_gain_e = 1; move16(); set16_fx( hParamIsm->last_cardioid_left_fx, (Word16) 16384, MAX_NUM_OBJECTS ); Loading Loading @@ -1293,9 +1294,9 @@ void update_last_metadata_fx( { IF( EQ_16( updt_flag[ch], 1 ) ) { hIsmMeta[ch]->last_azimuth_fx = hIsmMeta[ch]->azimuth_fx; hIsmMeta[ch]->last_azimuth_fx = hIsmMeta[ch]->azimuth_fx; // Q22 move32(); hIsmMeta[ch]->last_elevation_fx = hIsmMeta[ch]->elevation_fx; hIsmMeta[ch]->last_elevation_fx = hIsmMeta[ch]->elevation_fx; // Q22 move32(); } } Loading @@ -1315,16 +1316,16 @@ void ivas_get_ism_sid_quan_bitbudget_fx( const Word16 nchan_ism, /* i : number of objects */ Word16 *nBits_azimuth, /* o : number of Q bits for azimuth */ Word16 *nBits_elevation, /* o : number of Q bits for elevation */ Word32 *q_step_fx, /* o : quantization step */ Word32 *q_step_border_fx, /* o : quantization step at the border */ Word32 *q_step_fx, /* o : quantization step Q22*/ Word32 *q_step_border_fx, /* o : quantization step at the border Q22*/ Word16 *nBits_coh, /* o : number of Q bits for coherence */ Word16 *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ) { *nBits_azimuth = ISM_DTX_AZI_BITS_HIGH; *nBits_elevation = ISM_DTX_ELE_BITS_HIGH; *q_step_fx = ISM_Q_STEP_HIGH_FX; *q_step_border_fx = ISM_Q_STEP_BORDER_HIGH_FX; *q_step_fx = ISM_Q_STEP_HIGH_FX; // Q22 *q_step_border_fx = ISM_Q_STEP_BORDER_HIGH_FX; // Q22 *nBits_coh = ISM_DTX_COH_SCA_BITS; *nBits_sce_id = 1; Loading @@ -1339,8 +1340,8 @@ void ivas_get_ism_sid_quan_bitbudget_fx( { *nBits_azimuth = ISM_DTX_AZI_BITS_LOW; *nBits_elevation = ISM_DTX_ELE_BITS_LOW; *q_step_fx = ISM_Q_STEP_LOW_FX; *q_step_border_fx = ISM_Q_STEP_BORDER_LOW_FX; *q_step_fx = ISM_Q_STEP_LOW_FX; // Q22 *q_step_border_fx = ISM_Q_STEP_BORDER_LOW_FX; // Q22 *nBits_sce_id = 2; move16(); Loading
lib_com/ivas_lfe_com.c +9 −9 Original line number Diff line number Diff line Loading @@ -116,13 +116,13 @@ void ivas_lfe_lpf_select_filt_coeff_fx( SWITCH( sampling_rate ) { case 16000: *ppFilt_coeff_fx = ivas_lpf_2_butter_16k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_16k_fx; // Q30 BREAK; case 32000: *ppFilt_coeff_fx = ivas_lpf_2_butter_32k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_32k_fx; // Q30 BREAK; case 48000: *ppFilt_coeff_fx = ivas_lpf_2_butter_48k_fx; *ppFilt_coeff_fx = ivas_lpf_2_butter_48k_fx; // Q30 BREAK; default: BREAK; Loading @@ -132,15 +132,15 @@ void ivas_lfe_lpf_select_filt_coeff_fx( SWITCH( sampling_rate ) { case 16000: *ppFilt_coeff_fx = ivas_lpf_4_butter_16k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_16k_sos_fx; // Q31-ivas_lpf_4_butter_16k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_16k_sos_e; BREAK; case 32000: *ppFilt_coeff_fx = ivas_lpf_4_butter_32k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_32k_sos_fx; // Q31-ivas_lpf_4_butter_32k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_32k_sos_e; BREAK; case 48000: *ppFilt_coeff_fx = ivas_lpf_4_butter_48k_sos_fx; *ppFilt_coeff_fx = ivas_lpf_4_butter_48k_sos_fx; // Q31-ivas_lpf_4_butter_48k_sos_e *ppFilt_coeff_e = ivas_lpf_4_butter_48k_sos_e; BREAK; default: Loading Loading @@ -172,15 +172,15 @@ void ivas_lfe_window_init_fx( /* Set window coefficients */ IF( EQ_32( sampling_rate, 48000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_48k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_48k_fx; // Q31 } ELSE IF( EQ_32( sampling_rate, 32000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_32k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_32k_fx; // Q31 } ELSE IF( EQ_32( sampling_rate, 16000 ) ) { hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_16k_fx; hLFEWindow->pWindow_coeffs_fx = ivas_lfe_window_coeff_16k_fx; // Q31 } ELSE { Loading