diff --git a/apps/decoder.c b/apps/decoder.c index 38d513d867f6b103e4a129e2fa2cb51e923a1eab..abe1788de16d61dc209a7089917454c7fba9294a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2485,13 +2485,13 @@ static ivas_error decodeVoIP( } } - frame++; + // frame++; if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; - // frame++; + frame++; systemTime_ms += systemTimeInc_ms; #ifdef WMOPS #ifndef DONT_COUNT diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 04e80efe26eeb6c52af90ff7891ca718d09056be..5c8f35298cd4934fcfa198530c7ad057c3006227 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -3489,6 +3489,7 @@ void ivas_dirac_dec_render_sf_fx( Word16 num_channels_dir, exp; Word16 q_diffuseness_vector = Q31, q_reference_power_smooth = Q31; Word16 proto_power_smooth_len = 0; + Word16 tmp1; push_wmops( "ivas_dirac_dec_render" ); @@ -3511,46 +3512,22 @@ void ivas_dirac_dec_render_sf_fx( //////////////////////////////////////////////////////////////////////////// to be removed /////////////////////////////////////////////////////////////////// IF( EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_MONO ) ) { - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) ); IF( hDirACRend->masa_stereo_type_detect ) { hDirACRend->masa_stereo_type_detect->subtract_power_y_fx = 0; hDirACRend->masa_stereo_type_detect->q_subtract_power_y = Q31; } } - ELSE IF( NE_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_GAIN_SHD ) ) - { - SWITCH( nchan_transport ) - { - case 11: - case 8: - case 6: - case 4: - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hSpatParamRendCom->num_freq_bands * hDirACRend->num_outputs_diff ); - BREAK; - case 2: - IF( hDirACRend->hOutSetup.is_loudspeaker_setup ) - { - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 3, hSpatParamRendCom->num_freq_bands ) ); - } - ELSE - { - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) ); - } - BREAK; - case 1: - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hSpatParamRendCom->num_freq_bands ); - BREAK; - } - } IF( L_or( EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_PSD_LS ), EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_PSD_SHD ) ) ) { if ( hDirACRend->h_output_synthesis_psd_params.max_band_decorr != 0 ) { DIRAC_OUTPUT_SYNTHESIS_STATE *state = &( hDirACRend->h_output_synthesis_psd_state ); - f2me_buf( state->proto_power_diff_smooth, state->proto_power_diff_smooth_fx, &state->proto_power_diff_smooth_q, state->proto_power_diff_smooth_len ); - state->proto_power_diff_smooth_q = 31 - state->proto_power_diff_smooth_q; + tmp1 = L_norm_arr( state->proto_power_diff_smooth_fx, state->proto_power_diff_smooth_len ); + + scale_sig32( state->proto_power_diff_smooth_fx, state->proto_power_diff_smooth_len, tmp1 ); + state->proto_power_diff_smooth_q += tmp1; } } @@ -3674,13 +3651,15 @@ void ivas_dirac_dec_render_sf_fx( hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->hOutSetup.nchan_out_woLFE ); floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->hOutSetup.nchan_out_woLFE ); - hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); + tmp1 = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands, tmp1 ); + hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q += tmp1; - IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev != 0 ) + IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx != 0 ) { - hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE ); + tmp1 = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE, tmp1 ); + hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q += tmp1; } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -5065,7 +5044,6 @@ void ivas_dirac_dec_render_sf_fx( ELSE IF( EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_MONO ) ) { // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( hSpatParamRendCom->subframe_nbslots[subframe_idx], i_mult( 4, hSpatParamRendCom->num_freq_bands ) ) ); - fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) ); fixedToFloat_arrL32( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f, hDirACRend->proto_frame_f_q, i_mult( 6, hSpatParamRendCom->num_freq_bands ) ); // fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands ); } @@ -5078,7 +5056,6 @@ void ivas_dirac_dec_render_sf_fx( case 6: case 4: // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( i_mult( 2, hSpatParamRendCom->subframe_nbslots[subframe_idx] ), i_mult( hSpatParamRendCom->num_freq_bands, hDirACRend->num_outputs_diff ) ) ); - fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( hSpatParamRendCom->num_freq_bands, hDirACRend->num_outputs_diff ) ); me2f_buf( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f_q, hDirACRend->proto_frame_f, i_mult( 2, i_mult( hSpatParamRendCom->num_freq_bands, hDirACRend->num_outputs_diff ) ) ); // fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands ); BREAK; @@ -5086,19 +5063,16 @@ void ivas_dirac_dec_render_sf_fx( IF( hDirACRend->hOutSetup.is_loudspeaker_setup ) { // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( hSpatParamRendCom->subframe_nbslots[subframe_idx], i_mult( 6, hSpatParamRendCom->num_freq_bands ) ) ); - fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 3, hSpatParamRendCom->num_freq_bands ) ); } ELSE { // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( hSpatParamRendCom->subframe_nbslots[subframe_idx], i_mult( 4, hSpatParamRendCom->num_freq_bands ) ) ); - fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) ); } me2f_buf( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f_q, hDirACRend->proto_frame_f, i_mult( 6, hSpatParamRendCom->num_freq_bands ) ); // fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands ); BREAK; case 1: // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( hSpatParamRendCom->subframe_nbslots[subframe_idx], i_mult( 2, hSpatParamRendCom->num_freq_bands ) ) ); - fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hSpatParamRendCom->num_freq_bands ); me2f_buf( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f_q, hDirACRend->proto_frame_f, i_mult( 2, i_mult( hSpatParamRendCom->num_freq_bands, hDirACRend->num_protos_diff ) ) ); // fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands ); BREAK; @@ -5127,21 +5101,6 @@ void ivas_dirac_dec_render_sf_fx( hDirACRend->proto_frame_dec_f = hDirACRend->proto_frame_f; } } - IF( L_or( EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_PSD_LS ), EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_PSD_SHD ) ) ) - { - if ( hDirACRend->h_output_synthesis_psd_params.max_band_decorr != 0 ) - { - DIRAC_OUTPUT_SYNTHESIS_STATE *state = &( hDirACRend->h_output_synthesis_psd_state ); - me2f_buf( state->proto_power_diff_smooth_fx, - 31 - state->proto_power_diff_smooth_q, - state->proto_power_diff_smooth, - state->proto_power_diff_smooth_len ); - /* me2f_buf( state->proto_diffuse_buffer_f_fx, - 31 - state->proto_diffuse_buffer_f_q, - state->proto_diffuse_buffer_f, - state->proto_diffuse_buffer_f_len );*/ - } - } if ( hDirAC->hConfig->dec_param_estim == FALSE && hodirac_flag ) { @@ -5215,14 +5174,6 @@ void ivas_dirac_dec_render_sf_fx( fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q, size ); fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hSpatParamRendCom->num_freq_bands * hDirACRend->hOutSetup.nchan_out_woLFE ); - - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE ); - IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev != 0 ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_params.max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE ); - } } if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) diff --git a/lib_dec/ivas_dirac_output_synthesis_cov.c b/lib_dec/ivas_dirac_output_synthesis_cov.c index b9774af5bfa5a3eb4b20982d72a787d4408275a4..1374393e3501e214e80ae88e8a76ceff8a930806 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov.c @@ -120,6 +120,7 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis matrix\n" ) ); } set_zero_fx( h_dirac_output_synthesis_state->mixing_matrix_fx[idx], nchan_out * nchan_in ); + h_dirac_output_synthesis_state->mixing_matrix_len = i_mult( nchan_out, nchan_in ); } for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { @@ -142,6 +143,7 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis matrix\n" ) ); } set_zero_fx( h_dirac_output_synthesis_state->mixing_matrix_res_fx[idx], nchan_out * nchan_out ); + h_dirac_output_synthesis_state->mixing_matrix_res_len = i_mult( nchan_out, nchan_out ); } for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { @@ -205,34 +207,6 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open_fx( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis covariance\n" ) ); } - - /* cov buffers */ - for ( idx = 0; idx < num_param_bands; idx++ ) - { - - if ( ( h_dirac_output_synthesis_state->mixing_matrix[idx] = (float *) malloc( nchan_out * nchan_in * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis matrix\n" ) ); - } - set_zero( h_dirac_output_synthesis_state->mixing_matrix[idx], nchan_out * nchan_in ); - } - for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) - { - h_dirac_output_synthesis_state->mixing_matrix[idx] = NULL; - } - - for ( idx = 0; idx < num_param_bands_residual; idx++ ) - { - if ( ( h_dirac_output_synthesis_state->mixing_matrix_res[idx] = (float *) malloc( nchan_out * nchan_out * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis matrix\n" ) ); - } - set_zero( h_dirac_output_synthesis_state->mixing_matrix_res[idx], nchan_out * nchan_out ); - } - for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) - { - h_dirac_output_synthesis_state->mixing_matrix_res[idx] = NULL; - } #endif return IVAS_ERR_OK; } @@ -440,15 +414,15 @@ void ivas_dirac_dec_output_synthesis_cov_init_fx( set16_fx( h_dirac_output_synthesis_state->mixing_matrix_res_old_exp, 0, CLDFB_NO_CHANNELS_MAX ); set16_fx( h_dirac_output_synthesis_state->mixing_matrix_res_exp, 0, CLDFB_NO_CHANNELS_MAX ); #if 1 /*TODO: To be removed :Floating point initializations*/ - FOR( idx = 0; idx < n_param_bands; idx++ ) - { - set_zero( h_dirac_output_synthesis_state->mixing_matrix[idx], nchan_out * nchan_in ); - } - - FOR( idx = 0; idx < n_param_bands_res; idx++ ) - { - set_zero( h_dirac_output_synthesis_state->mixing_matrix_res[idx], nchan_out * nchan_out ); - } + // FOR ( idx = 0; idx < n_param_bands; idx++ ) + //{ + // set_zero( h_dirac_output_synthesis_state->mixing_matrix[idx], nchan_out * nchan_in ); + // } + + // FOR ( idx = 0; idx < n_param_bands_res; idx++ ) + //{ + // set_zero( h_dirac_output_synthesis_state->mixing_matrix_res[idx], nchan_out * nchan_out ); + // } #endif return; @@ -606,22 +580,6 @@ void ivas_dirac_dec_output_synthesis_cov_close_fx( free( h_dirac_output_synthesis_params->proto_matrix ); h_dirac_output_synthesis_params->proto_matrix = NULL; } - - /* free cov buffers */ - FOR( idx = 0; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) - { - IF( h_dirac_output_synthesis_state->mixing_matrix[idx] != NULL ) - { - free( h_dirac_output_synthesis_state->mixing_matrix[idx] ); - h_dirac_output_synthesis_state->mixing_matrix[idx] = NULL; - } - - IF( h_dirac_output_synthesis_state->mixing_matrix_res[idx] != NULL ) - { - free( h_dirac_output_synthesis_state->mixing_matrix_res[idx] ); - h_dirac_output_synthesis_state->mixing_matrix_res[idx] = NULL; - } - } #endif return; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 81f83a3afd0f59fc63b41cd9e39b36564b4c49c5..0d4ef85ff3b32134bdc162eb144a6dbf2f57a730 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2327,17 +2327,7 @@ void ivas_jbm_dec_feed_tc_to_renderer( ELSE IF( EQ_16( st_ivas->mc_mode, MC_MODE_PARAMMC ) ) { #ifdef IVAS_FLOAT_FIXED - Word16 cldfb_slots, j; - cldfb_slots = DEFAULT_JBM_CLDFB_TIMESLOTS; - if ( st_ivas->hDecoderConfig->Opt_tsm ) - { - cldfb_slots = MAX_JBM_CLDFB_TIMESLOTS; - } - - f2me_buf( st_ivas->hParamMC->Cldfb_RealBuffer_tc, st_ivas->hParamMC->Cldfb_RealBuffer_tc_fx, &st_ivas->hParamMC->Cldfb_RealBuffer_tc_e, cldfb_slots * st_ivas->nchan_transport * st_ivas->hParamMC->num_freq_bands ); - f2me_buf( st_ivas->hParamMC->Cldfb_ImagBuffer_tc, st_ivas->hParamMC->Cldfb_ImagBuffer_tc_fx, &st_ivas->hParamMC->Cldfb_ImagBuffer_tc_e, cldfb_slots * st_ivas->nchan_transport * st_ivas->hParamMC->num_freq_bands ); - - + Word16 j; Word16 max_e = 0, input_q[MAX_CLDFB_DIGEST_CHANNELS], in_q; FOR( i = 0; i < MAX_CLDFB_DIGEST_CHANNELS; i++ ) { @@ -2399,15 +2389,6 @@ void ivas_jbm_dec_feed_tc_to_renderer( scale_sig32( st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_fx[param_band_idx], nchan_out_cov * nchan_out_cov, shift ); st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_e[param_band_idx] = sub( st_ivas->hParamMC->h_output_synthesis_cov_state.cy_old_e[param_band_idx], shift ); } - - FOR( Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->num_param_bands_synth; param_band_idx++ ) - { - me2f_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix[param_band_idx], nchan_out_cov * nchan_transport ); - IF( st_ivas->hParamMC->band_grouping[param_band_idx] < st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) - { - me2f_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res[param_band_idx], nchan_out_cov * nchan_out_cov ); - } - } #else ivas_param_mc_dec_digest_tc( st_ivas, (uint8_t) n_render_timeslots, p_data_f ); #endif @@ -3505,13 +3486,7 @@ ivas_error ivas_jbm_dec_render( nchan_out_cldfb = nchan_out_transport; set_s( channel_active_fx, 1, nchan_out_cov ); } - // ftf for ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot_fx - FOR( i = 0; i < 16 * nchan_transport_tmp * st_ivas->hParamMC->num_freq_bands; i++ ) - { - st_ivas->hParamMC->Cldfb_RealBuffer_tc_fx[i] = floatToFixed( st_ivas->hParamMC->Cldfb_RealBuffer_tc[i], Q6 ); - st_ivas->hParamMC->Cldfb_ImagBuffer_tc_fx[i] = floatToFixed( st_ivas->hParamMC->Cldfb_ImagBuffer_tc[i], Q6 ); - } // ftf changes if ( st_ivas->hParamMC->max_band_decorr > 0 ) { @@ -3529,19 +3504,6 @@ ivas_error ivas_jbm_dec_render( f2me_buf( st_ivas->hParamMC->h_freq_domain_decorr_ap_state->decorr_buffer, st_ivas->hParamMC->h_freq_domain_decorr_ap_state->decorr_buffer_fx, &tmp_e, st_ivas->hParamMC->h_freq_domain_decorr_ap_state->decorr_buffer_len ); st_ivas->hParamMC->h_freq_domain_decorr_ap_state->q_decorr_buffer = 31 - tmp_e; } - - FOR( Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->num_param_bands_synth; param_band_idx++ ) - { - - - f2me_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[param_band_idx], nchan_transport * nchan_out_cov ); - - IF( st_ivas->hParamMC->band_grouping[param_band_idx] < st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) - { - f2me_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[param_band_idx], nchan_out_cov * nchan_out_cov ); - } - } - if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) { if ( st_ivas->hCombinedOrientationData && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) @@ -3561,15 +3523,20 @@ ivas_error ivas_jbm_dec_render( } } - if ( st_ivas->hParamMC->slots_rendered == st_ivas->hParamMC->num_slots ) + Word16 tempp; + FOR( Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->num_param_bands_synth; param_band_idx++ ) { - FOR( Word16 param_band_idx = 0; param_band_idx < st_ivas->hParamMC->hMetadataPMC->nbands_coded; param_band_idx++ ) + + + tempp = getScaleFactor32( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[param_band_idx], nchan_transport * nchan_out_cov ); + scale_sig32( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[param_band_idx], nchan_transport * nchan_out_cov, tempp ); + st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[param_band_idx] = sub( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[param_band_idx], tempp ); + + IF( st_ivas->hParamMC->band_grouping[param_band_idx] < st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) { - f2me_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[param_band_idx], nchan_transport_tmp * nchan_out_cov ); - IF( st_ivas->hParamMC->band_grouping[param_band_idx] < st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) - { - f2me_buf( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res[param_band_idx], st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[param_band_idx], &st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[param_band_idx], nchan_transport_tmp * nchan_out_cov ); - } + tempp = getScaleFactor32( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[param_band_idx], nchan_transport * nchan_out_cov ); + scale_sig32( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[param_band_idx], nchan_transport * nchan_out_cov, tempp ); + st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[param_band_idx] = sub( st_ivas->hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[param_band_idx], tempp ); } } #endif @@ -6663,7 +6630,6 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( * * *--------------------------------------------------------------------------*/ - #ifndef IVAS_FLOAT_FIXED void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 1e03ab40d9f986ffad1a148f39f93949ca80fbd5..23d454fbd1a94a3d4947dd624f684397a9f527a9 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -550,19 +550,6 @@ ivas_error ivas_param_mc_dec_open_fx( hParamMC->sz = n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands; -#if 1 /*TODO: To be removed later(floating point malloc)*/ - if ( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); - } - set_zero( hParamMC->Cldfb_RealBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); - if ( ( hParamMC->Cldfb_ImagBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); - } - set_zero( hParamMC->Cldfb_ImagBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); -#endif - IF( st_ivas->hTcBuffer == NULL ) { IF( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_transport, 0, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) @@ -575,10 +562,6 @@ ivas_error ivas_param_mc_dec_open_fx( { hParamMC->Cldfb_RealBuffer_tc_fx = NULL; hParamMC->Cldfb_ImagBuffer_tc_fx = NULL; -#if 1 /*TODO: To be removed later*/ - hParamMC->Cldfb_RealBuffer_tc = NULL; - hParamMC->Cldfb_ImagBuffer_tc = NULL; -#endif } hParamMC->subframes_rendered = 0; @@ -1539,18 +1522,6 @@ ivas_error ivas_param_mc_dec_reconfig_fx( IF( NE_16( hParamMC->synthesis_conf, PARAM_MC_SYNTH_MONO_STEREO ) ) { Word16 n_cldfb_slots; -#if 1 /*TODO: To be removed later*/ - IF( hParamMC->Cldfb_RealBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_RealBuffer_tc ); - hParamMC->Cldfb_RealBuffer_tc = NULL; - } - IF( hParamMC->Cldfb_ImagBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_ImagBuffer_tc ); - hParamMC->Cldfb_ImagBuffer_tc = NULL; - } -#endif IF( hParamMC->Cldfb_RealBuffer_tc_fx != NULL ) { free( hParamMC->Cldfb_RealBuffer_tc_fx ); @@ -1567,19 +1538,6 @@ ivas_error ivas_param_mc_dec_reconfig_fx( { n_cldfb_slots = MAX_JBM_CLDFB_TIMESLOTS; } -#if 1 /*TODO: To be removed later*/ - IF( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); - } - set_zero( hParamMC->Cldfb_RealBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); - - IF( ( hParamMC->Cldfb_ImagBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); - } - set_zero( hParamMC->Cldfb_ImagBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); -#endif IF( ( hParamMC->Cldfb_RealBuffer_tc_fx = (Word32 *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( Word32 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); @@ -1594,18 +1552,6 @@ ivas_error ivas_param_mc_dec_reconfig_fx( } ELSE { -#if 1 /*TODO:To be removed later(floating point memory dealloc)*/ - IF( hParamMC->Cldfb_RealBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_RealBuffer_tc ); - hParamMC->Cldfb_RealBuffer_tc = NULL; - } - IF( hParamMC->Cldfb_ImagBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_ImagBuffer_tc ); - hParamMC->Cldfb_ImagBuffer_tc = NULL; - } -#endif IF( hParamMC->Cldfb_RealBuffer_tc_fx != NULL ) { free( hParamMC->Cldfb_RealBuffer_tc_fx ); @@ -2306,16 +2252,6 @@ void ivas_param_mc_dec_close_fx( free( hParamMC->hoa_encoder ); hParamMC->hoa_encoder = NULL; } - IF( hParamMC->Cldfb_RealBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_RealBuffer_tc ); - hParamMC->Cldfb_RealBuffer_tc = NULL; - } - IF( hParamMC->Cldfb_ImagBuffer_tc != NULL ) - { - free( hParamMC->Cldfb_ImagBuffer_tc ); - hParamMC->Cldfb_ImagBuffer_tc = NULL; - } #endif /***********************************ends here************************************************/ free( *hParamMC_out ); @@ -3022,9 +2958,9 @@ void ivas_param_mc_dec_digest_tc_fx( IF( slot_idx >= 2 * hParamMC->hMetadataPMC->attackIndex ) { ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot_fx( &hParamMC->Cldfb_RealBuffer_tc_fx[slot_idx * hParamMC->num_freq_bands * nchan_transport], - hParamMC->Cldfb_RealBuffer_tc_e, + /*hParamMC->Cldfb_RealBuffer_tc_e*/ Q31 - Q6, &hParamMC->Cldfb_ImagBuffer_tc_fx[slot_idx * hParamMC->num_freq_bands * nchan_transport], - hParamMC->Cldfb_ImagBuffer_tc_e, + /*hParamMC->Cldfb_ImagBuffer_tc_e*/ Q31 - Q6, cx_fx, &cx_e, cx_imag_fx, @@ -3488,6 +3424,45 @@ void ivas_param_mc_dec_render_fx( slot_idx_start = hParamMC->slots_rendered; slot_idx_start_cldfb_synth = 0; + Flag is_zero = 1; + move16(); + FOR( j = 0; j < st_ivas->hParamMC->hMetadataPMC->nbands_coded; j++ ) + { + is_zero = 1; + move16(); + FOR( i = 0; i < hParamMC->h_output_synthesis_cov_state.mixing_matrix_len; i++ ) + { + IF( NE_32( hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[j][i], 0 ) ) + { + is_zero = 0; + move16(); + } + } + IF( is_zero ) + { + hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[j] = 0; + move16(); + } + is_zero = 1; + move16(); + IF( st_ivas->hParamMC->band_grouping[j] < st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) + { + FOR( i = 0; i < hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_len; i++ ) + { + IF( NE_32( hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[j][i], 0 ) ) + { + is_zero = 0; + move16(); + } + } + } + + IF( is_zero ) + { + hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[j] = 0; + move16(); + } + } FOR( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { FOR( slot_idx = 0; slot_idx < hParamMC->subframe_nbslots[subframe_idx]; ( slot_idx++, hParamMC->slots_rendered++ ) ) diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index c6c307fdad7267a53dd5136398d84a881fc60c15..51786e21a67f373b64db7017c61f6602bd98be7c 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -784,9 +784,9 @@ typedef struct dirac_output_synthesis_cov_state_structure float *cy_old[CLDFB_NO_CHANNELS_MAX]; float *mixing_matrix_old[CLDFB_NO_CHANNELS_MAX]; float *mixing_matrix_res_old[CLDFB_NO_CHANNELS_MAX]; -#endif float *mixing_matrix[CLDFB_NO_CHANNELS_MAX]; float *mixing_matrix_res[CLDFB_NO_CHANNELS_MAX]; +#endif #ifdef IVAS_FLOAT_FIXED Word32 *cx_old_fx[CLDFB_NO_CHANNELS_MAX]; Word16 cx_old_len; @@ -802,7 +802,9 @@ typedef struct dirac_output_synthesis_cov_state_structure Word16 *mixing_matrix_old_exp; Word16 *mixing_matrix_res_old_exp; Word16 *mixing_matrix_exp; + Word16 mixing_matrix_len; Word16 *mixing_matrix_res_exp; + Word16 mixing_matrix_res_len; #endif // IVAS_FLOAT_FIXED } DIRAC_OUTPUT_SYNTHESIS_COV_STATE; @@ -829,14 +831,15 @@ typedef struct ivas_param_mc_diff_proto_info_structure typedef struct ivas_param_mc_dec_data_structure { int16_t slot_size; - float *Cldfb_RealBuffer_tc; - float *Cldfb_ImagBuffer_tc; #ifdef IVAS_FLOAT_FIXED Word32 *Cldfb_RealBuffer_tc_fx; // Q12 Word16 Cldfb_RealBuffer_tc_e; Word32 *Cldfb_ImagBuffer_tc_fx; // Q12 Word16 Cldfb_ImagBuffer_tc_e; Word16 sz; +#else + float *Cldfb_RealBuffer_tc; + float *Cldfb_ImagBuffer_tc; #endif int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; int16_t nb_subframes; @@ -862,8 +865,8 @@ typedef struct ivas_param_mc_dec_data_structure float *proto_frame_f; float *proto_frame_dec_f; #else - Word32 *proto_frame_f_fx; /* Q11 */ - Word32 *proto_frame_dec_f_fx; /* Q11 */ + Word32 *proto_frame_f_fx; /* Q11 */ + Word32 *proto_frame_dec_f_fx; /* Q11 */ #endif DIRAC_OUTPUT_SYNTHESIS_COV_STATE h_output_synthesis_cov_state; @@ -874,8 +877,8 @@ typedef struct ivas_param_mc_dec_data_structure float *icc_q; /* ICC parameters*/ float *icld_q; #else - Word16 *icc_q_fx; /* ICC parameters*/ /* Q15 */ - Word16 *icld_q_fx; /* Q8 */ + Word16 *icc_q_fx; /* ICC parameters*/ /* Q15 */ + Word16 *icld_q_fx; /* Q8 */ #endif int16_t max_param_band_abs_cov; #ifndef IVAS_FLOAT_FIXED diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 78b6941225f86e8e2604285f497921c33a33e741..5f25a4eeb014d5998ef6aaf34a90b79fa33d3c15 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -1461,10 +1461,10 @@ static ivas_error IVAS_DEC_GetTcSamples( Word16 length = 15 * num_freq_bands * n_ch_cldfb_tmp + num_freq_bands * ( n_ch_cldfb_tmp - 1 ) + st_ivas->cldfbAnaDec[lp]->no_channels; FOR( Word16 lp2 = 0; lp2 < length; lp2++ ) { - st_ivas->hParamMC->Cldfb_RealBuffer_tc_fx[lp2] = - floatToFixed( st_ivas->hParamMC->Cldfb_RealBuffer_tc[lp2], 6 ); + /*st_ivas->hParamMC->Cldfb_RealBuffer_tc_fx[lp2] = + floatToFixed(st_ivas->hParamMC->Cldfb_RealBuffer_tc[lp2], 6); st_ivas->hParamMC->Cldfb_ImagBuffer_tc_fx[lp2] = - floatToFixed( st_ivas->hParamMC->Cldfb_ImagBuffer_tc[lp2], 6 ); + floatToFixed(st_ivas->hParamMC->Cldfb_ImagBuffer_tc[lp2], 6);*/ } } } @@ -1518,17 +1518,6 @@ static ivas_error IVAS_DEC_GetTcSamples( { num_freq_bands = st_ivas->hParamMC->num_freq_bands; } - FOR( Word16 lp = 0; lp < n_ch_cldfb_tmp; lp++ ) - { - Word16 length = 15 * num_freq_bands * n_ch_cldfb_tmp + num_freq_bands * ( n_ch_cldfb_tmp - 1 ) + st_ivas->cldfbAnaDec[lp]->no_channels; - FOR( Word16 lp2 = 0; lp2 < length; lp2++ ) - { - st_ivas->hParamMC->Cldfb_RealBuffer_tc[lp2] = - fixedToFloat( st_ivas->hParamMC->Cldfb_RealBuffer_tc_fx[lp2], 6 ); - st_ivas->hParamMC->Cldfb_ImagBuffer_tc[lp2] = - fixedToFloat( st_ivas->hParamMC->Cldfb_ImagBuffer_tc_fx[lp2], 6 ); - } - } } /*------------------------fix 2 flt----------------------*/ } diff --git a/lib_rend/ivas_dirac_output_synthesis_dec.c b/lib_rend/ivas_dirac_output_synthesis_dec.c index c9148973b23a53dee98981d466ebe37e5452711d..de26b93ab7c1fdf443617ea512067c991cf1c059 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec.c @@ -181,16 +181,10 @@ ivas_error ivas_dirac_dec_output_synthesis_open_fx( } /* prototype power buffers */ - dirac_output_synthesis_state->proto_power_smooth_prev = NULL; dirac_output_synthesis_state->proto_power_smooth_prev_fx = NULL; IF( hDirACRend->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) { - /*TODO : remove float code*/ - if ( ( dirac_output_synthesis_state->proto_power_smooth_prev = (float *) malloc( hSpatParamRendCom->num_freq_bands * hDirACRend->num_protos_dir * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); - } IF( ( dirac_output_synthesis_state->proto_power_smooth_prev_fx = (Word32 *) malloc( hSpatParamRendCom->num_freq_bands * hDirACRend->num_protos_dir * sizeof( Word32 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); @@ -199,11 +193,6 @@ ivas_error ivas_dirac_dec_output_synthesis_open_fx( } IF( dirac_output_synthesis_params->max_band_decorr > 0 && ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_PSD_LS || hDirACRend->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) ) { - /*TODO : remove float code*/ - if ( ( dirac_output_synthesis_state->proto_power_diff_smooth_prev = (float *) malloc( dirac_output_synthesis_params->max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); - } IF( ( dirac_output_synthesis_state->proto_power_diff_smooth_prev_fx = (Word32 *) malloc( dirac_output_synthesis_params->max_band_decorr * hDirACRend->hOutSetup.nchan_out_woLFE * sizeof( Word32 ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); @@ -212,8 +201,6 @@ ivas_error ivas_dirac_dec_output_synthesis_open_fx( } ELSE { - /*TODO : remove float code*/ - dirac_output_synthesis_state->proto_power_diff_smooth_prev = NULL; dirac_output_synthesis_state->proto_power_diff_smooth_prev_fx = NULL; } @@ -743,6 +730,7 @@ ivas_error ivas_dirac_dec_output_synthesis_open( * *------------------------------------------------------------------------*/ +#ifndef IVAS_FLOAT_FIXED void ivas_dirac_dec_output_synthesis_init( SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ @@ -813,8 +801,7 @@ void ivas_dirac_dec_output_synthesis_init( return; } - -#ifdef IVAS_FLOAT_FIXED +#else void ivas_dirac_dec_output_synthesis_init_fx( SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ @@ -863,10 +850,6 @@ void ivas_dirac_dec_output_synthesis_init_fx( set_zero( h_dirac_output_synthesis_state->cy_auto_diff_smooth_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->num_outputs_dir ); } - if ( h_dirac_output_synthesis_state->proto_power_smooth_prev != NULL ) - { - set_zero( h_dirac_output_synthesis_state->proto_power_smooth_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->num_protos_dir ); - } set_zero( h_dirac_output_synthesis_state->gains_dir_prev, size ); if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) @@ -878,11 +861,6 @@ void ivas_dirac_dec_output_synthesis_init_fx( set_zero( h_dirac_output_synthesis_state->gains_diff_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->num_outputs_dir ); } - if ( h_dirac_output_synthesis_state->proto_power_diff_smooth_prev != NULL ) - { - set_zero( h_dirac_output_synthesis_state->proto_power_diff_smooth_prev, h_dirac_output_synthesis_params->max_band_decorr * nchan_out_woLFE ); - } - #ifdef IVAS_FLOAT_FIXED IF( h_dirac_output_synthesis_state->cy_auto_dir_smooth_prev_fx != NULL ) { @@ -1057,19 +1035,6 @@ void ivas_dirac_dec_output_synthesis_close_fx( * memory deallocation *-----------------------------------------------------------------*/ - /* free power buffers */ - if ( ( dirac_output_synthesis_state )->proto_power_smooth_prev != NULL ) - { - free( ( dirac_output_synthesis_state )->proto_power_smooth_prev ); - ( dirac_output_synthesis_state )->proto_power_smooth_prev = NULL; - } - - if ( ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev != NULL ) - { - free( ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev ); - ( dirac_output_synthesis_state )->proto_power_diff_smooth_prev = NULL; - } - /* free target power buffers */ if ( ( dirac_output_synthesis_state )->cy_auto_dir_smooth_prev != NULL ) { diff --git a/lib_rend/ivas_dirac_rend.c b/lib_rend/ivas_dirac_rend.c index 9cc95548de4fcf37a617d2fd83cc5d2c0dda8ab5..2e8ae2cb8cb8bc82ac0c16dbf9abe9fedcbcc583 100644 --- a/lib_rend/ivas_dirac_rend.c +++ b/lib_rend/ivas_dirac_rend.c @@ -1270,10 +1270,6 @@ ivas_error ivas_dirac_alloc_mem( hDirAC_mem->cy_auto_dir_smooth = NULL; #ifdef IVAS_FLOAT_FIXED hDirAC_mem->cy_auto_dir_smooth_fx = NULL; -#endif - hDirAC_mem->proto_power_smooth = NULL; - hDirAC_mem->proto_power_diff_smooth = NULL; -#ifdef IVAS_FLOAT_FIXED hDirAC_mem->proto_power_smooth_fx = NULL; hDirAC_mem->proto_power_diff_smooth_fx = NULL; hDirAC_mem->direct_responses_square_fx = NULL; @@ -1301,11 +1297,6 @@ ivas_error ivas_dirac_alloc_mem( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len = size; #endif - if ( ( hDirAC_mem->proto_power_smooth = (float *) malloc( sizeof( float ) * size ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); - } - set_zero( hDirAC_mem->proto_power_smooth, size ); #ifdef IVAS_FLOAT_FIXED if ( ( hDirAC_mem->proto_power_smooth_fx = (Word32 *) malloc( sizeof( Word32 ) * size ) ) == NULL ) { @@ -1313,20 +1304,13 @@ ivas_error ivas_dirac_alloc_mem( } set_zero_fx( hDirAC_mem->proto_power_smooth_fx, size ); hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len = size; -#endif - if ( ( hDirAC_mem->proto_power_diff_smooth = (float *) malloc( sizeof( float ) * size ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); - } - set_zero( hDirAC_mem->proto_power_diff_smooth, size ); -#ifdef IVAS_FLOAT_FIXED if ( ( hDirAC_mem->proto_power_diff_smooth_fx = (Word32 *) malloc( sizeof( Word32 ) * size ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); } set_zero_fx( hDirAC_mem->proto_power_diff_smooth_fx, size ); hDirAC_mem->proto_power_diff_smooth_len = size; - hDirAC_mem->proto_power_diff_smooth_q = 31; + hDirAC_mem->proto_power_diff_smooth_q = Q31; #endif #ifndef IVAS_FLOAT_FIXED @@ -1361,8 +1345,6 @@ ivas_error ivas_dirac_alloc_mem( #endif } } - hDirACRend->h_output_synthesis_psd_state.proto_power_smooth = hDirAC_mem->proto_power_smooth; - hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth = hDirAC_mem->proto_power_diff_smooth; hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth = hDirAC_mem->cy_auto_dir_smooth; #ifdef IVAS_FLOAT_FIXED hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx = hDirAC_mem->proto_power_diff_smooth_fx; @@ -1705,20 +1687,10 @@ void ivas_dirac_free_mem_fx( { free( hDirAC_mem->cy_auto_dir_smooth_fx ); } - IF( hDirAC_mem->proto_power_smooth != NULL ) - { - free( hDirAC_mem->proto_power_smooth ); - } IF( hDirAC_mem->proto_power_smooth_fx != NULL ) { free( hDirAC_mem->proto_power_smooth_fx ); } -#if 1 /* todo: remove float */ - IF( hDirAC_mem->proto_power_diff_smooth != NULL ) - { - free( hDirAC_mem->proto_power_diff_smooth ); - } -#endif IF( hDirAC_mem->proto_power_diff_smooth_fx != NULL ) { free( hDirAC_mem->proto_power_diff_smooth_fx ); diff --git a/lib_rend/ivas_reverb_utils.c b/lib_rend/ivas_reverb_utils.c index c1e22ff1c53978397a587426ba39f59b6087a146..7f4af770372e983224af0e798dbaadbd4668593b 100644 --- a/lib_rend/ivas_reverb_utils.c +++ b/lib_rend/ivas_reverb_utils.c @@ -160,6 +160,7 @@ ivas_error ivas_reverb_prepare_cldfb_params( * Function for convolving CLDFB-domain data with filter taps *-----------------------------------------------------------------------------------------*/ +#ifndef IVAS_FLOAT_FIXED static void ivas_cldfb_convolver( cldfb_convolver_state *convolver_state, /* i/o: pointer to convolver state structure */ float out_CLDFB_real[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX], /* o : real part of binaural signals */ @@ -218,6 +219,7 @@ static void ivas_cldfb_convolver( return; } +#endif // DEBUG /*-----------------------------------------------------------------------------------------* @@ -226,6 +228,7 @@ static void ivas_cldfb_convolver( * Function converts CLDFB filter taps into time-domain data *-----------------------------------------------------------------------------------------*/ +#ifndef IVAS_FLOAT_FIXED static ivas_error get_IR_from_filter_taps( const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const int16_t hrtf_idx, @@ -400,6 +403,7 @@ static ivas_error get_IR_from_filter_taps( return IVAS_ERR_OK; } +#endif /*-----------------------------------------------------------------------------------------* * Function ivas_reverb_get_cldfb_hrtf_set_properties() @@ -423,6 +427,9 @@ static ivas_error ivas_reverb_get_cldfb_hrtf_set_properties( float hrtf_count_inverted; int16_t fft_size, IR_length, log2_fft_size, half_fft_size, freq_count; ivas_error error; +#ifdef IVAS_FLOAT_FIXED /*Resolving the extra warnings added*/ + UNUSED_PARAM( error ); +#endif // !IVAS_FLOAT_FIXED fft_size = RV_FILTER_MAX_FFT_SIZE; IR_length = CLDFB_NO_CHANNELS_MAX * ( ( fft_size + CLDFB_NO_CHANNELS_MAX - 1 ) / CLDFB_NO_CHANNELS_MAX ); @@ -456,10 +463,17 @@ static ivas_error ivas_reverb_get_cldfb_hrtf_set_properties( Loop over all the HRTFs available */ for ( hrtf_idx = 0; hrtf_idx < hrtf_count; hrtf_idx++ ) { +#ifndef IVAS_FLOAT_FIXED if ( ( error = get_IR_from_filter_taps( hHrtfFastConv, hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ) ) != IVAS_ERR_OK ) { return error; } +#else + UNUSED_PARAM( hHrtfFastConv ); + UNUSED_PARAM( use_brir ); + UNUSED_PARAM( sampling_rate ); + UNUSED_PARAM( IR_length ); +#endif /* Perform forward FFT on both L/R channels */ fft_rel( current_HRTF_data_L, (int16_t) fft_size, (int16_t) log2_fft_size ); diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 7e5eb94714a17455c7bcea80c1e54e62362f6622..c7964bdee3ebc1ef0fc8122f71f0cfd1785185f4 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -269,8 +269,10 @@ typedef struct dirac_dec_stack_mem #endif /*Prototype NRGs*/ +#ifndef IVAS_FLOAT_FIXED float *proto_power_smooth; float *proto_power_diff_smooth; +#endif /*Gain or power factors for directional and diffuse streams*/ float *direct_power_factor; @@ -376,11 +378,15 @@ typedef struct dirac_output_synthesis_state_structure float *direct_power_factor; float *diffuse_power_factor; +#ifndef IVAS_FLOAT_FIXED float *proto_power_smooth; /* Smoothed power of the prototype signals. Size: num_freq_bands*num_channels. */ float *proto_power_smooth_prev; /* Smoothed power of the prototype signals of the previous synthesis block. Size: num_freq_bands*num_channels. */ +#endif +#ifndef IVAS_FLOAT_FIXED float *proto_power_diff_smooth; float *proto_power_diff_smooth_prev; +#endif /* only pointer to local buffers */ #ifndef IVAS_FLOAT_FIXED @@ -2084,22 +2090,24 @@ typedef struct ivas_hrtfs_fastconv_struct Word32 ***leftHRIRImag_HOA3_fx; Word32 ***rightHRIRReal_HOA3_fx; Word32 ***rightHRIRImag_HOA3_fx; -#endif +#else float ***leftHRIRReal_HOA3; float ***leftHRIRImag_HOA3; float ***rightHRIRReal_HOA3; float ***rightHRIRImag_HOA3; +#endif #ifdef IVAS_FLOAT_FIXED Word32 ***leftHRIRReal_fx; Word32 ***leftHRIRImag_fx; Word32 ***rightHRIRReal_fx; Word32 ***rightHRIRImag_fx; -#endif +#else float ***leftHRIRReal; float ***leftHRIRImag; float ***rightHRIRReal; float ***rightHRIRImag; +#endif #ifdef IVAS_FLOAT_FIXED Word32 ***leftBRIRReal_fx; @@ -2107,11 +2115,12 @@ typedef struct ivas_hrtfs_fastconv_struct Word32 ***rightBRIRReal_fx; Word32 ***rightBRIRImag_fx; Word32 FASTCONV_BRIR_latency_s_fx; -#endif +#else float ***leftBRIRReal; float ***leftBRIRImag; float ***rightBRIRReal; float ***rightBRIRImag; +#endif #ifndef IVAS_FLOAT_FIXED float FASTCONV_BRIR_latency_s; #endif @@ -2122,11 +2131,12 @@ typedef struct ivas_hrtfs_fastconv_struct Word32 ***rightHRIRReal_HOA2_fx; Word32 ***rightHRIRImag_HOA2_fx; Word32 FASTCONV_HOA2_latency_s_fx; -#endif +#else float ***leftHRIRReal_HOA2; float ***leftHRIRImag_HOA2; float ***rightHRIRReal_HOA2; float ***rightHRIRImag_HOA2; +#endif #ifndef IVAS_FLOAT_FIXED float FASTCONV_HOA2_latency_s; #endif @@ -2137,11 +2147,12 @@ typedef struct ivas_hrtfs_fastconv_struct Word32 ***rightHRIRReal_FOA_fx; Word32 ***rightHRIRImag_FOA_fx; Word32 FASTCONV_FOA_latency_s_fx; -#endif +#else float ***leftHRIRReal_FOA; float ***leftHRIRImag_FOA; float ***rightHRIRReal_FOA; float ***rightHRIRImag_FOA; +#endif #ifndef IVAS_FLOAT_FIXED float FASTCONV_FOA_latency_s; #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 4468ddfbe2b086792dc537c391c26d8a124735ae..925265558f5df313efc720f28c0b42655b2423aa 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -14744,6 +14744,7 @@ static void intermidiate_ext_dirac_render( int16_t slot_idx; int16_t nchan_transport; int16_t masa_band_mapping[MASA_FREQUENCY_BANDS + 1]; + Word16 tmp; hDirACRend = hMasaExtRend->hDirACRend; hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom; @@ -14852,7 +14853,6 @@ static void intermidiate_ext_dirac_render( floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_len ); } - floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len ); if ( hDirACRend->proto_signal_decorr_on == 1 ) { Word16 tmp_e; @@ -14889,21 +14889,26 @@ static void intermidiate_ext_dirac_render( // //f2me_buf(DirAC_mem.frame_dec_f, DirAC_mem.frame_dec_f_fx, &hDirACRend->proto_frame_dec_f_q, DirAC_mem.frame_dec_f_len); // } hDirACRend->proto_frame_dec_f_q = 31 - hDirACRend->proto_frame_dec_f_q; - if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth ) + + if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx ) { - hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); - hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_len ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len ); + tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len, tmp ); + hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q += tmp; + tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_len, tmp ); + hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q += tmp; } - hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len ); + tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len, tmp ); + hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q += tmp; - if ( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev != 0 ) + if ( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx != 0 ) { - hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len ); - floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len ); + tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len ); + scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len, tmp ); + hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q += tmp; } } else @@ -14960,18 +14965,6 @@ static void intermidiate_ext_dirac_render( { fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_len ); } - if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len ); - } - if ( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_len ); - } - if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len ); - } // fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_len); if ( hDirACRend->proto_signal_decorr_on == 1 ) { @@ -14995,15 +14988,6 @@ static void intermidiate_ext_dirac_render( hMasaExtRend->cldfbAnaRend[ch]->Q_cldfb_state = Q11; } } - if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_len ); - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len ); - } - IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev != 0 ) - { - fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len ); - } for ( ch = 0; ch < hDirACRend->hOutSetup.nchan_out_woLFE + hDirACRend->hOutSetup.num_lfe; ch++ ) {