Loading lib_com/ivas_prot_fx.h +2 −2 Original line number Diff line number Diff line Loading @@ -4330,7 +4330,7 @@ void ivas_ism_dec_digest_tc_fx( void ivas_param_ism_dec_digest_tc_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nCldfbSlots, /* i : number of CLDFB slots in transport channels */ Word32 *p_data_fx[], /* i : synthesized core-coder transport channels/DirAC output */ Word32 *p_data_fx[], /* i/o: synthesized core-coder transport channels/DirAC output */ const Word16 q_data_in /* i : Q-factor of input signal for single channel */ ); Loading @@ -4348,7 +4348,7 @@ void ivas_param_ism_dec_render_fx( const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailable, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] Word32 *output_f_fx[] /* i/o: synthesized core-coder TCs / rendered signal*/ ); void ivas_param_ism_params_to_masa_param_mapping_fx( Loading lib_dec/ivas_ism_param_dec_fx.c +34 −18 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ static void ivas_param_ism_dec_dequant_DOA_fx( return; } static void ivas_param_ism_dec_dequant_powrat_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec /* i/o: decoder ParamISM handle */ ) Loading Loading @@ -176,6 +177,7 @@ static void ivas_ism_get_proto_matrix_fx( return; } static void ivas_param_ism_collect_slot_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */ Word32 *Cldfb_RealBuffer_in_fx, /*Q(31-exp_real)*/ Loading @@ -192,7 +194,6 @@ static void ivas_param_ism_collect_slot_fx( Word16 exp_tmp; /* loop over parameter bands to collect transport channel energies */ FOR( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) { brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; Loading @@ -219,6 +220,7 @@ static void ivas_param_ism_collect_slot_fx( move16(); } } return; } Loading Loading @@ -400,6 +402,7 @@ static void ivas_param_ism_compute_mixing_matrix_fx( return; } static void ivas_param_ism_render_slot_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, Loading Loading @@ -444,6 +447,7 @@ static void ivas_param_ism_render_slot_fx( } } } FOR( bin_idx = 0; bin_idx < hSpatParamRendCom->num_freq_bands; bin_idx++ ) { /* smooth the mixing matrix */ Loading Loading @@ -528,11 +532,11 @@ static ivas_error ivas_param_ism_rendering_init_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for proto matrix\n" ) ); } IF( ( hParamIsmRendering->interpolator_fx = (Word16 *) malloc( subframe_nbslots * sizeof( Word16 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for interpolator\n" ) ); } test(); test(); test(); Loading @@ -548,6 +552,7 @@ static ivas_error ivas_param_ism_rendering_init_fx( return IVAS_ERR_OK; } static void ivas_param_ism_update_mixing_matrix_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, Word32 mixing_matrix_fx[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX], /*Q(31-mixing_matrix_exp)*/ Loading Loading @@ -639,6 +644,7 @@ ivas_error ivas_param_ism_dec_open_fx( move32(); output_config = st_ivas->hDecoderConfig->output_config; move32(); ivas_param_ism_config_fx( hParamIsmDec->hParamIsm, st_ivas->nchan_ism ); // assuming Q14 for gains; /*-----------------------------------------------------------------* Loading Loading @@ -843,6 +849,7 @@ ivas_error ivas_param_ism_dec_open_fx( return error; } /*-------------------------------------------------------------------------* * ivas_param_ism_dec_close() * Loading Loading @@ -1094,12 +1101,12 @@ void ivas_ism_dec_digest_tc_fx( void ivas_param_ism_dec_digest_tc_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nCldfbSlots, /* i : number of CLDFB slots in transport channels */ Word32 *p_data_fx[], /* i : synthesized core-coder transport channels/DirAC output q_data_in */ Word32 *p_data_fx[], /* i/o: synthesized core-coder transport channels/DirAC output q_data_in */ const Word16 q_data_in /* i : Q-factor of input signal for single channel */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS Word16 ch, slot_idx, output_frame; Word16 i, ch, slot_idx, output_frame; Word16 num_freq_bands, cldfb_ch, n_ch_cldfb; Word32 *cldfb_real_buffer, *cldfb_imag_buffer; Word16 q_data = q_data_in; Loading Loading @@ -1137,7 +1144,18 @@ void ivas_param_ism_dec_digest_tc_fx( Scale_sig32( p_data_fx[0], output_frame, sub( Q11, q_data ) ); /*keepeing p_data_fx at Q11*/ Scale_sig32( p_data_fx[1], output_frame, sub( Q11, q_data ) ); /*keepeing p_data_fx at Q11*/ } ELSE { IF( NE_16( q_data, q_data_in ) ) { FOR( i = 0; i < MAX_PARAM_ISM_WAVE; i++ ) { scale_sig32( p_data_fx[i], output_frame, sub( q_data_in, q_data ) ); // q_data_in } q_data = q_data_in; move16(); } } #else hParamIsmDec = st_ivas->hParamIsmDec; assert( hParamIsmDec ); Loading Loading @@ -1278,10 +1296,9 @@ void ivas_param_ism_dec_prepare_renderer_fx( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; /* Initialization */ hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_exp = 25; hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_exp = Q25; move16(); hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_exp = 25; hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_exp = Q25; move16(); IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { Loading Loading @@ -1606,7 +1623,7 @@ static void ivas_ism_param_dec_render_sf_fx( Word32 *output_f_fx[], /*Q_output*/ Word16 Q_output[] ) { Word16 ch, slot_idx, i, index_slot; Word16 ch, slot_idx, i, index_slot, cldfb_idx; /* CLDFB Output Buffers */ Word32 Cldfb_RealBuffer_fx[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; // Q(31-real_exp) Word32 Cldfb_ImagBuffer_fx[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; // Q(31-imag_exp) Loading Loading @@ -1643,10 +1660,9 @@ static void ivas_ism_param_dec_render_sf_fx( { index_slot = add( slot_idx_start, slot_idx ); FOR( ch = 0; ch < nchan_transport; ch++ ) { Word16 cldfb_idx = add( imult1616( imult1616( index_slot, hSpatParamRendCom->num_freq_bands ), nchan_transport ), imult1616( ch, hSpatParamRendCom->num_freq_bands ) ); cldfb_idx = add( imult1616( imult1616( index_slot, hSpatParamRendCom->num_freq_bands ), nchan_transport ), imult1616( ch, hSpatParamRendCom->num_freq_bands ) ); Cldfb_RealBuffer_in_fx[ch] = &hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_fx[cldfb_idx]; // Q11 Cldfb_ImagBuffer_in_fx[ch] = &hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_fx[cldfb_idx]; // Q11 } Loading Loading @@ -1747,15 +1763,15 @@ static void ivas_ism_param_dec_render_sf_fx( * * *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_render_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] /*Q11*/ Word32 *output_f_fx[] /* i/o: synthesized core-coder TCs / rendered signal Q11*/ ) { Word16 ch, slots_to_render, first_sf, last_sf, subframe_idx; UWord16 slot_size, n_samples_sf; PARAM_ISM_DEC_HANDLE hParamIsmDec; Loading Loading @@ -1854,6 +1870,7 @@ void ivas_param_ism_dec_render_fx( *nSamplesAvailableNext = imult1616( sub( hSpatParamRendCom->num_slots, hSpatParamRendCom->slots_rendered ), (Word16) slot_size ); move16(); return; } Loading Loading @@ -1888,7 +1905,6 @@ void ivas_param_ism_params_to_masa_param_mapping_fx( nBins = hSpatParamRendCom->num_freq_bands; move16(); IF( st_ivas->hISMDTX.dtx_flag ) { Word32 energy_ratio_fx; /* Q30 */ Loading lib_dec/ivas_mc_param_dec_fx.c +32 −63 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_com/ivas_prot_fx.h +2 −2 Original line number Diff line number Diff line Loading @@ -4330,7 +4330,7 @@ void ivas_ism_dec_digest_tc_fx( void ivas_param_ism_dec_digest_tc_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nCldfbSlots, /* i : number of CLDFB slots in transport channels */ Word32 *p_data_fx[], /* i : synthesized core-coder transport channels/DirAC output */ Word32 *p_data_fx[], /* i/o: synthesized core-coder transport channels/DirAC output */ const Word16 q_data_in /* i : Q-factor of input signal for single channel */ ); Loading @@ -4348,7 +4348,7 @@ void ivas_param_ism_dec_render_fx( const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailable, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] Word32 *output_f_fx[] /* i/o: synthesized core-coder TCs / rendered signal*/ ); void ivas_param_ism_params_to_masa_param_mapping_fx( Loading
lib_dec/ivas_ism_param_dec_fx.c +34 −18 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ static void ivas_param_ism_dec_dequant_DOA_fx( return; } static void ivas_param_ism_dec_dequant_powrat_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec /* i/o: decoder ParamISM handle */ ) Loading Loading @@ -176,6 +177,7 @@ static void ivas_ism_get_proto_matrix_fx( return; } static void ivas_param_ism_collect_slot_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */ Word32 *Cldfb_RealBuffer_in_fx, /*Q(31-exp_real)*/ Loading @@ -192,7 +194,6 @@ static void ivas_param_ism_collect_slot_fx( Word16 exp_tmp; /* loop over parameter bands to collect transport channel energies */ FOR( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) { brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; Loading @@ -219,6 +220,7 @@ static void ivas_param_ism_collect_slot_fx( move16(); } } return; } Loading Loading @@ -400,6 +402,7 @@ static void ivas_param_ism_compute_mixing_matrix_fx( return; } static void ivas_param_ism_render_slot_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, Loading Loading @@ -444,6 +447,7 @@ static void ivas_param_ism_render_slot_fx( } } } FOR( bin_idx = 0; bin_idx < hSpatParamRendCom->num_freq_bands; bin_idx++ ) { /* smooth the mixing matrix */ Loading Loading @@ -528,11 +532,11 @@ static ivas_error ivas_param_ism_rendering_init_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for proto matrix\n" ) ); } IF( ( hParamIsmRendering->interpolator_fx = (Word16 *) malloc( subframe_nbslots * sizeof( Word16 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for interpolator\n" ) ); } test(); test(); test(); Loading @@ -548,6 +552,7 @@ static ivas_error ivas_param_ism_rendering_init_fx( return IVAS_ERR_OK; } static void ivas_param_ism_update_mixing_matrix_fx( PARAM_ISM_DEC_HANDLE hParamIsmDec, Word32 mixing_matrix_fx[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX], /*Q(31-mixing_matrix_exp)*/ Loading Loading @@ -639,6 +644,7 @@ ivas_error ivas_param_ism_dec_open_fx( move32(); output_config = st_ivas->hDecoderConfig->output_config; move32(); ivas_param_ism_config_fx( hParamIsmDec->hParamIsm, st_ivas->nchan_ism ); // assuming Q14 for gains; /*-----------------------------------------------------------------* Loading Loading @@ -843,6 +849,7 @@ ivas_error ivas_param_ism_dec_open_fx( return error; } /*-------------------------------------------------------------------------* * ivas_param_ism_dec_close() * Loading Loading @@ -1094,12 +1101,12 @@ void ivas_ism_dec_digest_tc_fx( void ivas_param_ism_dec_digest_tc_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nCldfbSlots, /* i : number of CLDFB slots in transport channels */ Word32 *p_data_fx[], /* i : synthesized core-coder transport channels/DirAC output q_data_in */ Word32 *p_data_fx[], /* i/o: synthesized core-coder transport channels/DirAC output q_data_in */ const Word16 q_data_in /* i : Q-factor of input signal for single channel */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS Word16 ch, slot_idx, output_frame; Word16 i, ch, slot_idx, output_frame; Word16 num_freq_bands, cldfb_ch, n_ch_cldfb; Word32 *cldfb_real_buffer, *cldfb_imag_buffer; Word16 q_data = q_data_in; Loading Loading @@ -1137,7 +1144,18 @@ void ivas_param_ism_dec_digest_tc_fx( Scale_sig32( p_data_fx[0], output_frame, sub( Q11, q_data ) ); /*keepeing p_data_fx at Q11*/ Scale_sig32( p_data_fx[1], output_frame, sub( Q11, q_data ) ); /*keepeing p_data_fx at Q11*/ } ELSE { IF( NE_16( q_data, q_data_in ) ) { FOR( i = 0; i < MAX_PARAM_ISM_WAVE; i++ ) { scale_sig32( p_data_fx[i], output_frame, sub( q_data_in, q_data ) ); // q_data_in } q_data = q_data_in; move16(); } } #else hParamIsmDec = st_ivas->hParamIsmDec; assert( hParamIsmDec ); Loading Loading @@ -1278,10 +1296,9 @@ void ivas_param_ism_dec_prepare_renderer_fx( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; /* Initialization */ hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_exp = 25; hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_exp = Q25; move16(); hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_exp = 25; hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_exp = Q25; move16(); IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { Loading Loading @@ -1606,7 +1623,7 @@ static void ivas_ism_param_dec_render_sf_fx( Word32 *output_f_fx[], /*Q_output*/ Word16 Q_output[] ) { Word16 ch, slot_idx, i, index_slot; Word16 ch, slot_idx, i, index_slot, cldfb_idx; /* CLDFB Output Buffers */ Word32 Cldfb_RealBuffer_fx[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; // Q(31-real_exp) Word32 Cldfb_ImagBuffer_fx[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; // Q(31-imag_exp) Loading Loading @@ -1643,10 +1660,9 @@ static void ivas_ism_param_dec_render_sf_fx( { index_slot = add( slot_idx_start, slot_idx ); FOR( ch = 0; ch < nchan_transport; ch++ ) { Word16 cldfb_idx = add( imult1616( imult1616( index_slot, hSpatParamRendCom->num_freq_bands ), nchan_transport ), imult1616( ch, hSpatParamRendCom->num_freq_bands ) ); cldfb_idx = add( imult1616( imult1616( index_slot, hSpatParamRendCom->num_freq_bands ), nchan_transport ), imult1616( ch, hSpatParamRendCom->num_freq_bands ) ); Cldfb_RealBuffer_in_fx[ch] = &hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc_fx[cldfb_idx]; // Q11 Cldfb_ImagBuffer_in_fx[ch] = &hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc_fx[cldfb_idx]; // Q11 } Loading Loading @@ -1747,15 +1763,15 @@ static void ivas_ism_param_dec_render_sf_fx( * * *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_render_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] /*Q11*/ Word32 *output_f_fx[] /* i/o: synthesized core-coder TCs / rendered signal Q11*/ ) { Word16 ch, slots_to_render, first_sf, last_sf, subframe_idx; UWord16 slot_size, n_samples_sf; PARAM_ISM_DEC_HANDLE hParamIsmDec; Loading Loading @@ -1854,6 +1870,7 @@ void ivas_param_ism_dec_render_fx( *nSamplesAvailableNext = imult1616( sub( hSpatParamRendCom->num_slots, hSpatParamRendCom->slots_rendered ), (Word16) slot_size ); move16(); return; } Loading Loading @@ -1888,7 +1905,6 @@ void ivas_param_ism_params_to_masa_param_mapping_fx( nBins = hSpatParamRendCom->num_freq_bands; move16(); IF( st_ivas->hISMDTX.dtx_flag ) { Word32 energy_ratio_fx; /* Q30 */ Loading
lib_dec/ivas_mc_param_dec_fx.c +32 −63 File changed.Preview size limit exceeded, changes collapsed. Show changes