Loading lib_com/ivas_cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -1001,7 +1001,6 @@ typedef enum #define IVAS_SPAR_MAX_FB_IN_CHAN 11 #endif #define IVAS_SPAR_P_LOWERTRI ((IVAS_SPAR_MAX_CH - 1) * (IVAS_SPAR_MAX_CH - 2)) >> 1 #define IVAS_SPAR_MAX_C_COEFF (IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS) * ( IVAS_SPAR_MAX_DMX_CHS - 1) Loading lib_com/ivas_dirac_com.c +26 −19 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ ivas_error ivas_dirac_config( hConfig->nbands = IVAS_MAX_NUM_BANDS; spar_dirac_split_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); #ifdef HODIRAC if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) { Loading Loading @@ -199,6 +200,7 @@ ivas_error ivas_dirac_config( { hConfig->enc_param_start_band = spar_dirac_split_band; } #ifdef HODIRAC if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) { Loading @@ -221,15 +223,11 @@ ivas_error ivas_dirac_config( if ( sba_mode == SBA_MODE_SPAR ) { ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); } else { ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); } return error; Loading Loading @@ -891,7 +889,14 @@ void deindex_spherical_component( return; } #ifdef HODIRAC /*---------------------------------------------------------------- * calculate_hodirac_sector_parameters() * * *-----------------------------------------------------------------*/ void calculate_hodirac_sector_parameters( float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ Loading Loading @@ -1098,10 +1103,12 @@ void calculate_hodirac_sector_parameters( assert( *p_azi >= -180.f && *p_azi <= 180.f ); assert( *p_ele >= -90.f && *p_ele <= 90.f ); #endif } // i_band } // i_sec } } firstrun_sector_params = 0; return; } #endif Loading lib_com/ivas_fb_mixer.c +13 −13 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_rate /* i : sampling rate */ #ifdef HODIRAC , const int16_t nchan_fb_in /* i: number of dirac analysis channels */ const int16_t nchan_fb_in /* i : number of dirAC analysis channels*/ #endif ) { Loading Loading @@ -584,7 +584,7 @@ void ivas_fb_mixer_update_prior_input( const int16_t length /* i : length of time slot */ #ifdef HODIRAC , const int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ) { Loading Loading @@ -621,7 +621,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ) { Loading lib_com/ivas_prot.h +27 −29 Original line number Diff line number Diff line Loading @@ -3024,8 +3024,6 @@ int16_t ivas_qmetadata_dec_decode( #endif ); /*! r: number of bits read */ int16_t ivas_qmetadata_dec_sid_decode( IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q_metadata handle */ Loading @@ -3044,7 +3042,7 @@ void ivas_qmetadata_to_dirac( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const SBA_MODE sba_mode, /* i : SBA mode */ #ifdef HODIRAC const int16_t sba_analysis_order, /* i sba order*/ const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #endif int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -3476,7 +3474,7 @@ void ivas_dirac_dec_read_BS( int16_t *nb_bits, /* o : number of bits read */ const SBA_MODE sba_mode, /* i : SBA mode */ #ifdef HODIRAC const int16_t sba_analysis_order, /* i sba order*/ const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #endif int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -4786,15 +4784,15 @@ int16_t ivas_get_df_ratio_bits_hodirac( /*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */ int16_t ivas_get_df_ratio_bits( int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ const int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ ); void masa_sample_rate_band_correction( MASA_CODEC_CONFIG *config, /* i/o: MASA codec config */ int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : sampling rate */ , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ const int32_t sampling_rate, /* i : sampling rate */ MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ ); void invdct4_transform( Loading Loading @@ -5093,7 +5091,7 @@ void computeReferencePower_enc( const SBA_MODE sba_mode /* i : SBA mode */ #ifdef HODIRAC , int16_t nchan_ana /* i : no of analysis channels */ const int16_t nchan_ana /* i : number of analysis channels */ #endif ); Loading Loading @@ -5221,7 +5219,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_Fs /* i : sampling rate */ #ifdef HODIRAC , const int16_t nachan_dirac_ana /* i: number of dirac analysis channels */ const int16_t nachan_dirac_ana /* i : number of DirAR analysis channels */ #endif ); Loading Loading @@ -5261,7 +5259,7 @@ void ivas_fb_mixer_update_prior_input( const int16_t length /* i : length of time slot */ #ifdef HODIRAC , const int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ); Loading @@ -5274,7 +5272,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ); Loading lib_com/ivas_qmetadata_com.c +3 −9 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ void ivas_qmetadata_close( * scalar quantization using partition *------------------------------------------------------------------------*/ /* r: codeword index */ /*! r: codeword index */ int16_t masa_sq( const float in, /* i : input value */ const float *threshold, /* i : partition */ Loading Loading @@ -515,9 +515,7 @@ void masa_compensate_two_dir_energy_ratio_index( ) { float ratio1, ratio2; #ifndef HODIRAC float ratioSum; #endif ratio1 = 1.0f - diffuseness_reconstructions[ratio_index_1]; ratio2 = 1.0f - diffuseness_reconstructions[ratio_index_2]; Loading @@ -526,10 +524,6 @@ void masa_compensate_two_dir_energy_ratio_index( if ( !hodirac_flag ) #endif { #ifdef HODIRAC float ratioSum; #endif ratioSum = ratio1 + ratio2; if ( ratio1 >= ratio2 ) { Loading Loading @@ -668,7 +662,7 @@ int16_t ivas_get_df_ratio_bits_hodirac( /*! r: bits to be used for quantizing ratio of ratios */ int16_t ivas_get_df_ratio_bits( int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ const int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ ) { int16_t dfRatio_bits; Loading Loading
lib_com/ivas_cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -1001,7 +1001,6 @@ typedef enum #define IVAS_SPAR_MAX_FB_IN_CHAN 11 #endif #define IVAS_SPAR_P_LOWERTRI ((IVAS_SPAR_MAX_CH - 1) * (IVAS_SPAR_MAX_CH - 2)) >> 1 #define IVAS_SPAR_MAX_C_COEFF (IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS) * ( IVAS_SPAR_MAX_DMX_CHS - 1) Loading
lib_com/ivas_dirac_com.c +26 −19 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ ivas_error ivas_dirac_config( hConfig->nbands = IVAS_MAX_NUM_BANDS; spar_dirac_split_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); #ifdef HODIRAC if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) { Loading Loading @@ -199,6 +200,7 @@ ivas_error ivas_dirac_config( { hConfig->enc_param_start_band = spar_dirac_split_band; } #ifdef HODIRAC if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) { Loading @@ -221,15 +223,11 @@ ivas_error ivas_dirac_config( if ( sba_mode == SBA_MODE_SPAR ) { ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); } else { ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); } return error; Loading Loading @@ -891,7 +889,14 @@ void deindex_spherical_component( return; } #ifdef HODIRAC /*---------------------------------------------------------------- * calculate_hodirac_sector_parameters() * * *-----------------------------------------------------------------*/ void calculate_hodirac_sector_parameters( float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ Loading Loading @@ -1098,10 +1103,12 @@ void calculate_hodirac_sector_parameters( assert( *p_azi >= -180.f && *p_azi <= 180.f ); assert( *p_ele >= -90.f && *p_ele <= 90.f ); #endif } // i_band } // i_sec } } firstrun_sector_params = 0; return; } #endif Loading
lib_com/ivas_fb_mixer.c +13 −13 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_rate /* i : sampling rate */ #ifdef HODIRAC , const int16_t nchan_fb_in /* i: number of dirac analysis channels */ const int16_t nchan_fb_in /* i : number of dirAC analysis channels*/ #endif ) { Loading Loading @@ -584,7 +584,7 @@ void ivas_fb_mixer_update_prior_input( const int16_t length /* i : length of time slot */ #ifdef HODIRAC , const int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ) { Loading Loading @@ -621,7 +621,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ) { Loading
lib_com/ivas_prot.h +27 −29 Original line number Diff line number Diff line Loading @@ -3024,8 +3024,6 @@ int16_t ivas_qmetadata_dec_decode( #endif ); /*! r: number of bits read */ int16_t ivas_qmetadata_dec_sid_decode( IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q_metadata handle */ Loading @@ -3044,7 +3042,7 @@ void ivas_qmetadata_to_dirac( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const SBA_MODE sba_mode, /* i : SBA mode */ #ifdef HODIRAC const int16_t sba_analysis_order, /* i sba order*/ const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #endif int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -3476,7 +3474,7 @@ void ivas_dirac_dec_read_BS( int16_t *nb_bits, /* o : number of bits read */ const SBA_MODE sba_mode, /* i : SBA mode */ #ifdef HODIRAC const int16_t sba_analysis_order, /* i sba order*/ const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ #endif int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); Loading Loading @@ -4786,15 +4784,15 @@ int16_t ivas_get_df_ratio_bits_hodirac( /*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */ int16_t ivas_get_df_ratio_bits( int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ const int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ ); void masa_sample_rate_band_correction( MASA_CODEC_CONFIG *config, /* i/o: MASA codec config */ int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : sampling rate */ , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ const int32_t sampling_rate, /* i : sampling rate */ MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ ); void invdct4_transform( Loading Loading @@ -5093,7 +5091,7 @@ void computeReferencePower_enc( const SBA_MODE sba_mode /* i : SBA mode */ #ifdef HODIRAC , int16_t nchan_ana /* i : no of analysis channels */ const int16_t nchan_ana /* i : number of analysis channels */ #endif ); Loading Loading @@ -5221,7 +5219,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_Fs /* i : sampling rate */ #ifdef HODIRAC , const int16_t nachan_dirac_ana /* i: number of dirac analysis channels */ const int16_t nachan_dirac_ana /* i : number of DirAR analysis channels */ #endif ); Loading Loading @@ -5261,7 +5259,7 @@ void ivas_fb_mixer_update_prior_input( const int16_t length /* i : length of time slot */ #ifdef HODIRAC , const int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ); Loading @@ -5274,7 +5272,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , int16_t nchan_fb_in const int16_t nchan_fb_in /* i : number of analysis channels */ #endif ); Loading
lib_com/ivas_qmetadata_com.c +3 −9 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ void ivas_qmetadata_close( * scalar quantization using partition *------------------------------------------------------------------------*/ /* r: codeword index */ /*! r: codeword index */ int16_t masa_sq( const float in, /* i : input value */ const float *threshold, /* i : partition */ Loading Loading @@ -515,9 +515,7 @@ void masa_compensate_two_dir_energy_ratio_index( ) { float ratio1, ratio2; #ifndef HODIRAC float ratioSum; #endif ratio1 = 1.0f - diffuseness_reconstructions[ratio_index_1]; ratio2 = 1.0f - diffuseness_reconstructions[ratio_index_2]; Loading @@ -526,10 +524,6 @@ void masa_compensate_two_dir_energy_ratio_index( if ( !hodirac_flag ) #endif { #ifdef HODIRAC float ratioSum; #endif ratioSum = ratio1 + ratio2; if ( ratio1 >= ratio2 ) { Loading Loading @@ -668,7 +662,7 @@ int16_t ivas_get_df_ratio_bits_hodirac( /*! r: bits to be used for quantizing ratio of ratios */ int16_t ivas_get_df_ratio_bits( int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ const int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ ) { int16_t dfRatio_bits; Loading