Loading lib_com/ivas_fb_mixer.c +4 −0 Original line number Diff line number Diff line Loading @@ -116,7 +116,11 @@ int16_t ivas_get_num_bands_from_bw_idx( static Word16 ivas_get_num_bands( const Word32 sampling_rate ) { #ifdef IVAS_FLOAT_FIXED Word16 bwidth = ivas_get_bw_idx_from_sample_rate_fx( sampling_rate ); #else Word16 bwidth = ivas_get_bw_idx_from_sample_rate( sampling_rate ); #endif Word16 num_active_bands = ivas_get_num_bands_from_bw_idx( bwidth ); return num_active_bands; Loading lib_com/ivas_prot_fx.h +22 −0 Original line number Diff line number Diff line Loading @@ -2517,3 +2517,25 @@ void stereo_coder_tcx_fx( const Word16 mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 q_spec ); #endif void ivas_spar_config_fx( Word32 ivas_total_brate, /* i : codec total bitrate */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ Word16 *nchan_transport, /* o : number of transport channels */ Word16 *nSCE, /* o : number of SCEs */ Word16 *nCPE, /* o : number of CPEs */ Word32 *core_nominal_brate, /* o : core-coding nominal bitrate */ const Word16 sid_format /* i : IVAS format indicator from SID frame */ ); Word16 ivas_get_bw_idx_from_sample_rate_fx( const Word32 sampling_rate /* i : sampling rate */ ); void ivas_spar_bitrate_dist_fx( Word32 core_brates_act[], /* o : bitrates per core-coder */ const Word16 nAvailBits, /* i : number of available bits */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ const Word16 bwidth /* i : audio bandwidth */ ); lib_com/ivas_spar_com.c +815 −466 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_com/ivas_stereo_dft_com.c +7 −5 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include "ivas_prot_fx.h" #endif #define INV_FPS 655 // Q15 /*------------------------------------------------------------------------- * stereo_dft_config() * Loading Loading @@ -73,7 +74,7 @@ void stereo_dft_config_fx( move16(); /* ITD, IPD and residual coding is not used in SID/No data */ IF( EQ_32( brate, FRAME_NO_DATA ) ) IF( brate == FRAME_NO_DATA ) { *bits_frame_nominal = FRAME_NO_DATA; move16(); Loading Loading @@ -324,15 +325,16 @@ Word16 stereo_dft_band_config_fx( Word16 nbands; /*sanity check*/ assert( ( EQ_16( band_res, 1 ) || EQ_16( band_res, 0 ) || EQ_16( band_res, 2 ) ) && "stereo DFT: Parameter band resolution not supported!\n" ); assert( ( EQ_16( band_res, 1 ) || ( band_res == 0 ) || EQ_16( band_res, 2 ) ) && "stereo DFT: Parameter band resolution not supported!\n" ); band_limits[0] = 1; move16(); nbands = 0; move16(); WHILE( LT_16( band_limits[nbands++], shr( NFFT, 1 ) ) ) WHILE( LT_16( band_limits[nbands], shr( NFFT, 1 ) ) ) { IF( EQ_16( band_res, 0 ) ) nbands = add( nbands, 1 ); IF( band_res == 0 ) { assert( 0 && "stereo DFT: band config failed!\n" ); } Loading Loading @@ -367,7 +369,7 @@ Word16 stereo_dft_band_config_fx( assert( ( LT_16( nbands, STEREO_DFT_ERB8_BANDS ) ) && "stereo DFT: band config failed!\n" ); } } nbands = sub( nbands, 1 ); band_limits[nbands] = shr( NFFT, 1 ); /*Nyquist Freq*/ move16(); Loading lib_com/ivas_stereo_eclvq_com_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -54,8 +54,11 @@ void ECSQ_init_instance_fx( void *ac_handle ) { ecsq_inst->config_index = config_index; move16(); ecsq_inst->encoding_active = 1; move16(); ecsq_inst->bit_count_estimate = 0; move32(); ecsq_inst->ac_handle = ac_handle; return; Loading @@ -73,6 +76,7 @@ Word32 ECSQ_dequantize_gain_fx( Word32 global_gain; Word32 L_tmp, L_prod; Word16 gg_e, tmp_e = 16; move16(); /* pow(10.0, index * ECLVQ_INV_GLOBAL_GAIN_FACTOR) = pow(2.0,(index * ECLVQ_INV_GLOBAL_GAIN_FACTOR)*3.321928 */ L_prod = Mpy_32_16_1( ECLVQ_INV_GLOBAL_GAIN_FACTOR_Q24, shl( index, 8 ) ); /* Q17 */ Loading Loading @@ -103,6 +107,7 @@ void ECSQ_dequantize_vector_fx( FOR( i = 0; i < N; ++i ) { output[i] = Mpy_32_16_1( global_gain, input[i] ); move32(); } return; Loading Loading
lib_com/ivas_fb_mixer.c +4 −0 Original line number Diff line number Diff line Loading @@ -116,7 +116,11 @@ int16_t ivas_get_num_bands_from_bw_idx( static Word16 ivas_get_num_bands( const Word32 sampling_rate ) { #ifdef IVAS_FLOAT_FIXED Word16 bwidth = ivas_get_bw_idx_from_sample_rate_fx( sampling_rate ); #else Word16 bwidth = ivas_get_bw_idx_from_sample_rate( sampling_rate ); #endif Word16 num_active_bands = ivas_get_num_bands_from_bw_idx( bwidth ); return num_active_bands; Loading
lib_com/ivas_prot_fx.h +22 −0 Original line number Diff line number Diff line Loading @@ -2517,3 +2517,25 @@ void stereo_coder_tcx_fx( const Word16 mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 q_spec ); #endif void ivas_spar_config_fx( Word32 ivas_total_brate, /* i : codec total bitrate */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ Word16 *nchan_transport, /* o : number of transport channels */ Word16 *nSCE, /* o : number of SCEs */ Word16 *nCPE, /* o : number of CPEs */ Word32 *core_nominal_brate, /* o : core-coding nominal bitrate */ const Word16 sid_format /* i : IVAS format indicator from SID frame */ ); Word16 ivas_get_bw_idx_from_sample_rate_fx( const Word32 sampling_rate /* i : sampling rate */ ); void ivas_spar_bitrate_dist_fx( Word32 core_brates_act[], /* o : bitrates per core-coder */ const Word16 nAvailBits, /* i : number of available bits */ const Word32 ivas_total_brate, /* i : IVAS total bitrate */ const Word16 sba_order, /* i : Ambisonic (SBA) order */ const Word16 bwidth /* i : audio bandwidth */ );
lib_com/ivas_spar_com.c +815 −466 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_com/ivas_stereo_dft_com.c +7 −5 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include "ivas_prot_fx.h" #endif #define INV_FPS 655 // Q15 /*------------------------------------------------------------------------- * stereo_dft_config() * Loading Loading @@ -73,7 +74,7 @@ void stereo_dft_config_fx( move16(); /* ITD, IPD and residual coding is not used in SID/No data */ IF( EQ_32( brate, FRAME_NO_DATA ) ) IF( brate == FRAME_NO_DATA ) { *bits_frame_nominal = FRAME_NO_DATA; move16(); Loading Loading @@ -324,15 +325,16 @@ Word16 stereo_dft_band_config_fx( Word16 nbands; /*sanity check*/ assert( ( EQ_16( band_res, 1 ) || EQ_16( band_res, 0 ) || EQ_16( band_res, 2 ) ) && "stereo DFT: Parameter band resolution not supported!\n" ); assert( ( EQ_16( band_res, 1 ) || ( band_res == 0 ) || EQ_16( band_res, 2 ) ) && "stereo DFT: Parameter band resolution not supported!\n" ); band_limits[0] = 1; move16(); nbands = 0; move16(); WHILE( LT_16( band_limits[nbands++], shr( NFFT, 1 ) ) ) WHILE( LT_16( band_limits[nbands], shr( NFFT, 1 ) ) ) { IF( EQ_16( band_res, 0 ) ) nbands = add( nbands, 1 ); IF( band_res == 0 ) { assert( 0 && "stereo DFT: band config failed!\n" ); } Loading Loading @@ -367,7 +369,7 @@ Word16 stereo_dft_band_config_fx( assert( ( LT_16( nbands, STEREO_DFT_ERB8_BANDS ) ) && "stereo DFT: band config failed!\n" ); } } nbands = sub( nbands, 1 ); band_limits[nbands] = shr( NFFT, 1 ); /*Nyquist Freq*/ move16(); Loading
lib_com/ivas_stereo_eclvq_com_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -54,8 +54,11 @@ void ECSQ_init_instance_fx( void *ac_handle ) { ecsq_inst->config_index = config_index; move16(); ecsq_inst->encoding_active = 1; move16(); ecsq_inst->bit_count_estimate = 0; move32(); ecsq_inst->ac_handle = ac_handle; return; Loading @@ -73,6 +76,7 @@ Word32 ECSQ_dequantize_gain_fx( Word32 global_gain; Word32 L_tmp, L_prod; Word16 gg_e, tmp_e = 16; move16(); /* pow(10.0, index * ECLVQ_INV_GLOBAL_GAIN_FACTOR) = pow(2.0,(index * ECLVQ_INV_GLOBAL_GAIN_FACTOR)*3.321928 */ L_prod = Mpy_32_16_1( ECLVQ_INV_GLOBAL_GAIN_FACTOR_Q24, shl( index, 8 ) ); /* Q17 */ Loading Loading @@ -103,6 +107,7 @@ void ECSQ_dequantize_vector_fx( FOR( i = 0; i < N; ++i ) { output[i] = Mpy_32_16_1( global_gain, input[i] ); move32(); } return; Loading