Loading lib_com/delay_comp.c +11 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ int32_t get_delay( HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t sba_dirac_stereo_flag #endif ) { int32_t delay = 0; Loading Loading @@ -99,6 +103,12 @@ int32_t get_delay( { delay += IVAS_FB_DEC_DELAY_NS; } #ifdef DFT_STEREO_SPAR_MIXING else if ( sba_dirac_stereo_flag ) { delay += 0; } #endif /* compensate for Binaural renderer HRTF delay */ { Loading lib_com/ivas_cnst.h +6 −0 Original line number Diff line number Diff line Loading @@ -574,7 +574,13 @@ typedef enum #define NO_SYMB_GR_PRED_G 8 #define STEREO_DFT_RES_BW_MAX 66 /*Maximum number of bin for residual signal in each frame (res_cod_band_max == 6 in 48kHz)*/ #ifdef DFT_STEREO_SPAR_MIXING #define SBA_DIRAC_STEREO_NUM_BANDS 12 #else #define SBA_DIRAC_STEREO_NUM_BANDS 5 #endif #define SBA_DIRAC_NRG_SMOOTH_LONG 10 #define SBA_DIRAC_NRG_SMOOTH_SHORT 3 Loading lib_com/ivas_prot.h +26 −1 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,10 @@ ivas_error stereo_dft_dec_create( const int32_t element_brate, /* i : element bitrate */ const int32_t output_Fs, /* i : output sampling rate */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t nchan_transport #endif ); void stereo_dft_dec_reset( Loading Loading @@ -1055,10 +1059,21 @@ void stereo_dft_dec_synthesize( void stereo_dft_dec( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ Decoder_State *st0, /* i/o: decoder state structure */ #ifdef DFT_STEREO_SPAR_MIXING float DFT[CPE_CHANNELS + 1][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ #else float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ #endif float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ #ifdef DFT_STEREO_SPAR_MIXING , ivas_spar_md_dec_state_t *hMdDec, /* SPAR MD handle for upmixing */ int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ int32_t output_Fs, /* i: Fs for delay calculation */ int16_t nchan_transport /* i: number of transpor channels */ #endif ); void stereo_dft_res_ecu( Loading Loading @@ -3174,6 +3189,10 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output[CPE_CHANNELS][L_FRAME48k], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t mcmasa #endif ); void ivas_sba_dirac_stereo_config( Loading @@ -3182,6 +3201,12 @@ void ivas_sba_dirac_stereo_config( void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft /* i/o: encoder DFT stereo handle */ #ifdef DFT_STEREO_SPAR_MIXING , ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ int32_t output_Fs /* i: Fs for delay calculation */ #endif ); ivas_error ivas_sba_get_hoa_dec_matrix( Loading lib_com/options.h +6 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */ #define SBA_BR_SWITCHING_2 /* Issue 114: Changes for sba bit rate switching with reconfigurations*/ Loading @@ -163,7 +164,12 @@ #define IMPROVE_CMDLINE_ROBUSTNESS /* Issue 233: Improve robustness of command-line parameters */ #define FIX_MDCT_AND_MC_MONO_ISSUES /* Issue 242: Fix some issues with TCX-LTP and delay alignement for mono output */ #define DFT_STEREO_SPAR_MIXING /* For SBA to stereo output, perform SPAR upmix in DFT domain */ #ifdef DFT_STEREO_SPAR_MIXING /*#define DFT_STEREO_SPAR_MIXING_DEBUG*/ /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif lib_com/prot.h +4 −0 Original line number Diff line number Diff line Loading @@ -719,6 +719,10 @@ int32_t get_delay( HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t sba_dirac_stereo_flag #endif ); void decision_matrix_enc( Loading Loading
lib_com/delay_comp.c +11 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ int32_t get_delay( HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t sba_dirac_stereo_flag #endif ) { int32_t delay = 0; Loading Loading @@ -99,6 +103,12 @@ int32_t get_delay( { delay += IVAS_FB_DEC_DELAY_NS; } #ifdef DFT_STEREO_SPAR_MIXING else if ( sba_dirac_stereo_flag ) { delay += 0; } #endif /* compensate for Binaural renderer HRTF delay */ { Loading
lib_com/ivas_cnst.h +6 −0 Original line number Diff line number Diff line Loading @@ -574,7 +574,13 @@ typedef enum #define NO_SYMB_GR_PRED_G 8 #define STEREO_DFT_RES_BW_MAX 66 /*Maximum number of bin for residual signal in each frame (res_cod_band_max == 6 in 48kHz)*/ #ifdef DFT_STEREO_SPAR_MIXING #define SBA_DIRAC_STEREO_NUM_BANDS 12 #else #define SBA_DIRAC_STEREO_NUM_BANDS 5 #endif #define SBA_DIRAC_NRG_SMOOTH_LONG 10 #define SBA_DIRAC_NRG_SMOOTH_SHORT 3 Loading
lib_com/ivas_prot.h +26 −1 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,10 @@ ivas_error stereo_dft_dec_create( const int32_t element_brate, /* i : element bitrate */ const int32_t output_Fs, /* i : output sampling rate */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t nchan_transport #endif ); void stereo_dft_dec_reset( Loading Loading @@ -1055,10 +1059,21 @@ void stereo_dft_dec_synthesize( void stereo_dft_dec( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ Decoder_State *st0, /* i/o: decoder state structure */ #ifdef DFT_STEREO_SPAR_MIXING float DFT[CPE_CHANNELS + 1][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ #else float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ #endif float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ #ifdef DFT_STEREO_SPAR_MIXING , ivas_spar_md_dec_state_t *hMdDec, /* SPAR MD handle for upmixing */ int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ int32_t output_Fs, /* i: Fs for delay calculation */ int16_t nchan_transport /* i: number of transpor channels */ #endif ); void stereo_dft_res_ecu( Loading Loading @@ -3174,6 +3189,10 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output[CPE_CHANNELS][L_FRAME48k], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t mcmasa #endif ); void ivas_sba_dirac_stereo_config( Loading @@ -3182,6 +3201,12 @@ void ivas_sba_dirac_stereo_config( void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft /* i/o: encoder DFT stereo handle */ #ifdef DFT_STEREO_SPAR_MIXING , ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ int32_t output_Fs /* i: Fs for delay calculation */ #endif ); ivas_error ivas_sba_get_hoa_dec_matrix( Loading
lib_com/options.h +6 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */ #define SBA_BR_SWITCHING_2 /* Issue 114: Changes for sba bit rate switching with reconfigurations*/ Loading @@ -163,7 +164,12 @@ #define IMPROVE_CMDLINE_ROBUSTNESS /* Issue 233: Improve robustness of command-line parameters */ #define FIX_MDCT_AND_MC_MONO_ISSUES /* Issue 242: Fix some issues with TCX-LTP and delay alignement for mono output */ #define DFT_STEREO_SPAR_MIXING /* For SBA to stereo output, perform SPAR upmix in DFT domain */ #ifdef DFT_STEREO_SPAR_MIXING /*#define DFT_STEREO_SPAR_MIXING_DEBUG*/ /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif
lib_com/prot.h +4 −0 Original line number Diff line number Diff line Loading @@ -719,6 +719,10 @@ int32_t get_delay( HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ RENDERER_TYPE renderer_type, /* i : IVAS rendering type */ const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ #ifdef DFT_STEREO_SPAR_MIXING , const int16_t sba_dirac_stereo_flag #endif ); void decision_matrix_enc( Loading