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 @@ -3974,6 +3986,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 num_channels /* 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 @@ -4821,6 +4837,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, order ); Loading lib_com/options.h 100755 → 100644 +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ #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 */ /* ################## End DEVELOPMENT switches ######################### */ Loading lib_dec/ivas_spar_decoder.c +21 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,12 @@ ivas_error ivas_spar_dec_open( } /* MD handle */ if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal ) ) != IVAS_ERR_OK ) if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal #ifdef SBA_HOA_HBR_IMPROV , sba_order_internal #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -645,7 +650,16 @@ static void ivas_spar_dec_MD( { ivas_parse_spar_header( hDecoderConfig->ivas_total_brate, sba_order, st0, &table_idx ); #ifdef SBA_HOA_HBR_IMPROV if ( hSpar->hMdDec->spar_hoa_md_flag ) { hSpar->hMdDec->spar_md.num_bands = IVAS_MAX_NUM_BANDS; } else #endif { hSpar->hMdDec->spar_md.num_bands = min( SPAR_DIRAC_SPLIT_START_BAND, IVAS_MAX_NUM_BANDS ); } if ( hSpar->hMdDec->table_idx != table_idx ) { Loading Loading @@ -788,7 +802,12 @@ void ivas_spar_get_parameters( weight = ivas_spar_get_cldfb_slot_gain( hSpar, hDecoderConfig, ts, &ts0, &ts1, &weight_20ms ); #ifdef SBA_HOA_HBR_IMPROV split_band = hSpar->hMdDec->spar_md.num_bands; #else split_band = SPAR_DIRAC_SPLIT_START_BAND; #endif for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) { for ( out_ch = 0; out_ch < num_ch_out; out_ch++ ) 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 @@ -3974,6 +3986,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 num_channels /* 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 @@ -4821,6 +4837,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, order ); Loading
lib_com/options.h 100755 → 100644 +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ #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 */ /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_dec/ivas_spar_decoder.c +21 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,12 @@ ivas_error ivas_spar_dec_open( } /* MD handle */ if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal ) ) != IVAS_ERR_OK ) if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal #ifdef SBA_HOA_HBR_IMPROV , sba_order_internal #endif ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -645,7 +650,16 @@ static void ivas_spar_dec_MD( { ivas_parse_spar_header( hDecoderConfig->ivas_total_brate, sba_order, st0, &table_idx ); #ifdef SBA_HOA_HBR_IMPROV if ( hSpar->hMdDec->spar_hoa_md_flag ) { hSpar->hMdDec->spar_md.num_bands = IVAS_MAX_NUM_BANDS; } else #endif { hSpar->hMdDec->spar_md.num_bands = min( SPAR_DIRAC_SPLIT_START_BAND, IVAS_MAX_NUM_BANDS ); } if ( hSpar->hMdDec->table_idx != table_idx ) { Loading Loading @@ -788,7 +802,12 @@ void ivas_spar_get_parameters( weight = ivas_spar_get_cldfb_slot_gain( hSpar, hDecoderConfig, ts, &ts0, &ts1, &weight_20ms ); #ifdef SBA_HOA_HBR_IMPROV split_band = hSpar->hMdDec->spar_md.num_bands; #else split_band = SPAR_DIRAC_SPLIT_START_BAND; #endif for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) { for ( out_ch = 0; out_ch < num_ch_out; out_ch++ ) Loading