Loading lib_com/ivas_prot.h +20 −0 Original line number Diff line number Diff line Loading @@ -3028,6 +3028,10 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode #endif ); /*----------------------------------------------------------------------------------* Loading Loading @@ -3087,6 +3091,14 @@ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #ifdef SBA_HOA_HBR_IMPROV /*! r: get the flag to code SPAR HOA MD for all band */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); #endif void ivas_sba_zero_vert_comp( float sba_data[][L_FRAME48k], /* i/o: SBA data frame */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -3982,6 +3994,10 @@ ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t nchan /* i : number of internal channels */ #ifdef SBA_HOA_HBR_IMPROV , const int16_t sba_order /* i : flag to send HOA MD for all bands */ #endif ); void ivas_spar_md_dec_close( Loading Loading @@ -4829,6 +4845,10 @@ void computeReferencePower_enc( float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands /* i : Number of frequency bands */ #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode /* i : SBA mode */ #endif ); Loading lib_com/ivas_sba_config.c +25 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,31 @@ int16_t ivas_sba_get_nchan_metadata( return ( nb_channels ); } #ifdef SBA_HOA_HBR_IMPROV /*-------------------------------------------------------------------* * ivas_sba_get_spar_hoa_md_flag() * * et the flag to code SPAR HOA MD for all band *-------------------------------------------------------------------*/ /*! r: get the flag to code SPAR HOA MD for all band */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ) { int16_t spar_hoa_md_flag = 0; if ( sba_order > 1 && ivas_total_brate >= IVAS_256k ) { spar_hoa_md_flag = 1; } else { spar_hoa_md_flag = 0; } return spar_hoa_md_flag; } #endif /*-------------------------------------------------------------------* * ivas_sba_zero_vert_comp() Loading lib_com/ivas_spar_com.c +2 −1 Original line number Diff line number Diff line Loading @@ -1737,10 +1737,11 @@ void ivas_get_spar_md_from_dirac( /*SPAR from DirAC*/ set_f( response_avg, 0.0f, MAX_OUTPUT_CHANNELS ); #ifndef SBA_HOA_HBR_IMPROV set_f( hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].pred_re, 0.0f, IVAS_SPAR_MAX_CH - 1 ); set_f( &hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].C_re[0][0], 0.0f, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_f( &hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].P_re[0], 0.0f, ( IVAS_SPAR_MAX_CH - 1 ) ); #endif if ( n_ts > 1 ) { ivas_dirac_dec_get_response( (int16_t) azi_dirac[band][i_ts], (int16_t) ele_dirac[band][i_ts], response_avg, sba_order ); Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -151,10 +151,10 @@ #define SBA_SPAR_HARM /* Issue 92: maintenance of the SBA SPAR functions */ #define FIX_155_HP20_ISSUE /* Issue 155: apply hp20 on all input channels instead of just 2 channels */ #define EFAP_FIX_POLY /* Issue 167: fix bug in EFAP polygon selection */ #define SBA_HOA_HBR_IMPROV /* issue 91: Improvements to SBA high bitrate HOA3 coding */ #define SBA_BITRATE_SWITCHING /* Issue 114: suppport bitrate switching in SBA - CORECODER_BITRATE_SWITCHING must be defined */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif lib_dec/ivas_efap.c +3 −2 Original line number Diff line number Diff line Loading @@ -1602,7 +1602,7 @@ static float vertex_distance( #ifdef EFAP_FIX_POLY /*-------------------------------------------------------------------------* * point_plane_distance() * point_poly_distance() * * Compute the signed distance between a point and polygon *-------------------------------------------------------------------------*/ Loading Loading @@ -2114,7 +2114,8 @@ static int16_t get_poly_num( int16_t i; #ifdef EFAP_FIX_POLY int16_t num_poly, found_poly; int16_t poly_tmp[EFAP_MAX_CHAN_NUM], poly_dist[EFAP_MAX_CHAN_NUM]; int16_t poly_tmp[EFAP_MAX_CHAN_NUM]; float poly_dist[EFAP_MAX_CHAN_NUM]; float dist_tmp; float pos[3]; Loading Loading
lib_com/ivas_prot.h +20 −0 Original line number Diff line number Diff line Loading @@ -3028,6 +3028,10 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode #endif ); /*----------------------------------------------------------------------------------* Loading Loading @@ -3087,6 +3091,14 @@ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #ifdef SBA_HOA_HBR_IMPROV /*! r: get the flag to code SPAR HOA MD for all band */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); #endif void ivas_sba_zero_vert_comp( float sba_data[][L_FRAME48k], /* i/o: SBA data frame */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ Loading Loading @@ -3982,6 +3994,10 @@ ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t nchan /* i : number of internal channels */ #ifdef SBA_HOA_HBR_IMPROV , const int16_t sba_order /* i : flag to send HOA MD for all bands */ #endif ); void ivas_spar_md_dec_close( Loading Loading @@ -4829,6 +4845,10 @@ void computeReferencePower_enc( float *reference_power, /* o : Estimated power */ const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands /* i : Number of frequency bands */ #ifdef SBA_HOA_HBR_IMPROV , const SBA_MODE sba_mode /* i : SBA mode */ #endif ); Loading
lib_com/ivas_sba_config.c +25 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,31 @@ int16_t ivas_sba_get_nchan_metadata( return ( nb_channels ); } #ifdef SBA_HOA_HBR_IMPROV /*-------------------------------------------------------------------* * ivas_sba_get_spar_hoa_md_flag() * * et the flag to code SPAR HOA MD for all band *-------------------------------------------------------------------*/ /*! r: get the flag to code SPAR HOA MD for all band */ int16_t ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int32_t ivas_total_brate /* i : IVAS total bitrate */ ) { int16_t spar_hoa_md_flag = 0; if ( sba_order > 1 && ivas_total_brate >= IVAS_256k ) { spar_hoa_md_flag = 1; } else { spar_hoa_md_flag = 0; } return spar_hoa_md_flag; } #endif /*-------------------------------------------------------------------* * ivas_sba_zero_vert_comp() Loading
lib_com/ivas_spar_com.c +2 −1 Original line number Diff line number Diff line Loading @@ -1737,10 +1737,11 @@ void ivas_get_spar_md_from_dirac( /*SPAR from DirAC*/ set_f( response_avg, 0.0f, MAX_OUTPUT_CHANNELS ); #ifndef SBA_HOA_HBR_IMPROV set_f( hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].pred_re, 0.0f, IVAS_SPAR_MAX_CH - 1 ); set_f( &hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].C_re[0][0], 0.0f, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) ); set_f( &hSpar_md->band_coeffs[band + i_ts * IVAS_MAX_NUM_BANDS].P_re[0], 0.0f, ( IVAS_SPAR_MAX_CH - 1 ) ); #endif if ( n_ts > 1 ) { ivas_dirac_dec_get_response( (int16_t) azi_dirac[band][i_ts], (int16_t) ele_dirac[band][i_ts], response_avg, sba_order ); Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -151,10 +151,10 @@ #define SBA_SPAR_HARM /* Issue 92: maintenance of the SBA SPAR functions */ #define FIX_155_HP20_ISSUE /* Issue 155: apply hp20 on all input channels instead of just 2 channels */ #define EFAP_FIX_POLY /* Issue 167: fix bug in EFAP polygon selection */ #define SBA_HOA_HBR_IMPROV /* issue 91: Improvements to SBA high bitrate HOA3 coding */ #define SBA_BITRATE_SWITCHING /* Issue 114: suppport bitrate switching in SBA - CORECODER_BITRATE_SWITCHING must be defined */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif
lib_dec/ivas_efap.c +3 −2 Original line number Diff line number Diff line Loading @@ -1602,7 +1602,7 @@ static float vertex_distance( #ifdef EFAP_FIX_POLY /*-------------------------------------------------------------------------* * point_plane_distance() * point_poly_distance() * * Compute the signed distance between a point and polygon *-------------------------------------------------------------------------*/ Loading Loading @@ -2114,7 +2114,8 @@ static int16_t get_poly_num( int16_t i; #ifdef EFAP_FIX_POLY int16_t num_poly, found_poly; int16_t poly_tmp[EFAP_MAX_CHAN_NUM], poly_dist[EFAP_MAX_CHAN_NUM]; int16_t poly_tmp[EFAP_MAX_CHAN_NUM]; float poly_dist[EFAP_MAX_CHAN_NUM]; float dist_tmp; float pos[3]; Loading