Loading lib_com/cnst.h +2 −1 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ enum{ #define INV_LOG_2_FX 23637 /*Q14*//* 1/log(2) */ #endif // IVAS_FLOAT_FIXED #define INV_SQRT_2 0.70710676908493f /* 1/sqrt(2) */ #define INV_SQRT_2_Q30 759250112 /* 1/sqrt(2) in Q30*/ #define INV_SQRT_2_Q15 23170 /* 1/sqrt(2) in Q15 */ #define INV_SQRT_2_Q31 (Word32)1.51850022e+09 /* 1/sqrt(2) in Q31 */ Loading Loading @@ -3042,7 +3043,7 @@ enum #define EVS_2PI_FX 51472 /* 2 * pi in Q13 */ #define EVS_PI_FX_Q27 421657428 /* pi in Q28 */ #define EVS_2PI_FX_Q27 843314856 /* 2 * pi in Q28 */ #define EVS_PI_BY_2_FX (Word16)(0x3244) #define EVS_PI_BY_2_FX (Word16)(0x3244) // Q13 //#define EVS_PI_FX (Word16)(0x6488) #define LG10 24660 /* 10*log10(2) in Q13 */ Loading lib_com/ivas_prot.h +33 −6 Original line number Diff line number Diff line Loading @@ -1456,12 +1456,13 @@ ISM_MODE ivas_ism_mode_select( ivas_error ivas_param_ism_enc_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifndef IVAS_FLOAT_FIXED void ivas_param_ism_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ float *data[MAX_NUM_OBJECTS], /* i : input signal */ const int16_t input_frame /* i : input frame length per channel */ ); #endif void ivas_param_ism_enc_close( PARAM_ISM_CONFIG_HANDLE *hParamIsm, /* i/o: ParamISM handle */ Loading @@ -1473,11 +1474,13 @@ void ivas_ism_metadata_close( const int16_t first_idx /* i : index of first handle to deallocate */ ); #ifndef IVAS_FLOAT_FIXED void ivas_param_ism_stereo_dmx( Encoder_Struct *st_ivas, /* i : IVAS encoder structure */ float *data[MAX_NUM_OBJECTS], /* i/o: input signal/stereo dmx */ const int16_t input_frame /* i : Length of input frame */ ); #endif void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i/o: IVAS Param ISM Config Structure */ Loading Loading @@ -7828,19 +7831,28 @@ void ivas_filter_process_fx( /*----------------------------------------------------------------------------------* * OSBA prototypes *----------------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED ivas_error ivas_osba_enc_open_fx( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); #else ivas_error ivas_osba_enc_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_osba_enc_close_fx( OSBA_ENC_HANDLE *hOSba /* i/o: encoder OSBA handle */ ); #else void ivas_osba_enc_close( OSBA_ENC_HANDLE *hOSba /* i/o: encoder OSBA handle */ ); #endif ivas_error ivas_osba_enc_reconfig( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifndef IVAS_FLOAT_FIXED void ivas_osba_enc( OSBA_ENC_HANDLE hOSba, /* i/o: OSBA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ Loading @@ -7852,7 +7864,20 @@ void ivas_osba_enc( const int32_t input_Fs, /* i : input sampling rate */ const int16_t sba_planar /* i : planar SBA flag */ ); #else void ivas_osba_enc_fx( OSBA_ENC_HANDLE hOSba, /* i/o: OSBA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ Word32 *data_in_fx[], /* i/o: Input / transport audio signals */ const int16_t input_frame, /* i : Input frame size */ const int16_t nchan_ism, /* i : Number of objects for parameter analysis */ const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t sba_analysis_order, /* i : SBA order evaluated in DirAC/SPAR encoder */ const int32_t input_Fs, /* i : input sampling rate */ const int16_t sba_planar, /* i : planar SBA flag */ Word16 *q_data ); #endif ivas_error ivas_osba_data_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ ); Loading Loading @@ -7952,6 +7977,7 @@ void ivas_omasa_set_config( #endif // !IVAS_FLOAT_FIXED #ifndef IVAS_FLOAT_FIXED void ivas_omasa_enc( OMASA_ENC_HANDLE hOMasa, /* i/o: OMASA encoder handle */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA encoder handle */ Loading @@ -7964,6 +7990,7 @@ void ivas_omasa_enc( float *data_separated_object, /* o : Separated object audio signal */ int16_t* idx_separated_object /* o : Index of the separated object */ ); #endif // !IVAS_FLOAT_FIXED void ivas_set_surplus_brate_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Loading lib_com/ivas_prot_fx.h +36 −0 Original line number Diff line number Diff line Loading @@ -2481,6 +2481,13 @@ ivas_error ivas_jbm_dec_render_fx( Word16 *data /* o : output synthesis signal */ ); void ivas_sba_zero_vert_comp_fx( Word32 *sba_data[], /* i : SBA signals */ const Word16 sba_order, /* i : SBA order */ const Word16 sba_planar, /* i : SBA planar flag */ const Word16 input_frame /* i : frame length */ ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ MC_MODE ivas_mc_mode_select_fx( const MC_LS_SETUP mc_ls_setup, /* i : MC loudspeaker setup */ Loading Loading @@ -3088,6 +3095,21 @@ void unclr_classifier_td_fx( ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_param_ism_stereo_dmx_fx( Encoder_Struct *st_ivas, /* i : IVAS encoder structure */ Word32 *data[MAX_NUM_OBJECTS], /* i/o: input signal/stereo dmx Qx */ const Word16 input_frame /* i : Length of input frame */ ); void ivas_param_ism_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Word32 *data[MAX_NUM_OBJECTS], /* i : input signal q_pcm_in */ const Word16 input_frame, /* i : input frame length per channel */ const Word16 q_pcm_in ); #endif ISM_MODE ivas_ism_mode_select( const Word16 nchan_inp, /* i : number of input objects */ const Word32 ivas_total_brate /* i : IVAS total bitrate */ Loading Loading @@ -3122,4 +3144,18 @@ Word16 ivas_omasa_ener_brate_fx( const Word16 input_frame, /* i : Input frame size */ Word16 data_e /*i:exponent for data_f */ ); void ivas_omasa_enc( OMASA_ENC_HANDLE hOMasa, /* i/o: OMASA encoder handle */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ float *data_in_f[], /* i/o: Input / transport audio signals */ Word32 *data_in[], /* i/o: Input / transport audio signals */ Word16 q_data, /* i:Q0 Stores the q for data_in_f */ const int16_t input_frame, /* i : Input frame size */ const int16_t nchan_transport, /* i : Number of transport channels */ const int16_t nchan_ism, /* i : Number of objects for parameter analysis */ const ISM_MODE ism_mode, /* i : ISM mode */ float *data_separated_object, /* o : Separated object audio signal */ int16_t *idx_separated_object /* o : Index of the separated object */ ); #endif lib_com/ivas_sba_config.c +28 −0 Original line number Diff line number Diff line Loading @@ -563,7 +563,35 @@ void ivas_sba_get_spar_hoa_md_flag_fx( * * Zero vertical Ambisonics components *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED void ivas_sba_zero_vert_comp_fx( Word32 *sba_data[], /* i : SBA signals */ const Word16 sba_order, /* i : SBA order */ const Word16 sba_planar, /* i : SBA planar flag */ const Word16 input_frame /* i : frame length */ ) { Word16 i, j; /* Channels in the range i^2+1 to (i+1)^2 -1 are zeroed (retain only first and last channel for that order) */ FOR( i = 1; i <= sba_order; i++ ) { test(); /* Keep Z if not planar */ IF( !sba_planar && EQ_16( i, 1 ) ) { continue; } FOR( j = ( i * i + 1 ); j < ( ( i + 1 ) * ( i + 1 ) - 1 ); j++ ) { set_val_Word32( sba_data[j], 0, input_frame ); } } return; } #endif void ivas_sba_zero_vert_comp( float *sba_data[], /* i : SBA signals */ const int16_t sba_order, /* i : SBA order */ Loading lib_com/ivas_stat_com.h +1 −1 Original line number Diff line number Diff line Loading @@ -922,7 +922,7 @@ typedef struct ivas_param_ism_data_structure Word16 last_dmx_gain_fx; Word16 last_dmx_gain_e; Word16 last_cardioid_left_fx[MAX_NUM_OBJECTS]; Word16 last_cardioid_left_fx[MAX_NUM_OBJECTS]; // Q14 } PARAM_ISM_CONFIG_DATA, *PARAM_ISM_CONFIG_HANDLE; #ifdef IVAS_FLOAT_FIXED Loading Loading
lib_com/cnst.h +2 −1 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ enum{ #define INV_LOG_2_FX 23637 /*Q14*//* 1/log(2) */ #endif // IVAS_FLOAT_FIXED #define INV_SQRT_2 0.70710676908493f /* 1/sqrt(2) */ #define INV_SQRT_2_Q30 759250112 /* 1/sqrt(2) in Q30*/ #define INV_SQRT_2_Q15 23170 /* 1/sqrt(2) in Q15 */ #define INV_SQRT_2_Q31 (Word32)1.51850022e+09 /* 1/sqrt(2) in Q31 */ Loading Loading @@ -3042,7 +3043,7 @@ enum #define EVS_2PI_FX 51472 /* 2 * pi in Q13 */ #define EVS_PI_FX_Q27 421657428 /* pi in Q28 */ #define EVS_2PI_FX_Q27 843314856 /* 2 * pi in Q28 */ #define EVS_PI_BY_2_FX (Word16)(0x3244) #define EVS_PI_BY_2_FX (Word16)(0x3244) // Q13 //#define EVS_PI_FX (Word16)(0x6488) #define LG10 24660 /* 10*log10(2) in Q13 */ Loading
lib_com/ivas_prot.h +33 −6 Original line number Diff line number Diff line Loading @@ -1456,12 +1456,13 @@ ISM_MODE ivas_ism_mode_select( ivas_error ivas_param_ism_enc_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifndef IVAS_FLOAT_FIXED void ivas_param_ism_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ float *data[MAX_NUM_OBJECTS], /* i : input signal */ const int16_t input_frame /* i : input frame length per channel */ ); #endif void ivas_param_ism_enc_close( PARAM_ISM_CONFIG_HANDLE *hParamIsm, /* i/o: ParamISM handle */ Loading @@ -1473,11 +1474,13 @@ void ivas_ism_metadata_close( const int16_t first_idx /* i : index of first handle to deallocate */ ); #ifndef IVAS_FLOAT_FIXED void ivas_param_ism_stereo_dmx( Encoder_Struct *st_ivas, /* i : IVAS encoder structure */ float *data[MAX_NUM_OBJECTS], /* i/o: input signal/stereo dmx */ const int16_t input_frame /* i : Length of input frame */ ); #endif void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i/o: IVAS Param ISM Config Structure */ Loading Loading @@ -7828,19 +7831,28 @@ void ivas_filter_process_fx( /*----------------------------------------------------------------------------------* * OSBA prototypes *----------------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED ivas_error ivas_osba_enc_open_fx( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); #else ivas_error ivas_osba_enc_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_osba_enc_close_fx( OSBA_ENC_HANDLE *hOSba /* i/o: encoder OSBA handle */ ); #else void ivas_osba_enc_close( OSBA_ENC_HANDLE *hOSba /* i/o: encoder OSBA handle */ ); #endif ivas_error ivas_osba_enc_reconfig( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifndef IVAS_FLOAT_FIXED void ivas_osba_enc( OSBA_ENC_HANDLE hOSba, /* i/o: OSBA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ Loading @@ -7852,7 +7864,20 @@ void ivas_osba_enc( const int32_t input_Fs, /* i : input sampling rate */ const int16_t sba_planar /* i : planar SBA flag */ ); #else void ivas_osba_enc_fx( OSBA_ENC_HANDLE hOSba, /* i/o: OSBA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ Word32 *data_in_fx[], /* i/o: Input / transport audio signals */ const int16_t input_frame, /* i : Input frame size */ const int16_t nchan_ism, /* i : Number of objects for parameter analysis */ const ISM_MODE ism_mode, /* i : ISM mode */ const int16_t sba_analysis_order, /* i : SBA order evaluated in DirAC/SPAR encoder */ const int32_t input_Fs, /* i : input sampling rate */ const int16_t sba_planar, /* i : planar SBA flag */ Word16 *q_data ); #endif ivas_error ivas_osba_data_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ ); Loading Loading @@ -7952,6 +7977,7 @@ void ivas_omasa_set_config( #endif // !IVAS_FLOAT_FIXED #ifndef IVAS_FLOAT_FIXED void ivas_omasa_enc( OMASA_ENC_HANDLE hOMasa, /* i/o: OMASA encoder handle */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA encoder handle */ Loading @@ -7964,6 +7990,7 @@ void ivas_omasa_enc( float *data_separated_object, /* o : Separated object audio signal */ int16_t* idx_separated_object /* o : Index of the separated object */ ); #endif // !IVAS_FLOAT_FIXED void ivas_set_surplus_brate_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Loading
lib_com/ivas_prot_fx.h +36 −0 Original line number Diff line number Diff line Loading @@ -2481,6 +2481,13 @@ ivas_error ivas_jbm_dec_render_fx( Word16 *data /* o : output synthesis signal */ ); void ivas_sba_zero_vert_comp_fx( Word32 *sba_data[], /* i : SBA signals */ const Word16 sba_order, /* i : SBA order */ const Word16 sba_planar, /* i : SBA planar flag */ const Word16 input_frame /* i : frame length */ ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ MC_MODE ivas_mc_mode_select_fx( const MC_LS_SETUP mc_ls_setup, /* i : MC loudspeaker setup */ Loading Loading @@ -3088,6 +3095,21 @@ void unclr_classifier_td_fx( ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_param_ism_stereo_dmx_fx( Encoder_Struct *st_ivas, /* i : IVAS encoder structure */ Word32 *data[MAX_NUM_OBJECTS], /* i/o: input signal/stereo dmx Qx */ const Word16 input_frame /* i : Length of input frame */ ); void ivas_param_ism_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Word32 *data[MAX_NUM_OBJECTS], /* i : input signal q_pcm_in */ const Word16 input_frame, /* i : input frame length per channel */ const Word16 q_pcm_in ); #endif ISM_MODE ivas_ism_mode_select( const Word16 nchan_inp, /* i : number of input objects */ const Word32 ivas_total_brate /* i : IVAS total bitrate */ Loading Loading @@ -3122,4 +3144,18 @@ Word16 ivas_omasa_ener_brate_fx( const Word16 input_frame, /* i : Input frame size */ Word16 data_e /*i:exponent for data_f */ ); void ivas_omasa_enc( OMASA_ENC_HANDLE hOMasa, /* i/o: OMASA encoder handle */ MASA_ENCODER_HANDLE hMasa, /* i/o: MASA encoder handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handle */ float *data_in_f[], /* i/o: Input / transport audio signals */ Word32 *data_in[], /* i/o: Input / transport audio signals */ Word16 q_data, /* i:Q0 Stores the q for data_in_f */ const int16_t input_frame, /* i : Input frame size */ const int16_t nchan_transport, /* i : Number of transport channels */ const int16_t nchan_ism, /* i : Number of objects for parameter analysis */ const ISM_MODE ism_mode, /* i : ISM mode */ float *data_separated_object, /* o : Separated object audio signal */ int16_t *idx_separated_object /* o : Index of the separated object */ ); #endif
lib_com/ivas_sba_config.c +28 −0 Original line number Diff line number Diff line Loading @@ -563,7 +563,35 @@ void ivas_sba_get_spar_hoa_md_flag_fx( * * Zero vertical Ambisonics components *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED void ivas_sba_zero_vert_comp_fx( Word32 *sba_data[], /* i : SBA signals */ const Word16 sba_order, /* i : SBA order */ const Word16 sba_planar, /* i : SBA planar flag */ const Word16 input_frame /* i : frame length */ ) { Word16 i, j; /* Channels in the range i^2+1 to (i+1)^2 -1 are zeroed (retain only first and last channel for that order) */ FOR( i = 1; i <= sba_order; i++ ) { test(); /* Keep Z if not planar */ IF( !sba_planar && EQ_16( i, 1 ) ) { continue; } FOR( j = ( i * i + 1 ); j < ( ( i + 1 ) * ( i + 1 ) - 1 ); j++ ) { set_val_Word32( sba_data[j], 0, input_frame ); } } return; } #endif void ivas_sba_zero_vert_comp( float *sba_data[], /* i : SBA signals */ const int16_t sba_order, /* i : SBA order */ Loading
lib_com/ivas_stat_com.h +1 −1 Original line number Diff line number Diff line Loading @@ -922,7 +922,7 @@ typedef struct ivas_param_ism_data_structure Word16 last_dmx_gain_fx; Word16 last_dmx_gain_e; Word16 last_cardioid_left_fx[MAX_NUM_OBJECTS]; Word16 last_cardioid_left_fx[MAX_NUM_OBJECTS]; // Q14 } PARAM_ISM_CONFIG_DATA, *PARAM_ISM_CONFIG_HANDLE; #ifdef IVAS_FLOAT_FIXED Loading