Loading lib_dec/ivas_reverb_filter_design.c +63 −15 Original line number Diff line number Diff line Loading @@ -57,8 +57,13 @@ * Function definitions *------------------------------------------------------------------------------------------*/ /* getMinPhase computes the minimum phase spectrum that can be derived from the amplitude spectrum of the input. */ /*-------------------------------------------------------------------* * calc_min_phase() * * Compute the minimum phase spectrum that can be derived * from the amplitude spectrum of the input. *-------------------------------------------------------------------*/ static void calc_min_phase( rv_fftwf_type_complex *pSpectrum, const int16_t fft_size, Loading Loading @@ -186,8 +191,13 @@ static void calc_min_phase( } /* Converts FFT-domain pFilter pH_flt into a minimum-phase pFilter. This function expects only the positive frequency bins up to Nyquist/2 */ /*-------------------------------------------------------------------* * calc_min_phase_filter() * * Convert FFT-domain pFilter pH_flt into a minimum-phase pFilter. * This function expects only the positive frequency bins up to Nyquist/2 *-------------------------------------------------------------------*/ static void calc_min_phase_filter( rv_fftwf_type_complex *pH_flt, const int16_t fft_size, Loading Loading @@ -220,7 +230,12 @@ static void calc_min_phase_filter( } /* Applies the smoothing (anti-aliasing) window in the time domain */ /*-------------------------------------------------------------------* * apply_window_fft() * * Apply the smoothing (anti-aliasing) window in the time domain *-------------------------------------------------------------------*/ static void apply_window_fft( rv_fftwf_type_complex *pH_flt, const float *pWindow, Loading Loading @@ -270,7 +285,12 @@ static void apply_window_fft( } /* Limits the gain vs frequency slope to T db per bin */ /*-------------------------------------------------------------------* * response_step_limit() * * Limit the gain vs frequency slope to T db per bin *-------------------------------------------------------------------*/ static void response_step_limit( float *X, const int16_t dim_x, Loading Loading @@ -333,7 +353,12 @@ static void response_step_limit( } /* This function computes a smoothing window used later to avoid aliasing in FFT filters */ /*-------------------------------------------------------------------* * ivas_reverb_define_window_fft() * * Compute a smoothing window used later to avoid aliasing in FFT filters *-------------------------------------------------------------------*/ void ivas_reverb_define_window_fft( float *pWindow, const int16_t transitionStart, Loading Loading @@ -373,6 +398,11 @@ void ivas_reverb_define_window_fft( return; } /*-------------------------------------------------------------------* * apply_window_fft() * * Applies the smoothing (anti-aliasing) window in the time domain *-------------------------------------------------------------------*/ /* Computes colorations filters for the target frequency responses */ int16_t ivas_reverb_calc_color_filters( Loading Loading @@ -415,7 +445,12 @@ int16_t ivas_reverb_calc_color_filters( } /* Computes correlation filters for the target frequency response */ /*-------------------------------------------------------------------* * ivas_reverb_calc_correl_filters() * * Compute correlation filters for the target frequency response *-------------------------------------------------------------------*/ int16_t ivas_reverb_calc_correl_filters( const float *pTargetICC, const float *pWindow, Loading Loading @@ -455,7 +490,12 @@ int16_t ivas_reverb_calc_correl_filters( } /* Computes the target levels (gains) for the coloration filters */ /*-------------------------------------------------------------------* * ivas_reverb_calc_color_levels() * * Compute the target levels (gains) for the coloration filters *-------------------------------------------------------------------*/ void ivas_reverb_calc_color_levels( const int32_t output_Fs, const int16_t freq_count, Loading Loading @@ -557,11 +597,12 @@ void ivas_reverb_calc_color_levels( } /*-----------------------------------------------------------------------------------------* * Function description : Interpolates data from the input T60 and DSR tables * to the FFT pFilter uniform grid /*-------------------------------------------------------------------* * ivas_reverb_interpolate_acoustic_data() * * Interpolates data from the input T60 and DSR tables to the FFT pFilter uniform grid * Note: the fc frequencies both for the input and the output must be in the ascending order *-----------------------------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ void ivas_reverb_interpolate_acoustic_data( const int16_t input_table_size, Loading Loading @@ -614,8 +655,13 @@ void ivas_reverb_interpolate_acoustic_data( } /* Function analyses the HRTF set and computes avarage left/right power spectrum and frequency-dependent IA coherence. Expects frequency-domain HRTF input */ /*-------------------------------------------------------------------* * ivas_reverb_get_hrtf_set_properties() * * Function analyses the HRTF set and computes avarage left/right power spectrum * and frequency-dependent IA coherence. Expects frequency-domain HRTF input *-------------------------------------------------------------------*/ void ivas_reverb_get_hrtf_set_properties( float **ppHrtf_set_L_re, float **ppHrtf_set_L_im, Loading Loading @@ -787,4 +833,6 @@ void ivas_reverb_get_hrtf_set_properties( pOut_avg_pwr_R[out_bin_idx] = weight_1st * avg_pwr_right[0] + relative_pos * avg_pwr_right[1]; out_i_a_coherence[out_bin_idx] = weight_1st * IA_coherence[0] + relative_pos * IA_coherence[1]; } return; } lib_dec/ivas_rom_dec.c +28 −10 Original line number Diff line number Diff line Loading @@ -924,23 +924,38 @@ const int16_t channelIndex_CICP14[7] = { 0, 1, 2, 5, 6, 9, 10 }; const int16_t channelIndex_CICP16[9] = { 0, 1, 2, 5, 6, 9, 10, 11, 12 }; const int16_t channelIndex_CICP19[11] = { 0, 1, 2, 3, 4, 7, 8, 9, 10, 13, 14 }; const float surCohEne[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 3.0903f, 2.0053f, 1.0860f, 0.8072f, 0.7079f }; const float surCohEne[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 3.0903f, 2.0053f, 1.0860f, 0.8072f, 0.7079f }; const float spreadCohEne05[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 2.3988f, 1.7783f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne05[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 2.3988f, 1.7783f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne1[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 1.5975f, 1.1220f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne1[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 1.5975f, 1.1220f, 1.1220f, 1.1220f, 1.1220f }; const float lowBitRateBinauralEQ[LOW_BIT_RATE_BINAURAL_EQ_BINS] = { 0.979f, 0.893f, 0.762f, 0.615f, 0.52f, 0.48f, 0.477f, 0.477f, 0.48f, 0.501f, 0.546f, 0.602f, 0.652f, 0.664f, 0.652f, 0.639f, 0.635f }; const float lowBitRateBinauralEQ[LOW_BIT_RATE_BINAURAL_EQ_BINS] = { 0.979f, 0.893f, 0.762f, 0.615f, 0.52f, 0.48f, 0.477f, 0.477f, 0.48f, 0.501f, 0.546f, 0.602f, 0.652f, 0.664f, 0.652f, 0.639f, 0.635f }; const float diffuseFieldCoherenceDifferenceX[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceX[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { 0.047421f, 0.19773f, 0.22582f, 0.10637f, 0.0087111f, 0.012028f, 0.031972f, 0.019668f, 0.0079928f }; const float diffuseFieldCoherenceDifferenceY[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceY[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { -0.095628f, -0.30569f, -0.34427f, -0.15425f, -0.044628f, -0.057224f, -0.050835f, -0.035214f, -0.02215f }; const float diffuseFieldCoherenceDifferenceZ[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceZ[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { 0.048207f, 0.10796f, 0.11845f, 0.047886f, 0.035917f, 0.045196f, 0.018863f, 0.015547f, 0.014157f }; Loading Loading @@ -1022,7 +1037,8 @@ const float SincTable[321] = 0.00000000f }; const float orange53_left_avg_power[257] = { const float orange53_left_avg_power[257] = /* 257 == IVAS_REVERB_FFT_SIZE_48K/2 + 1 */ { 0.999231100f, 0.992580175f, 0.969233215f, 0.925614893f, 0.871408045f, 0.826101780f, 0.803222895f, 0.800087631f, 0.802672029f, 0.801490188f, 0.796555817f, 0.790879488f, 0.784882724f, 0.777585745f, 0.769326210f, 0.761789441f, 0.756145239f, 0.752754092f, 0.751703024f, 0.752594173f, 0.754317880f, 0.755515277f, 0.754378498f, 0.748860359f, 0.738919020f, 0.727488697f, 0.718792558f, Loading Loading @@ -1054,7 +1070,8 @@ const float orange53_left_avg_power[257] = { 0.266522497f, 0.266185820f, 0.266298562f, 0.266692907f, 0.266907692f }; const float orange53_right_avg_power[257] = { const float orange53_right_avg_power[257] = { 0.999231100f, 0.992580175f, 0.969233215f, 0.925614893f, 0.871408045f, 0.826101780f, 0.803222895f, 0.800087631f, 0.802672029f, 0.801490188f, 0.796555817f, 0.790879488f, 0.784882724f, 0.777585745f, 0.769326210f, 0.761789441f, 0.756145239f, 0.752754092f, 0.751703024f, 0.752594173f, 0.754317880f, 0.755515277f, 0.754378498f, 0.748860359f, 0.738919020f, 0.727488697f, 0.718792558f, Loading Loading @@ -1086,7 +1103,8 @@ const float orange53_right_avg_power[257] = { 0.266522497f, 0.266185820f, 0.266298562f, 0.266692907f, 0.266907692f }; const float orange53_coherence[257] = { const float orange53_coherence[257] = { 0.929530263f, 0.921171963f, 0.900268972f, 0.876067519f, 0.855227590f, 0.837884128f, 0.823401272f, 0.818804145f, 0.835025251f, 0.871971071f, 0.911253273f, 0.929330528f, 0.921199203f, 0.900894165f, 0.882577479f, 0.867001534f, 0.849280477f, 0.832460761f, 0.824062645f, 0.823441386f, 0.820908070f, 0.811902404f, 0.802339375f, 0.798648477f, 0.797345281f, 0.791158736f, 0.779512227f, Loading lib_dec/ivas_spar_md_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1004,7 +1004,6 @@ static void ivas_get_spar_matrices( { for ( j = 0; j < numch_out; j++ ) { set_zero( &pState->spar_coeffs.C_re[i][j][i_ts * IVAS_MAX_NUM_BANDS], IVAS_MAX_NUM_BANDS ); set_zero( &pState->spar_coeffs.P_re[i][j][i_ts * IVAS_MAX_NUM_BANDS], IVAS_MAX_NUM_BANDS ); } Loading Loading
lib_dec/ivas_reverb_filter_design.c +63 −15 Original line number Diff line number Diff line Loading @@ -57,8 +57,13 @@ * Function definitions *------------------------------------------------------------------------------------------*/ /* getMinPhase computes the minimum phase spectrum that can be derived from the amplitude spectrum of the input. */ /*-------------------------------------------------------------------* * calc_min_phase() * * Compute the minimum phase spectrum that can be derived * from the amplitude spectrum of the input. *-------------------------------------------------------------------*/ static void calc_min_phase( rv_fftwf_type_complex *pSpectrum, const int16_t fft_size, Loading Loading @@ -186,8 +191,13 @@ static void calc_min_phase( } /* Converts FFT-domain pFilter pH_flt into a minimum-phase pFilter. This function expects only the positive frequency bins up to Nyquist/2 */ /*-------------------------------------------------------------------* * calc_min_phase_filter() * * Convert FFT-domain pFilter pH_flt into a minimum-phase pFilter. * This function expects only the positive frequency bins up to Nyquist/2 *-------------------------------------------------------------------*/ static void calc_min_phase_filter( rv_fftwf_type_complex *pH_flt, const int16_t fft_size, Loading Loading @@ -220,7 +230,12 @@ static void calc_min_phase_filter( } /* Applies the smoothing (anti-aliasing) window in the time domain */ /*-------------------------------------------------------------------* * apply_window_fft() * * Apply the smoothing (anti-aliasing) window in the time domain *-------------------------------------------------------------------*/ static void apply_window_fft( rv_fftwf_type_complex *pH_flt, const float *pWindow, Loading Loading @@ -270,7 +285,12 @@ static void apply_window_fft( } /* Limits the gain vs frequency slope to T db per bin */ /*-------------------------------------------------------------------* * response_step_limit() * * Limit the gain vs frequency slope to T db per bin *-------------------------------------------------------------------*/ static void response_step_limit( float *X, const int16_t dim_x, Loading Loading @@ -333,7 +353,12 @@ static void response_step_limit( } /* This function computes a smoothing window used later to avoid aliasing in FFT filters */ /*-------------------------------------------------------------------* * ivas_reverb_define_window_fft() * * Compute a smoothing window used later to avoid aliasing in FFT filters *-------------------------------------------------------------------*/ void ivas_reverb_define_window_fft( float *pWindow, const int16_t transitionStart, Loading Loading @@ -373,6 +398,11 @@ void ivas_reverb_define_window_fft( return; } /*-------------------------------------------------------------------* * apply_window_fft() * * Applies the smoothing (anti-aliasing) window in the time domain *-------------------------------------------------------------------*/ /* Computes colorations filters for the target frequency responses */ int16_t ivas_reverb_calc_color_filters( Loading Loading @@ -415,7 +445,12 @@ int16_t ivas_reverb_calc_color_filters( } /* Computes correlation filters for the target frequency response */ /*-------------------------------------------------------------------* * ivas_reverb_calc_correl_filters() * * Compute correlation filters for the target frequency response *-------------------------------------------------------------------*/ int16_t ivas_reverb_calc_correl_filters( const float *pTargetICC, const float *pWindow, Loading Loading @@ -455,7 +490,12 @@ int16_t ivas_reverb_calc_correl_filters( } /* Computes the target levels (gains) for the coloration filters */ /*-------------------------------------------------------------------* * ivas_reverb_calc_color_levels() * * Compute the target levels (gains) for the coloration filters *-------------------------------------------------------------------*/ void ivas_reverb_calc_color_levels( const int32_t output_Fs, const int16_t freq_count, Loading Loading @@ -557,11 +597,12 @@ void ivas_reverb_calc_color_levels( } /*-----------------------------------------------------------------------------------------* * Function description : Interpolates data from the input T60 and DSR tables * to the FFT pFilter uniform grid /*-------------------------------------------------------------------* * ivas_reverb_interpolate_acoustic_data() * * Interpolates data from the input T60 and DSR tables to the FFT pFilter uniform grid * Note: the fc frequencies both for the input and the output must be in the ascending order *-----------------------------------------------------------------------------------------*/ *-------------------------------------------------------------------*/ void ivas_reverb_interpolate_acoustic_data( const int16_t input_table_size, Loading Loading @@ -614,8 +655,13 @@ void ivas_reverb_interpolate_acoustic_data( } /* Function analyses the HRTF set and computes avarage left/right power spectrum and frequency-dependent IA coherence. Expects frequency-domain HRTF input */ /*-------------------------------------------------------------------* * ivas_reverb_get_hrtf_set_properties() * * Function analyses the HRTF set and computes avarage left/right power spectrum * and frequency-dependent IA coherence. Expects frequency-domain HRTF input *-------------------------------------------------------------------*/ void ivas_reverb_get_hrtf_set_properties( float **ppHrtf_set_L_re, float **ppHrtf_set_L_im, Loading Loading @@ -787,4 +833,6 @@ void ivas_reverb_get_hrtf_set_properties( pOut_avg_pwr_R[out_bin_idx] = weight_1st * avg_pwr_right[0] + relative_pos * avg_pwr_right[1]; out_i_a_coherence[out_bin_idx] = weight_1st * IA_coherence[0] + relative_pos * IA_coherence[1]; } return; }
lib_dec/ivas_rom_dec.c +28 −10 Original line number Diff line number Diff line Loading @@ -924,23 +924,38 @@ const int16_t channelIndex_CICP14[7] = { 0, 1, 2, 5, 6, 9, 10 }; const int16_t channelIndex_CICP16[9] = { 0, 1, 2, 5, 6, 9, 10, 11, 12 }; const int16_t channelIndex_CICP19[11] = { 0, 1, 2, 3, 4, 7, 8, 9, 10, 13, 14 }; const float surCohEne[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 3.0903f, 2.0053f, 1.0860f, 0.8072f, 0.7079f }; const float surCohEne[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 3.0903f, 2.0053f, 1.0860f, 0.8072f, 0.7079f }; const float spreadCohEne05[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 2.3988f, 1.7783f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne05[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 2.3988f, 1.7783f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne1[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 1.5975f, 1.1220f, 1.1220f, 1.1220f, 1.1220f }; const float spreadCohEne1[MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS] = { 1.5975f, 1.1220f, 1.1220f, 1.1220f, 1.1220f }; const float lowBitRateBinauralEQ[LOW_BIT_RATE_BINAURAL_EQ_BINS] = { 0.979f, 0.893f, 0.762f, 0.615f, 0.52f, 0.48f, 0.477f, 0.477f, 0.48f, 0.501f, 0.546f, 0.602f, 0.652f, 0.664f, 0.652f, 0.639f, 0.635f }; const float lowBitRateBinauralEQ[LOW_BIT_RATE_BINAURAL_EQ_BINS] = { 0.979f, 0.893f, 0.762f, 0.615f, 0.52f, 0.48f, 0.477f, 0.477f, 0.48f, 0.501f, 0.546f, 0.602f, 0.652f, 0.664f, 0.652f, 0.639f, 0.635f }; const float diffuseFieldCoherenceDifferenceX[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceX[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { 0.047421f, 0.19773f, 0.22582f, 0.10637f, 0.0087111f, 0.012028f, 0.031972f, 0.019668f, 0.0079928f }; const float diffuseFieldCoherenceDifferenceY[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceY[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { -0.095628f, -0.30569f, -0.34427f, -0.15425f, -0.044628f, -0.057224f, -0.050835f, -0.035214f, -0.02215f }; const float diffuseFieldCoherenceDifferenceZ[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { const float diffuseFieldCoherenceDifferenceZ[BINAURAL_COHERENCE_DIFFERENCE_BINS] = { 0.048207f, 0.10796f, 0.11845f, 0.047886f, 0.035917f, 0.045196f, 0.018863f, 0.015547f, 0.014157f }; Loading Loading @@ -1022,7 +1037,8 @@ const float SincTable[321] = 0.00000000f }; const float orange53_left_avg_power[257] = { const float orange53_left_avg_power[257] = /* 257 == IVAS_REVERB_FFT_SIZE_48K/2 + 1 */ { 0.999231100f, 0.992580175f, 0.969233215f, 0.925614893f, 0.871408045f, 0.826101780f, 0.803222895f, 0.800087631f, 0.802672029f, 0.801490188f, 0.796555817f, 0.790879488f, 0.784882724f, 0.777585745f, 0.769326210f, 0.761789441f, 0.756145239f, 0.752754092f, 0.751703024f, 0.752594173f, 0.754317880f, 0.755515277f, 0.754378498f, 0.748860359f, 0.738919020f, 0.727488697f, 0.718792558f, Loading Loading @@ -1054,7 +1070,8 @@ const float orange53_left_avg_power[257] = { 0.266522497f, 0.266185820f, 0.266298562f, 0.266692907f, 0.266907692f }; const float orange53_right_avg_power[257] = { const float orange53_right_avg_power[257] = { 0.999231100f, 0.992580175f, 0.969233215f, 0.925614893f, 0.871408045f, 0.826101780f, 0.803222895f, 0.800087631f, 0.802672029f, 0.801490188f, 0.796555817f, 0.790879488f, 0.784882724f, 0.777585745f, 0.769326210f, 0.761789441f, 0.756145239f, 0.752754092f, 0.751703024f, 0.752594173f, 0.754317880f, 0.755515277f, 0.754378498f, 0.748860359f, 0.738919020f, 0.727488697f, 0.718792558f, Loading Loading @@ -1086,7 +1103,8 @@ const float orange53_right_avg_power[257] = { 0.266522497f, 0.266185820f, 0.266298562f, 0.266692907f, 0.266907692f }; const float orange53_coherence[257] = { const float orange53_coherence[257] = { 0.929530263f, 0.921171963f, 0.900268972f, 0.876067519f, 0.855227590f, 0.837884128f, 0.823401272f, 0.818804145f, 0.835025251f, 0.871971071f, 0.911253273f, 0.929330528f, 0.921199203f, 0.900894165f, 0.882577479f, 0.867001534f, 0.849280477f, 0.832460761f, 0.824062645f, 0.823441386f, 0.820908070f, 0.811902404f, 0.802339375f, 0.798648477f, 0.797345281f, 0.791158736f, 0.779512227f, Loading
lib_dec/ivas_spar_md_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1004,7 +1004,6 @@ static void ivas_get_spar_matrices( { for ( j = 0; j < numch_out; j++ ) { set_zero( &pState->spar_coeffs.C_re[i][j][i_ts * IVAS_MAX_NUM_BANDS], IVAS_MAX_NUM_BANDS ); set_zero( &pState->spar_coeffs.P_re[i][j][i_ts * IVAS_MAX_NUM_BANDS], IVAS_MAX_NUM_BANDS ); } Loading