Loading lib_com/ivas_cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -175,7 +175,11 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading lib_com/ivas_prot.h +7 −5 Original line number Diff line number Diff line Loading @@ -868,12 +868,13 @@ void ivas_jbm_dec_get_md_map( int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *tc[], /* i : transport channels */ const int16_t output_frame /* i : output frame size */ ); #endif void ivas_jbm_dec_get_md_map_even_spacing( const int16_t len, /* i : length of the modfied frames in metadata slots */ Loading Loading @@ -1116,7 +1117,7 @@ void ivas_ism_dec_digest_tc( void ivas_param_ism_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); void ivas_param_ism_dec_dequant_md( Loading @@ -1128,13 +1129,14 @@ void ivas_param_ism_dec_prepare_renderer( const uint16_t nCldfbSlots /* i : number of CLDFB slots in transport channels */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); #endif void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ Loading Loading @@ -3875,7 +3877,7 @@ void ivas_param_mc_dec_read_BS( void ivas_param_mc_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint8_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ ); void ivas_param_mc_dec_prepare_renderer( Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define UNIFIED_DECODING_PATHS_LEFTOVERS /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */ /* #################### End BE switches ################################## */ Loading lib_dec/ivas_dirac_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1554,7 +1554,7 @@ void ivas_dirac_dec_render( uint16_t slot_size, n_samples_sf, ch, nchan_intern; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; // VE2SB: TBV float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading lib_dec/ivas_ism_param_dec.c +69 −28 Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ #include "wmc_auto.h" #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS /*-----------------------------------------------------------------------* * Local function declarations *-----------------------------------------------------------------------*/ static void ivas_ism_param_dec_tc_gain_adjust( Decoder_Struct *st_ivas, const int16_t nSamples, const int16_t nFadeLength, float *p_data_f[] ); #endif /*-----------------------------------------------------------------------* * Local function definitions *-----------------------------------------------------------------------*/ Loading Loading @@ -793,17 +801,31 @@ void ivas_ism_dec_digest_tc( void ivas_param_ism_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS int16_t ch, slot_idx, output_frame; int16_t num_freq_bands, cldfb_ch, n_ch_cldfb; float *cldfb_real_buffer, *cldfb_imag_buffer; #else int16_t ch, nchan_transport; int16_t slot_idx; int16_t output_frame; PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; int16_t fade_len; #endif /* Initialization */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS num_freq_bands = st_ivas->hSpatParamRendCom->num_freq_bands; output_frame = nCldfbSlots * num_freq_bands; n_ch_cldfb = st_ivas->hTcBuffer->nchan_transport_jbm - st_ivas->hTcBuffer->nchan_buffer_full; cldfb_real_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc; cldfb_imag_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc; #else hParamIsmDec = st_ivas->hParamIsmDec; assert( hParamIsmDec ); hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading @@ -812,15 +834,31 @@ void ivas_param_ism_dec_digest_tc( fade_len = output_frame / 2; nchan_transport = st_ivas->nchan_transport; #endif push_wmops( "ivas_param_ism_dec_digest_tc" ); #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS ivas_ism_param_dec_tc_gain_adjust( st_ivas, output_frame, output_frame / 2, p_data_f ); #else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /*TODO : FhG to check*/ ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, transport_channels_f ); ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, p_data_f ); } #endif #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS /* CLDFB Analysis */ for ( ch = 0, cldfb_ch = 0; cldfb_ch < n_ch_cldfb; cldfb_ch++, ch++ ) { for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { cldfbAnalysis_ts( &( p_data_f[ch][num_freq_bands * slot_idx] ), &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); } } #else for ( ch = 0; ch < nchan_transport; ch++ ) { /* CLDFB Analysis */ Loading @@ -831,15 +869,13 @@ void ivas_param_ism_dec_digest_tc( float RealBuffer[CLDFB_NO_CHANNELS_MAX]; float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; cldfbAnalysis_ts( &( transport_channels_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); cldfbAnalysis_ts( &( p_data_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); mvr2r( RealBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); mvr2r( ImagBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); } } } pop_wmops(); #endif return; } Loading Loading @@ -911,8 +947,6 @@ void ivas_param_ism_dec_prepare_renderer( nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; } push_wmops( "ivas_param_ism_dec_digest_tc" ); /* general setup */ ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbSlots, hParamIsmDec->hParamIsmRendering->interpolator ); Loading Loading @@ -993,23 +1027,30 @@ void ivas_param_ism_dec_prepare_renderer( /* Compute mixing matrix */ ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hParamIsmDec->hParamIsmRendering->mixing_matrix_lin ); pop_wmops(); return; } /*-------------------------------------------------------------------------* * ivas_ism_param_dec_tc_gain_ajust() * ivas_ism_param_dec_tc_gain_adjust() * * *-------------------------------------------------------------------------*/ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS static void ivas_ism_param_dec_tc_gain_adjust( #else void ivas_ism_param_dec_tc_gain_ajust( #endif Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS const int16_t nSamples, /* i : number of samples to be compensate */ const int16_t nFadeLength, /* i : length of the crossfade in samples */ #else const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output*/ #endif float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output*/ ) { Loading @@ -1023,8 +1064,8 @@ void ivas_ism_param_dec_tc_gain_ajust( for ( i = 0; i < nSamples; i++ ) { ene_tc += transport_channels_f[0][i] * transport_channels_f[0][i] + transport_channels_f[1][i] * transport_channels_f[1][i]; /* L*L + R*R */ ene_sum += ( transport_channels_f[0][i] + transport_channels_f[1][i] ) * ( transport_channels_f[0][i] + transport_channels_f[1][i] ); /* (L+R)*(L+R) */ ene_tc += p_data_f[0][i] * p_data_f[0][i] + p_data_f[1][i] * p_data_f[1][i]; /* L*L + R*R */ ene_sum += ( p_data_f[0][i] + p_data_f[1][i] ) * ( p_data_f[0][i] + p_data_f[1][i] ); /* (L+R)*(L+R) */ } gain = sqrtf( ene_tc / ( ene_sum + EPSILON ) ); if ( st_ivas->hSCE[0]->hCoreCoder[0]->ini_frame > 1 ) Loading @@ -1035,21 +1076,21 @@ void ivas_ism_param_dec_tc_gain_ajust( grad = ( gain - last_gain ) / (float) nFadeLength; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < ( nFadeLength ); i++ ) { transport_channels_f[0][i] *= ( last_gain + i * grad ); transport_channels_f[1][i] *= ( last_gain + i * grad ); p_data_f[0][i] *= ( last_gain + i * grad ); p_data_f[1][i] *= ( last_gain + i * grad ); } for ( ; i < nSamples; i++ ) { transport_channels_f[0][i] *= gain; transport_channels_f[1][i] *= gain; p_data_f[0][i] *= gain; p_data_f[1][i] *= gain; } } else { for ( i = 0; i < nSamples; i++ ) { transport_channels_f[0][i] *= gain; transport_channels_f[1][i] *= gain; p_data_f[0][i] *= gain; p_data_f[1][i] *= gain; } } Loading Loading
lib_com/ivas_cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -175,7 +175,11 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading
lib_com/ivas_prot.h +7 −5 Original line number Diff line number Diff line Loading @@ -868,12 +868,13 @@ void ivas_jbm_dec_get_md_map( int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *tc[], /* i : transport channels */ const int16_t output_frame /* i : output frame size */ ); #endif void ivas_jbm_dec_get_md_map_even_spacing( const int16_t len, /* i : length of the modfied frames in metadata slots */ Loading Loading @@ -1116,7 +1117,7 @@ void ivas_ism_dec_digest_tc( void ivas_param_ism_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); void ivas_param_ism_dec_dequant_md( Loading @@ -1128,13 +1129,14 @@ void ivas_param_ism_dec_prepare_renderer( const uint16_t nCldfbSlots /* i : number of CLDFB slots in transport channels */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); #endif void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ Loading Loading @@ -3875,7 +3877,7 @@ void ivas_param_mc_dec_read_BS( void ivas_param_mc_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint8_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ ); void ivas_param_mc_dec_prepare_renderer( Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define UNIFIED_DECODING_PATHS_LEFTOVERS /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */ /* #################### End BE switches ################################## */ Loading
lib_dec/ivas_dirac_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1554,7 +1554,7 @@ void ivas_dirac_dec_render( uint16_t slot_size, n_samples_sf, ch, nchan_intern; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; // VE2SB: TBV float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading
lib_dec/ivas_ism_param_dec.c +69 −28 Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ #include "wmc_auto.h" #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS /*-----------------------------------------------------------------------* * Local function declarations *-----------------------------------------------------------------------*/ static void ivas_ism_param_dec_tc_gain_adjust( Decoder_Struct *st_ivas, const int16_t nSamples, const int16_t nFadeLength, float *p_data_f[] ); #endif /*-----------------------------------------------------------------------* * Local function definitions *-----------------------------------------------------------------------*/ Loading Loading @@ -793,17 +801,31 @@ void ivas_ism_dec_digest_tc( void ivas_param_ism_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS int16_t ch, slot_idx, output_frame; int16_t num_freq_bands, cldfb_ch, n_ch_cldfb; float *cldfb_real_buffer, *cldfb_imag_buffer; #else int16_t ch, nchan_transport; int16_t slot_idx; int16_t output_frame; PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; int16_t fade_len; #endif /* Initialization */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS num_freq_bands = st_ivas->hSpatParamRendCom->num_freq_bands; output_frame = nCldfbSlots * num_freq_bands; n_ch_cldfb = st_ivas->hTcBuffer->nchan_transport_jbm - st_ivas->hTcBuffer->nchan_buffer_full; cldfb_real_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc; cldfb_imag_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc; #else hParamIsmDec = st_ivas->hParamIsmDec; assert( hParamIsmDec ); hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading @@ -812,15 +834,31 @@ void ivas_param_ism_dec_digest_tc( fade_len = output_frame / 2; nchan_transport = st_ivas->nchan_transport; #endif push_wmops( "ivas_param_ism_dec_digest_tc" ); #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS ivas_ism_param_dec_tc_gain_adjust( st_ivas, output_frame, output_frame / 2, p_data_f ); #else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /*TODO : FhG to check*/ ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, transport_channels_f ); ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, p_data_f ); } #endif #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS /* CLDFB Analysis */ for ( ch = 0, cldfb_ch = 0; cldfb_ch < n_ch_cldfb; cldfb_ch++, ch++ ) { for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { cldfbAnalysis_ts( &( p_data_f[ch][num_freq_bands * slot_idx] ), &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); } } #else for ( ch = 0; ch < nchan_transport; ch++ ) { /* CLDFB Analysis */ Loading @@ -831,15 +869,13 @@ void ivas_param_ism_dec_digest_tc( float RealBuffer[CLDFB_NO_CHANNELS_MAX]; float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; cldfbAnalysis_ts( &( transport_channels_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); cldfbAnalysis_ts( &( p_data_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); mvr2r( RealBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); mvr2r( ImagBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); } } } pop_wmops(); #endif return; } Loading Loading @@ -911,8 +947,6 @@ void ivas_param_ism_dec_prepare_renderer( nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; } push_wmops( "ivas_param_ism_dec_digest_tc" ); /* general setup */ ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbSlots, hParamIsmDec->hParamIsmRendering->interpolator ); Loading Loading @@ -993,23 +1027,30 @@ void ivas_param_ism_dec_prepare_renderer( /* Compute mixing matrix */ ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hParamIsmDec->hParamIsmRendering->mixing_matrix_lin ); pop_wmops(); return; } /*-------------------------------------------------------------------------* * ivas_ism_param_dec_tc_gain_ajust() * ivas_ism_param_dec_tc_gain_adjust() * * *-------------------------------------------------------------------------*/ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS static void ivas_ism_param_dec_tc_gain_adjust( #else void ivas_ism_param_dec_tc_gain_ajust( #endif Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS const int16_t nSamples, /* i : number of samples to be compensate */ const int16_t nFadeLength, /* i : length of the crossfade in samples */ #else const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output*/ #endif float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output*/ ) { Loading @@ -1023,8 +1064,8 @@ void ivas_ism_param_dec_tc_gain_ajust( for ( i = 0; i < nSamples; i++ ) { ene_tc += transport_channels_f[0][i] * transport_channels_f[0][i] + transport_channels_f[1][i] * transport_channels_f[1][i]; /* L*L + R*R */ ene_sum += ( transport_channels_f[0][i] + transport_channels_f[1][i] ) * ( transport_channels_f[0][i] + transport_channels_f[1][i] ); /* (L+R)*(L+R) */ ene_tc += p_data_f[0][i] * p_data_f[0][i] + p_data_f[1][i] * p_data_f[1][i]; /* L*L + R*R */ ene_sum += ( p_data_f[0][i] + p_data_f[1][i] ) * ( p_data_f[0][i] + p_data_f[1][i] ); /* (L+R)*(L+R) */ } gain = sqrtf( ene_tc / ( ene_sum + EPSILON ) ); if ( st_ivas->hSCE[0]->hCoreCoder[0]->ini_frame > 1 ) Loading @@ -1035,21 +1076,21 @@ void ivas_ism_param_dec_tc_gain_ajust( grad = ( gain - last_gain ) / (float) nFadeLength; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < ( nFadeLength ); i++ ) { transport_channels_f[0][i] *= ( last_gain + i * grad ); transport_channels_f[1][i] *= ( last_gain + i * grad ); p_data_f[0][i] *= ( last_gain + i * grad ); p_data_f[1][i] *= ( last_gain + i * grad ); } for ( ; i < nSamples; i++ ) { transport_channels_f[0][i] *= gain; transport_channels_f[1][i] *= gain; p_data_f[0][i] *= gain; p_data_f[1][i] *= gain; } } else { for ( i = 0; i < nSamples; i++ ) { transport_channels_f[0][i] *= gain; transport_channels_f[1][i] *= gain; p_data_f[0][i] *= gain; p_data_f[1][i] *= gain; } } Loading