Loading lib_com/ivas_prot_fx.h +36 −0 Original line number Diff line number Diff line Loading @@ -859,6 +859,7 @@ void stereo_decoder_tcx_fx( const Word16 tmp_plc_upmix, /* i : indicates temp upmix for PLC decision */ Word16 *q_x_ch2, Word16 *q_x_ch1 ); void v_multc_acc_32_16( const Word32 x[], /* i : Input vector */ const Word16 c, /* i : Constant */ Loading @@ -884,4 +885,39 @@ void ivas_mono_downmix_render_passive_fx( const Word16 output_frame /* i : output frame length */ ); void ivas_ls_setup_conversion_fx( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ const Word16 input_chans, /* i : number of input channels to the renderer */ const Word16 output_frame, /* i : frame length */ Word32 *input[], /* i : LS input/output synthesis signal */ Word32 *output[] /* i/o: LS input/output synthesis signal */ ); ivas_error ivas_ls_setup_conversion_open_fx( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_ls_setup_conversion_close_fx( LSSETUP_CONVERSION_HANDLE *hLsSetUpConversion /* i/o: LS converter handle */ ); void ivas_ls_setup_conversion_process_mdct_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word32 *output[] /* i/o: output synthesis signal */ ); void ivas_lssetupconversion_process_param_mc_fx( Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ const Word16 num_timeslots, Word32 Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Word32 Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Word16 channel_active[MAX_CICP_CHANNELS] /* i : bitmap indicating which output channels are active */ ); void convert_coeffs_to_higher_res_fx( const Word32 *in1, /* i : first subframe input */ const Word32 *in2, /* i : second subframe input */ Word32 *out, /* o : converted output */ const Word16 len /* i : length of subframes */ ); #endif lib_dec/ivas_init_dec.c +13 −2 Original line number Diff line number Diff line Loading @@ -1755,10 +1755,17 @@ ivas_error ivas_init_decoder( } ELSE IF( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED IF( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else IF( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } ELSE IF ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { Loading Loading @@ -2439,7 +2446,11 @@ void ivas_destroy_dec( ivas_reverb_close( &st_ivas->hReverb ); /* LS config converter handle */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif /* Custom LS configuration handle */ IF ( st_ivas->hLsSetupCustom != NULL ) Loading lib_dec/ivas_jbm_dec.c +189 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include "prot_fx1.h" #include "prot_fx2.h" #include "debug.h" /*-----------------------------------------------------------------------* * Local function prototypes *-----------------------------------------------------------------------*/ Loading Loading @@ -168,7 +170,31 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hDecoderConfig->nchan_out == 1 ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading Loading @@ -1105,7 +1131,31 @@ ivas_error ivas_jbm_dec_tc( { if ( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading Loading @@ -1159,7 +1209,32 @@ ivas_error ivas_jbm_dec_tc( if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16, nchan_transport; Word32 *p_output_fx[12]; nchan_transport = audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ); q = q - find_guarded_bits_fx( nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ), output_frame, p_output, p_output ); #endif } } } Loading Loading @@ -1215,7 +1290,31 @@ ivas_error ivas_jbm_dec_tc( /* Rendering */ if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) Loading Loading @@ -1831,7 +1930,40 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; Word32 *p_tc_fx[16]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { p_tc_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_tc[i], p_tc_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc_fx, p_output_fx ); FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered ); free( p_output_fx[i] ); } FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { free( p_tc_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading Loading @@ -2257,7 +2389,40 @@ ivas_error ivas_jbm_dec_render( else if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; Word32 *p_tc_fx[16]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { p_tc_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_tc[i], p_tc_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc_fx, p_output_fx ); FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered ); free( p_output_fx[i] ); } FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { free( p_tc_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading Loading @@ -2287,7 +2452,31 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; q = q - find_guarded_bits_fx( MC_PARAMUPMIX_MAX_INPUT_CHANS ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, MC_PARAMUPMIX_MAX_INPUT_CHANS); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < MC_PARAMUPMIX_MAX_INPUT_CHANS; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, MC_PARAMUPMIX_MAX_INPUT_CHANS); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading lib_dec/ivas_mc_param_dec.c +50 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ #include "wmc_auto.h" #include "rom_dec.h" #ifdef IVAS_FLOAT_FIXED #include "prot_fx1.h" #include "prot_fx2.h" #include "ivas_prot_fx.h" #endif Loading Loading @@ -270,10 +272,17 @@ ivas_error ivas_param_mc_dec_open( if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB || hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) Loading @@ -300,7 +309,11 @@ ivas_error ivas_param_mc_dec_open( else { /* close the ls conversion handle immediately, it was only needed to get the DMX matrix in case of DMX in the covariance domain */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } } } Loading Loading @@ -733,6 +746,17 @@ ivas_error ivas_param_mc_dec_reconfig( { if ( nchan_transport_old != nchan_transport ) { #ifdef IVAS_FLOAT_FIXED if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); } if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); Loading @@ -742,6 +766,7 @@ ivas_error ivas_param_mc_dec_reconfig( { return error; } #endif /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ free( hParamMC->ls_conv_dmx_matrix ); Loading Loading @@ -1765,7 +1790,32 @@ void ivas_param_mc_dec_render( else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB ) { /* format conversion*/ #ifdef IVAS_FLOAT_FIXED Word32 Cldfb_RealBuffer_fx[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_fx[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word16 inChannels = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; Word16 num_timeslots = hParamMC->subframe_nbslots[subframe_idx]; Word16 i, j; FOR( i = 0; i < inChannels; ++i ) { FOR( j = 0; j < num_timeslots; ++j ) { floatToFixed_arrL( Cldfb_RealBuffer[i][j], Cldfb_RealBuffer_fx[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); floatToFixed_arrL( Cldfb_ImagBuffer[i][j], Cldfb_ImagBuffer_fx[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); } } ivas_lssetupconversion_process_param_mc_fx( st_ivas, hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, channel_active ); FOR( i = 0; i < inChannels; ++i ) { FOR( j = 0; j < num_timeslots; ++j ) { fixedToFloat_arrL( Cldfb_RealBuffer_fx[i][j], Cldfb_RealBuffer[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); fixedToFloat_arrL( Cldfb_ImagBuffer_fx[i][j], Cldfb_ImagBuffer[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); } } #else ivas_lssetupconversion_process_param_mc( st_ivas, hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer, Cldfb_ImagBuffer, channel_active ); #endif } /* CLDFB synthesis */ Loading lib_dec/ivas_mct_dec.c +49 −0 Original line number Diff line number Diff line Loading @@ -223,7 +223,22 @@ ivas_error ivas_mct_dec( if ( st_ivas->renderer_type == RENDERER_MC ) { /* Equalization in MDCT Domain */ #ifdef IVAS_FLOAT_FIXED Word32 *output_fx[MAX_TRANSPORT_CHANNELS]; for ( int i = 0; i < st_ivas->nchan_transport; ++i ) { output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( output[i], output_fx[i], Q11, L_FRAME48k ); } ivas_ls_setup_conversion_process_mdct_fx( st_ivas, output_fx); for ( int i = 0; i < st_ivas->nchan_transport; ++i ) { fixedToFloat_arrL( output_fx[i], output[i], Q11, L_FRAME48k ); free(output_fx[i]); } #else ivas_ls_setup_conversion_process_mdct( st_ivas, output ); #endif } else if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO ) ) Loading Loading @@ -1014,13 +1029,21 @@ static ivas_error ivas_mc_dec_reconfig( ivas_param_mc_dec_close( &st_ivas->hParamMC ); /* remove ls conversion if it was allocated by ParamMC */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } if ( last_mc_mode == MC_MODE_PARAMUPMIX ) { ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &( st_ivas->hLsSetUpConversion ) ); #else ivas_ls_setup_conversion_close( &( st_ivas->hLsSetUpConversion ) ); #endif } /* De-allocate McMasa-related handles */ Loading @@ -1042,10 +1065,17 @@ static ivas_error ivas_mc_dec_reconfig( /* init LS conversion if the renderer type asks for it */ if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } } } Loading @@ -1063,7 +1093,11 @@ static ivas_error ivas_mc_dec_reconfig( ivas_param_mc_dec_close( &st_ivas->hParamMC ); /* remove ls conversion if it was allocated by ParamMC */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } #ifdef IVAS_FLOAT_FIXED Loading @@ -1076,10 +1110,17 @@ static ivas_error ivas_mc_dec_reconfig( /* init LS conversion if the renderer type asks for it */ if ( ( st_ivas->renderer_type == RENDERER_MC ) && st_ivas->hLsSetUpConversion == NULL ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } if ( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) Loading @@ -1095,7 +1136,11 @@ static ivas_error ivas_mc_dec_reconfig( /* remove old ls conversion for MCT if open, gets reopened correctly within ivas_param_mc_dec_open when needed */ if ( renderer_type_old == RENDERER_MC && st_ivas->hLsSetUpConversion != NULL ) { #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } if ( ( error = ivas_param_mc_dec_open( st_ivas ) ) != IVAS_ERR_OK ) Loading Loading @@ -1171,7 +1216,11 @@ static ivas_error ivas_mc_dec_reconfig( /* LS conversion */ if ( st_ivas->hLsSetUpConversion != NULL ) { #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); Loading Loading
lib_com/ivas_prot_fx.h +36 −0 Original line number Diff line number Diff line Loading @@ -859,6 +859,7 @@ void stereo_decoder_tcx_fx( const Word16 tmp_plc_upmix, /* i : indicates temp upmix for PLC decision */ Word16 *q_x_ch2, Word16 *q_x_ch1 ); void v_multc_acc_32_16( const Word32 x[], /* i : Input vector */ const Word16 c, /* i : Constant */ Loading @@ -884,4 +885,39 @@ void ivas_mono_downmix_render_passive_fx( const Word16 output_frame /* i : output frame length */ ); void ivas_ls_setup_conversion_fx( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ const Word16 input_chans, /* i : number of input channels to the renderer */ const Word16 output_frame, /* i : frame length */ Word32 *input[], /* i : LS input/output synthesis signal */ Word32 *output[] /* i/o: LS input/output synthesis signal */ ); ivas_error ivas_ls_setup_conversion_open_fx( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_ls_setup_conversion_close_fx( LSSETUP_CONVERSION_HANDLE *hLsSetUpConversion /* i/o: LS converter handle */ ); void ivas_ls_setup_conversion_process_mdct_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word32 *output[] /* i/o: output synthesis signal */ ); void ivas_lssetupconversion_process_param_mc_fx( Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ const Word16 num_timeslots, Word32 Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Word32 Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Word16 channel_active[MAX_CICP_CHANNELS] /* i : bitmap indicating which output channels are active */ ); void convert_coeffs_to_higher_res_fx( const Word32 *in1, /* i : first subframe input */ const Word32 *in2, /* i : second subframe input */ Word32 *out, /* o : converted output */ const Word16 len /* i : length of subframes */ ); #endif
lib_dec/ivas_init_dec.c +13 −2 Original line number Diff line number Diff line Loading @@ -1755,10 +1755,17 @@ ivas_error ivas_init_decoder( } ELSE IF( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED IF( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else IF( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } ELSE IF ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { Loading Loading @@ -2439,7 +2446,11 @@ void ivas_destroy_dec( ivas_reverb_close( &st_ivas->hReverb ); /* LS config converter handle */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif /* Custom LS configuration handle */ IF ( st_ivas->hLsSetupCustom != NULL ) Loading
lib_dec/ivas_jbm_dec.c +189 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include "prot_fx1.h" #include "prot_fx2.h" #include "debug.h" /*-----------------------------------------------------------------------* * Local function prototypes *-----------------------------------------------------------------------*/ Loading Loading @@ -168,7 +170,31 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hDecoderConfig->nchan_out == 1 ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading Loading @@ -1105,7 +1131,31 @@ ivas_error ivas_jbm_dec_tc( { if ( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading Loading @@ -1159,7 +1209,32 @@ ivas_error ivas_jbm_dec_tc( if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16, nchan_transport; Word32 *p_output_fx[12]; nchan_transport = audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ); q = q - find_guarded_bits_fx( nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, nchan_transport); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ), output_frame, p_output, p_output ); #endif } } } Loading Loading @@ -1215,7 +1290,31 @@ ivas_error ivas_jbm_dec_tc( /* Rendering */ if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[12]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, output_frame ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, output_frame, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, st_ivas->nchan_transport); ++i) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, output_frame ); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); #endif } } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) Loading Loading @@ -1831,7 +1930,40 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; Word32 *p_tc_fx[16]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { p_tc_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_tc[i], p_tc_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc_fx, p_output_fx ); FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered ); free( p_output_fx[i] ); } FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { free( p_tc_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); #endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) Loading Loading @@ -2257,7 +2389,40 @@ ivas_error ivas_jbm_dec_render( else if ( st_ivas->renderer_type == RENDERER_MC ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; Word32 *p_tc_fx[16]; q = q - find_guarded_bits_fx( st_ivas->nchan_transport ); FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { p_tc_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_tc[i], p_tc_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < st_ivas->nchan_transport; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc_fx, p_output_fx ); FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered ); free( p_output_fx[i] ); } FOR( i = 0; i < st_ivas->nchan_transport; ++i ) { free( p_tc_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading Loading @@ -2287,7 +2452,31 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_MC ) { #ifdef IVAS_FLOAT_FIXED Word16 i, j, q = Q16; Word32 *p_output_fx[20]; q = q - find_guarded_bits_fx( MC_PARAMUPMIX_MAX_INPUT_CHANS ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, MC_PARAMUPMIX_MAX_INPUT_CHANS); ++i ) { p_output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( p_output[i], p_output_fx[i], q, *nSamplesRendered ); } FOR( i = 0; i < st_ivas->hDecoderConfig->nchan_out; i++ ) { FOR( j = 0; j < MC_PARAMUPMIX_MAX_INPUT_CHANS; j++ ) { st_ivas->hLsSetUpConversion->dmxMtx_fx[j][i] = float_to_fix( st_ivas->hLsSetUpConversion->dmxMtx[j][i], Q30 ); } } ivas_ls_setup_conversion_fx( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output_fx, p_output_fx ); FOR( i = 0; i < max(st_ivas->hDecoderConfig->nchan_out, MC_PARAMUPMIX_MAX_INPUT_CHANS); ++i ) { fixedToFloat_arrL( p_output_fx[i], p_output[i], q, *nSamplesRendered); free( p_output_fx[i] ); } #else ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading
lib_dec/ivas_mc_param_dec.c +50 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ #include "wmc_auto.h" #include "rom_dec.h" #ifdef IVAS_FLOAT_FIXED #include "prot_fx1.h" #include "prot_fx2.h" #include "ivas_prot_fx.h" #endif Loading Loading @@ -270,10 +272,17 @@ ivas_error ivas_param_mc_dec_open( if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB || hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) Loading @@ -300,7 +309,11 @@ ivas_error ivas_param_mc_dec_open( else { /* close the ls conversion handle immediately, it was only needed to get the DMX matrix in case of DMX in the covariance domain */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } } } Loading Loading @@ -733,6 +746,17 @@ ivas_error ivas_param_mc_dec_reconfig( { if ( nchan_transport_old != nchan_transport ) { #ifdef IVAS_FLOAT_FIXED if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); } if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); Loading @@ -742,6 +766,7 @@ ivas_error ivas_param_mc_dec_reconfig( { return error; } #endif /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ free( hParamMC->ls_conv_dmx_matrix ); Loading Loading @@ -1765,7 +1790,32 @@ void ivas_param_mc_dec_render( else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB ) { /* format conversion*/ #ifdef IVAS_FLOAT_FIXED Word32 Cldfb_RealBuffer_fx[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_fx[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word16 inChannels = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; Word16 num_timeslots = hParamMC->subframe_nbslots[subframe_idx]; Word16 i, j; FOR( i = 0; i < inChannels; ++i ) { FOR( j = 0; j < num_timeslots; ++j ) { floatToFixed_arrL( Cldfb_RealBuffer[i][j], Cldfb_RealBuffer_fx[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); floatToFixed_arrL( Cldfb_ImagBuffer[i][j], Cldfb_ImagBuffer_fx[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); } } ivas_lssetupconversion_process_param_mc_fx( st_ivas, hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, channel_active ); FOR( i = 0; i < inChannels; ++i ) { FOR( j = 0; j < num_timeslots; ++j ) { fixedToFloat_arrL( Cldfb_RealBuffer_fx[i][j], Cldfb_RealBuffer[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); fixedToFloat_arrL( Cldfb_ImagBuffer_fx[i][j], Cldfb_ImagBuffer[i][j], Q9, st_ivas->hLsSetUpConversion->sfbCnt ); } } #else ivas_lssetupconversion_process_param_mc( st_ivas, hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer, Cldfb_ImagBuffer, channel_active ); #endif } /* CLDFB synthesis */ Loading
lib_dec/ivas_mct_dec.c +49 −0 Original line number Diff line number Diff line Loading @@ -223,7 +223,22 @@ ivas_error ivas_mct_dec( if ( st_ivas->renderer_type == RENDERER_MC ) { /* Equalization in MDCT Domain */ #ifdef IVAS_FLOAT_FIXED Word32 *output_fx[MAX_TRANSPORT_CHANNELS]; for ( int i = 0; i < st_ivas->nchan_transport; ++i ) { output_fx[i] = malloc( L_FRAME48k * sizeof( Word32 ) ); floatToFixed_arrL( output[i], output_fx[i], Q11, L_FRAME48k ); } ivas_ls_setup_conversion_process_mdct_fx( st_ivas, output_fx); for ( int i = 0; i < st_ivas->nchan_transport; ++i ) { fixedToFloat_arrL( output_fx[i], output[i], Q11, L_FRAME48k ); free(output_fx[i]); } #else ivas_ls_setup_conversion_process_mdct( st_ivas, output ); #endif } else if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO ) ) Loading Loading @@ -1014,13 +1029,21 @@ static ivas_error ivas_mc_dec_reconfig( ivas_param_mc_dec_close( &st_ivas->hParamMC ); /* remove ls conversion if it was allocated by ParamMC */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } if ( last_mc_mode == MC_MODE_PARAMUPMIX ) { ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &( st_ivas->hLsSetUpConversion ) ); #else ivas_ls_setup_conversion_close( &( st_ivas->hLsSetUpConversion ) ); #endif } /* De-allocate McMasa-related handles */ Loading @@ -1042,10 +1065,17 @@ static ivas_error ivas_mc_dec_reconfig( /* init LS conversion if the renderer type asks for it */ if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } } } Loading @@ -1063,7 +1093,11 @@ static ivas_error ivas_mc_dec_reconfig( ivas_param_mc_dec_close( &st_ivas->hParamMC ); /* remove ls conversion if it was allocated by ParamMC */ #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } #ifdef IVAS_FLOAT_FIXED Loading @@ -1076,10 +1110,17 @@ static ivas_error ivas_mc_dec_reconfig( /* init LS conversion if the renderer type asks for it */ if ( ( st_ivas->renderer_type == RENDERER_MC ) && st_ivas->hLsSetUpConversion == NULL ) { #ifdef IVAS_FLOAT_FIXED if ( ( error = ivas_ls_setup_conversion_open_fx( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; } #endif } if ( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) Loading @@ -1095,7 +1136,11 @@ static ivas_error ivas_mc_dec_reconfig( /* remove old ls conversion for MCT if open, gets reopened correctly within ivas_param_mc_dec_open when needed */ if ( renderer_type_old == RENDERER_MC && st_ivas->hLsSetUpConversion != NULL ) { #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } if ( ( error = ivas_param_mc_dec_open( st_ivas ) ) != IVAS_ERR_OK ) Loading Loading @@ -1171,7 +1216,11 @@ static ivas_error ivas_mc_dec_reconfig( /* LS conversion */ if ( st_ivas->hLsSetUpConversion != NULL ) { #ifdef IVAS_FLOAT_FIXED ivas_ls_setup_conversion_close_fx( &st_ivas->hLsSetUpConversion ); #else ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); #endif } ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); Loading