Loading lib_com/bitstream.c +10 −0 Original line number Diff line number Diff line Loading @@ -1975,11 +1975,21 @@ ivas_error preview_indices( } else if ( st_ivas->ivas_format == SBA_FORMAT ) { /* Read SBA planar flag and SBA order */ st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifdef SBA_ORDER_BITSTREAM st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); #endif #ifdef SBA_ORDER_BITSTREAM ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #else ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #endif } } Loading lib_com/cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,7 @@ #define MAX16B_FLT 32767.0f #define MIN16B_FLT ( -32768.0f ) #define PCM16_TO_FLT_FAC 32768.0f #define MDFT_NORM_SCALING ( 1.0f / PCM16_TO_FLT_FAC ) #define MAX_FRAME_COUNTER 200 #define MAX_BITS_PER_FRAME 10240 /* Bits per frame for max. bitrate 512kbps */ Loading lib_com/ivas_cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -831,6 +831,7 @@ typedef enum { #define SBA_PLANAR_BITS 1 #define SBA_ORDER_BITS 2 #define SBA_MIN_BRATE_HOA IVAS_256k #define SBA_NHARM_HOA3 16 #define SBA_T_DESIGN_11_SIZE 70 Loading lib_com/ivas_dirac_com.c +8 −0 Original line number Diff line number Diff line Loading @@ -82,7 +82,11 @@ ivas_error ivas_dirac_config( nCPE = &( (Encoder_Struct *) st_ivas )->nCPE; element_mode = &( (Encoder_Struct *) st_ivas )->hEncoderConfig->element_mode_init; nchan_transport = &( (Encoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_order; #else sba_order = ( (Encoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_planar; ivas_total_brate = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->ivas_total_brate; Fs = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->input_Fs; Loading @@ -107,7 +111,11 @@ ivas_error ivas_dirac_config( nCPE = &( (Decoder_Struct *) st_ivas )->nCPE; element_mode = &( (Decoder_Struct *) st_ivas )->element_mode_init; nchan_transport = &( (Decoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Decoder_Struct *) st_ivas )->sba_order; #else sba_order = ( (Decoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Decoder_Struct *) st_ivas )->sba_planar; ivas_total_brate = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->ivas_total_brate; Fs = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->output_Fs; Loading lib_com/ivas_prot.h +20 −10 Original line number Diff line number Diff line Loading @@ -2155,9 +2155,7 @@ void stereo_mdct_core_dec( void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ); Loading @@ -2175,9 +2173,7 @@ void parse_stereo_from_bitstream( STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo decoder structure */ Decoder_State **sts, /* i/o: decoder state structure */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i: flag core coding for sba */ #endif Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ ); Loading Loading @@ -2513,10 +2509,8 @@ ivas_error stereo_memory_enc( const int16_t max_bwidth, /* i : maximum audio bandwidth */ float *tdm_last_ratio, /* o : TD stereo last ratio */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t nchan_transport /* i : number transport chans */ #endif ); Loading Loading @@ -3013,11 +3007,7 @@ void ivas_dirac_param_est_enc( *----------------------------------------------------------------------------------*/ /*! r: SBA format mode */ #ifdef LBR_SBA_CORE_CODING_TUNING SBA_MODE ivas_sba_mode_select( #else int16_t ivas_sba_mode_select( #endif const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); Loading @@ -3043,15 +3033,25 @@ void ivas_init_dec_get_num_cldfb_instances( int16_t *numCldfbSyntheses /* o : number of CLDFB synthesis instances */ ); /*! r: Ambisonic (SBA) order */ int16_t ivas_sba_get_order( const int16_t nb_channels, /* i : Number of ambisonic channels */ const int16_t sba_planar /* i : SBA planar flag */ ); #ifdef SBA_ORDER_BITSTREAM /*! r: Ambisonic (SBA) order used for analysis and coding */ int16_t ivas_sba_get_analysis_order( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif int16_t ivas_sba_get_order_transport( const int16_t nchan_transport /* i : Number of transport channels */ ); /*!r: number of Ambisonic channels */ int16_t ivas_sba_get_nchan( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int16_t sba_planar /* i : SBA planar flag */ Loading Loading @@ -3717,7 +3717,9 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading Loading @@ -3866,6 +3868,10 @@ void ivas_spar_dec_upmixer( ivas_error ivas_spar_md_enc_open( ivas_spar_md_enc_state_t **hMdEnc, /* i/o: SPAR MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ #ifdef SBA_ORDER_BITSTREAM , const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif ); void ivas_spar_md_enc_close( Loading @@ -3878,6 +3884,10 @@ ivas_error ivas_spar_md_enc_process( ivas_spar_md_enc_in_buf_t *pIn_buf, BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ const int16_t dtx_silence_mode #ifdef SBA_ORDER_BITSTREAM , const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif ); void ivas_compute_spar_params( Loading Loading
lib_com/bitstream.c +10 −0 Original line number Diff line number Diff line Loading @@ -1975,11 +1975,21 @@ ivas_error preview_indices( } else if ( st_ivas->ivas_format == SBA_FORMAT ) { /* Read SBA planar flag and SBA order */ st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifdef SBA_ORDER_BITSTREAM st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); #endif #ifdef SBA_ORDER_BITSTREAM ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #else ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); #endif } } Loading
lib_com/cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,7 @@ #define MAX16B_FLT 32767.0f #define MIN16B_FLT ( -32768.0f ) #define PCM16_TO_FLT_FAC 32768.0f #define MDFT_NORM_SCALING ( 1.0f / PCM16_TO_FLT_FAC ) #define MAX_FRAME_COUNTER 200 #define MAX_BITS_PER_FRAME 10240 /* Bits per frame for max. bitrate 512kbps */ Loading
lib_com/ivas_cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -831,6 +831,7 @@ typedef enum { #define SBA_PLANAR_BITS 1 #define SBA_ORDER_BITS 2 #define SBA_MIN_BRATE_HOA IVAS_256k #define SBA_NHARM_HOA3 16 #define SBA_T_DESIGN_11_SIZE 70 Loading
lib_com/ivas_dirac_com.c +8 −0 Original line number Diff line number Diff line Loading @@ -82,7 +82,11 @@ ivas_error ivas_dirac_config( nCPE = &( (Encoder_Struct *) st_ivas )->nCPE; element_mode = &( (Encoder_Struct *) st_ivas )->hEncoderConfig->element_mode_init; nchan_transport = &( (Encoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_order; #else sba_order = ( (Encoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->sba_planar; ivas_total_brate = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->ivas_total_brate; Fs = ( (Encoder_Struct *) st_ivas )->hEncoderConfig->input_Fs; Loading @@ -107,7 +111,11 @@ ivas_error ivas_dirac_config( nCPE = &( (Decoder_Struct *) st_ivas )->nCPE; element_mode = &( (Decoder_Struct *) st_ivas )->element_mode_init; nchan_transport = &( (Decoder_Struct *) st_ivas )->nchan_transport; #ifndef SBA_ORDER_BITSTREAM sba_order = ( (Decoder_Struct *) st_ivas )->sba_order; #else sba_order = ( (Decoder_Struct *) st_ivas )->sba_analysis_order; #endif sba_planar = ( (Decoder_Struct *) st_ivas )->sba_planar; ivas_total_brate = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->ivas_total_brate; Fs = ( (Decoder_Struct *) st_ivas )->hDecoderConfig->output_Fs; Loading
lib_com/ivas_prot.h +20 −10 Original line number Diff line number Diff line Loading @@ -2155,9 +2155,7 @@ void stereo_mdct_core_dec( void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ); Loading @@ -2175,9 +2173,7 @@ void parse_stereo_from_bitstream( STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo decoder structure */ Decoder_State **sts, /* i/o: decoder state structure */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i: flag core coding for sba */ #endif Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ ); Loading Loading @@ -2513,10 +2509,8 @@ ivas_error stereo_memory_enc( const int16_t max_bwidth, /* i : maximum audio bandwidth */ float *tdm_last_ratio, /* o : TD stereo last ratio */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t nchan_transport /* i : number transport chans */ #endif ); Loading Loading @@ -3013,11 +3007,7 @@ void ivas_dirac_param_est_enc( *----------------------------------------------------------------------------------*/ /*! r: SBA format mode */ #ifdef LBR_SBA_CORE_CODING_TUNING SBA_MODE ivas_sba_mode_select( #else int16_t ivas_sba_mode_select( #endif const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); Loading @@ -3043,15 +3033,25 @@ void ivas_init_dec_get_num_cldfb_instances( int16_t *numCldfbSyntheses /* o : number of CLDFB synthesis instances */ ); /*! r: Ambisonic (SBA) order */ int16_t ivas_sba_get_order( const int16_t nb_channels, /* i : Number of ambisonic channels */ const int16_t sba_planar /* i : SBA planar flag */ ); #ifdef SBA_ORDER_BITSTREAM /*! r: Ambisonic (SBA) order used for analysis and coding */ int16_t ivas_sba_get_analysis_order( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif int16_t ivas_sba_get_order_transport( const int16_t nchan_transport /* i : Number of transport channels */ ); /*!r: number of Ambisonic channels */ int16_t ivas_sba_get_nchan( const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int16_t sba_planar /* i : SBA planar flag */ Loading Loading @@ -3717,7 +3717,9 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading Loading @@ -3866,6 +3868,10 @@ void ivas_spar_dec_upmixer( ivas_error ivas_spar_md_enc_open( ivas_spar_md_enc_state_t **hMdEnc, /* i/o: SPAR MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ #ifdef SBA_ORDER_BITSTREAM , const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif ); void ivas_spar_md_enc_close( Loading @@ -3878,6 +3884,10 @@ ivas_error ivas_spar_md_enc_process( ivas_spar_md_enc_in_buf_t *pIn_buf, BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ const int16_t dtx_silence_mode #ifdef SBA_ORDER_BITSTREAM , const int16_t sba_order /* i : Ambisonic (SBA) order */ #endif ); void ivas_compute_spar_params( Loading