Loading lib_com/ivas_cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,10 @@ typedef enum { DIRAC_OPEN, /* initialize to default value */ DIRAC_RECONFIGURE /* HOA3 */ #ifdef SBA_BR_SWITCHING_2 , DIRAC_RECONFIGURE_MODE #endif } DIRAC_CONFIG_FLAG; Loading lib_com/ivas_prot.h +13 −2 Original line number Diff line number Diff line Loading @@ -112,8 +112,19 @@ ivas_error ivas_sba_enc_reinit( #endif #ifdef SBA_BR_SWITCHING int16_t get_sba_reinit_flag( int32_t ivas_total_bitrate, /* i: current bitrate */ int32_t last_ivas_total_brate /* i: previous bitrate */ int32_t ivas_total_bitrate, /* i : Current bitrate */ int32_t last_ivas_total_brate /* i : Previous bitrate */ #ifdef SBA_BR_SWITCHING_2 , int16_t sba_order #endif ); #endif #ifdef SBA_BR_SWITCHING_2 ivas_error ivas_spar_md_enc_init ( ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif ivas_error ivas_sba_enc_reconfigure( Loading lib_com/ivas_sba_config.c +24 −1 Original line number Diff line number Diff line Loading @@ -82,14 +82,37 @@ SBA_MODE ivas_sba_mode_select( int16_t get_sba_reinit_flag( int32_t ivas_total_bitrate, /* i : Current bitrate */ int32_t last_ivas_total_brate /* i : Previous bitrate */ #ifdef SBA_BR_SWITCHING_2 , int16_t sba_order #endif ) { int16_t sba_reinit_flag; sba_reinit_flag = 0; #ifdef SBA_BR_SWITCHING_2 if ( ivas_total_bitrate != last_ivas_total_brate && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) #else if ( ivas_total_bitrate != last_ivas_total_brate && ( last_ivas_total_brate > IVAS_SID_5k2 ) && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) #endif { #ifdef SBA_BR_SWITCHING_2 int16_t sba_analysis_order, nchan_transport_old, nchan_transport_new; SBA_MODE last_sba_mode, current_sba_mode; sba_analysis_order = ivas_sba_get_analysis_order( last_ivas_total_brate, sba_order ); nchan_transport_old = ivas_get_sba_num_TCs( last_ivas_total_brate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) ); last_sba_mode = ivas_sba_mode_select( last_ivas_total_brate ); current_sba_mode = ivas_sba_mode_select( ivas_total_bitrate ); sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_bitrate, sba_order ); nchan_transport_new = ivas_get_sba_num_TCs( ivas_total_bitrate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) ); if ( ( current_sba_mode != last_sba_mode ) || ( nchan_transport_new != nchan_transport_old ) ) { #endif sba_reinit_flag = 1; #ifdef SBA_BR_SWITCHING_2 } #endif } return sba_reinit_flag; Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ /*#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*/ #define SBA_BR_SWITCHING /* Issue 114: Changes for sba bit rate switching*/ #define FIX_ITD /* Contribution 16: TD renderer ITD improvement and code cleanup */ #define BRATE_SWITCHING_RENDERING /* Bitrate switching changes related to the renderers */ Loading lib_dec/ivas_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,9 @@ ivas_error ivas_dec( if ( !st_ivas->bfi ) /* do not update if first frame(s) are lost or NO_DATA */ { st_ivas->hDecoderConfig->last_ivas_total_brate = ivas_total_brate; #ifdef SBA_BR_SWITCHING_2 st_ivas->last_active_ivas_total_brate = ( ivas_total_brate <= IVAS_SID_5k2 ) ? st_ivas->last_active_ivas_total_brate : ivas_total_brate; #endif } if ( st_ivas->ini_frame < MAX_FRAME_COUNTER && !( st_ivas->bfi && st_ivas->ini_frame == 0 ) ) /* keep "st_ivas->ini_frame = 0" until first good received frame */ Loading Loading
lib_com/ivas_cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,10 @@ typedef enum { DIRAC_OPEN, /* initialize to default value */ DIRAC_RECONFIGURE /* HOA3 */ #ifdef SBA_BR_SWITCHING_2 , DIRAC_RECONFIGURE_MODE #endif } DIRAC_CONFIG_FLAG; Loading
lib_com/ivas_prot.h +13 −2 Original line number Diff line number Diff line Loading @@ -112,8 +112,19 @@ ivas_error ivas_sba_enc_reinit( #endif #ifdef SBA_BR_SWITCHING int16_t get_sba_reinit_flag( int32_t ivas_total_bitrate, /* i: current bitrate */ int32_t last_ivas_total_brate /* i: previous bitrate */ int32_t ivas_total_bitrate, /* i : Current bitrate */ int32_t last_ivas_total_brate /* i : Previous bitrate */ #ifdef SBA_BR_SWITCHING_2 , int16_t sba_order #endif ); #endif #ifdef SBA_BR_SWITCHING_2 ivas_error ivas_spar_md_enc_init ( ivas_spar_md_enc_state_t *hMdEnc, /* o : MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif ivas_error ivas_sba_enc_reconfigure( Loading
lib_com/ivas_sba_config.c +24 −1 Original line number Diff line number Diff line Loading @@ -82,14 +82,37 @@ SBA_MODE ivas_sba_mode_select( int16_t get_sba_reinit_flag( int32_t ivas_total_bitrate, /* i : Current bitrate */ int32_t last_ivas_total_brate /* i : Previous bitrate */ #ifdef SBA_BR_SWITCHING_2 , int16_t sba_order #endif ) { int16_t sba_reinit_flag; sba_reinit_flag = 0; #ifdef SBA_BR_SWITCHING_2 if ( ivas_total_bitrate != last_ivas_total_brate && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) #else if ( ivas_total_bitrate != last_ivas_total_brate && ( last_ivas_total_brate > IVAS_SID_5k2 ) && ( ivas_total_bitrate > IVAS_SID_5k2 ) ) #endif { #ifdef SBA_BR_SWITCHING_2 int16_t sba_analysis_order, nchan_transport_old, nchan_transport_new; SBA_MODE last_sba_mode, current_sba_mode; sba_analysis_order = ivas_sba_get_analysis_order( last_ivas_total_brate, sba_order ); nchan_transport_old = ivas_get_sba_num_TCs( last_ivas_total_brate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) ); last_sba_mode = ivas_sba_mode_select( last_ivas_total_brate ); current_sba_mode = ivas_sba_mode_select( ivas_total_bitrate ); sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_bitrate, sba_order ); nchan_transport_new = ivas_get_sba_num_TCs( ivas_total_bitrate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) ); if ( ( current_sba_mode != last_sba_mode ) || ( nchan_transport_new != nchan_transport_old ) ) { #endif sba_reinit_flag = 1; #ifdef SBA_BR_SWITCHING_2 } #endif } return sba_reinit_flag; Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ /*#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*/ #define SBA_BR_SWITCHING /* Issue 114: Changes for sba bit rate switching*/ #define FIX_ITD /* Contribution 16: TD renderer ITD improvement and code cleanup */ #define BRATE_SWITCHING_RENDERING /* Bitrate switching changes related to the renderers */ Loading
lib_dec/ivas_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,9 @@ ivas_error ivas_dec( if ( !st_ivas->bfi ) /* do not update if first frame(s) are lost or NO_DATA */ { st_ivas->hDecoderConfig->last_ivas_total_brate = ivas_total_brate; #ifdef SBA_BR_SWITCHING_2 st_ivas->last_active_ivas_total_brate = ( ivas_total_brate <= IVAS_SID_5k2 ) ? st_ivas->last_active_ivas_total_brate : ivas_total_brate; #endif } if ( st_ivas->ini_frame < MAX_FRAME_COUNTER && !( st_ivas->bfi && st_ivas->ini_frame == 0 ) ) /* keep "st_ivas->ini_frame = 0" until first good received frame */ Loading