Loading apps/renderer.c +9 −1 Original line number Diff line number Diff line Loading @@ -937,12 +937,20 @@ int main( fprintf( stderr, "Error in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef IVAS_FLOAT_FIXED Word32 var1 = (Word32)(args.syncMdDelay); IF((error = IVAS_REND_SetIsmMetadataDelay(hIvasRend, var1)) != IVAS_ERR_OK) { fprintf(stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string(error)); exit(-1); } #else if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading lib_com/float_to_fix_ops.c +0 −150 Original line number Diff line number Diff line Loading @@ -297,153 +297,3 @@ Word16 L_get_q_buf1( float *ptr_flt, Word16 length ) } } #endif #ifdef IVAS_FLOAT_FIXED void stereo_tcx_dec_mode_switch_reconf_To_fixed( Decoder_State *st, Word16 tofix, Word16 last_element_mode) { bool reconf = ( st->bits_frame_nominal != st->last_bits_frame_nominal ) || ( st->bwidth != st->last_bwidth ) || ( st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) ) || ( st->idchan == 1 && st->element_mode == IVAS_CPE_MDCT && last_element_mode != IVAS_CPE_MDCT ); if ( reconf ) { Word16 Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, if ( tofix ) { IF( st->hTcxDec ) { st->hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) ); st->output_frame_fx = st->hTcxDec->L_frameTCX; } IF( st->hHQ_core ) { //st->hHQ_core->Q_old_out = Q_factor_arr( st->hHQ_core->old_out, L_FRAME48k ); //st->hHQ_core->Q_old_outLB = Q_factor_arr( st->hHQ_core->old_outLB, L_FRAME32k ); st->hHQ_core->Q_fer_samples = 0; } IF( st->cldfbAna ) { Q_cldfbAna_cldfb_state = Q_factor_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_fx, Q_cldfbAna_cldfb_state, st->cldfbAna->cldfb_state_length ); } IF( st->cldfbBPF ) { Q_cldfbBPF_cldfb_state = Q_factor_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_fx, Q_cldfbBPF_cldfb_state, st->cldfbBPF->cldfb_state_length ); } IF( st->cldfbSyn ) { Q_cldfbSyn_cldfb_state = Q_factor_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_fx, Q_cldfbSyn_cldfb_state, st->cldfbSyn->cldfb_state_length ); } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } st->last_gain_syn_deemph = 0; } else { IF( st->cldfbAna ) { Q_cldfbAna_cldfb_state = Q_factor_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbAna->cldfb_state_fx, st->cldfbAna->cldfb_state, Q_cldfbAna_cldfb_state, st->cldfbAna->cldfb_state_length ); } IF( st->cldfbBPF ) { Q_cldfbBPF_cldfb_state = Q_factor_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbBPF->cldfb_state_fx, st->cldfbBPF->cldfb_state, Q_cldfbBPF_cldfb_state, st->cldfbBPF->cldfb_state_length ); } IF( st->cldfbSyn ) { Q_cldfbSyn_cldfb_state = Q_factor_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->cldfb_state, Q_cldfbSyn_cldfb_state, st->cldfbSyn->cldfb_state_length ); } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } } } } void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( Decoder_State *st, Word16 tofix, Word16 last_element_mode, const FRAME_MODE frameMode) { UNUSED_PARAM(frameMode); bool reconf = ( st->bits_frame_nominal != st->last_bits_frame_nominal ) || ( st->bwidth != st->last_bwidth ) || ( st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) ) || ( st->idchan == 1 && st->element_mode == IVAS_CPE_MDCT && last_element_mode != IVAS_CPE_MDCT ); if ( reconf ) { Word16 Q_cldfbSynHB_cldfb_state = 0;//, if ( tofix ) { IF( st->hTcxDec ) { st->hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) ); st->output_frame_fx = st->hTcxDec->L_frameTCX; } IF( st->hHQ_core ) { st->hHQ_core->Q_old_out = 0; st->hHQ_core->Q_old_outLB = 0; st->hHQ_core->Q_fer_samples = 0; } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } st->last_gain_syn_deemph = 0; } else { IF( st->hTcxDec ) { st->hTcxDec->conCngLevelBackgroundTrace_e = 0; st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi; st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi; st->hTcxDec->conLastFrameLevel = st->hTcxDec->LastFrameLevel_bfi_fx; } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } } } if ( tofix ) { st->Q_syn = 0; st->prev_Q_syn = st->Q_syn; st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi; st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi; st->mem_error = st->hBPF->pst_mem_deemp_err_fx; // u8bit to 16bit FOR(int l = 0; l < IGF_START_MX; l++) { st->hIGFDec->infoTCXNoise_evs[l] = (Word16)st->hIGFDec->infoTCXNoise[l]; } } } #endif // IVAS_FLOAT_FIXED lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO //#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO #define UNUSED_PARAM(...) (void)(__VA_ARGS__) Loading lib_com/prot_fx2.h +0 −18 Original line number Diff line number Diff line Loading @@ -62,18 +62,6 @@ /* conversion functions: */ // needed to be removed void stereo_tcx_dec_mode_switch_reconf_To_fixed( Decoder_State *st, Word16 tofix, Word16 last_element_mode ); void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( Decoder_State *st, Word16 tofix, Word16 last_element_mode, const FRAME_MODE frameMode); // Float to Word32 Word32 float_to_fix( float number, Word32 Q ); // Word32 to Float Loading Loading @@ -9358,12 +9346,6 @@ void ivas_bw_switching_pre_proc_fx( Word16 Q_audio ); #ifdef IVAS_FLOAT_FIXED /* float2fix and fix2float utilities (to be removed) */ void acelp_decoder_state_float2fix(Decoder_State *st); void acelp_decoder_state_fix2float(Decoder_State *st); #endif uint32_t mvl2s_r( const Word32 x[], /* i : input vector */ const Word16 q, Loading lib_dec/acelp_core_dec_ivas_fx.c +1 −15 Original line number Diff line number Diff line Loading @@ -1946,10 +1946,6 @@ ivas_error acelp_core_dec_ivas_fx( } } pop_wmops(); { if (save_hb_synth_fx16) { Copy_Scale_sig_32_16(save_hb_synth_fx, save_hb_synth_fx16, L_FRAME48k, 0); Loading @@ -1966,20 +1962,10 @@ ivas_error acelp_core_dec_ivas_fx( } pop_wmops(); return error; } void acelp_decoder_state_float2fix(Decoder_State *st/*, STEREO_CNG_DEC_HANDLE hStereoCng*/) { if(st->cldfbSynHB) floatToFixed_arrL(st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q10, st->cldfbSynHB->p_filter_length); } void acelp_decoder_state_fix2float(Decoder_State *st) { /* CLDFB */ if (st->cldfbSynHB) fixedToFloat_arrL(st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q10, st->cldfbSynHB->p_filter_length); } static void rescale_fdCngDec(HANDLE_FD_CNG_DEC hFdCngDec, Word16 Exp_diff) { Scale_sig32(hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, Exp_diff); Loading Loading
apps/renderer.c +9 −1 Original line number Diff line number Diff line Loading @@ -937,12 +937,20 @@ int main( fprintf( stderr, "Error in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef IVAS_FLOAT_FIXED Word32 var1 = (Word32)(args.syncMdDelay); IF((error = IVAS_REND_SetIsmMetadataDelay(hIvasRend, var1)) != IVAS_ERR_OK) { fprintf(stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string(error)); exit(-1); } #else if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading
lib_com/float_to_fix_ops.c +0 −150 Original line number Diff line number Diff line Loading @@ -297,153 +297,3 @@ Word16 L_get_q_buf1( float *ptr_flt, Word16 length ) } } #endif #ifdef IVAS_FLOAT_FIXED void stereo_tcx_dec_mode_switch_reconf_To_fixed( Decoder_State *st, Word16 tofix, Word16 last_element_mode) { bool reconf = ( st->bits_frame_nominal != st->last_bits_frame_nominal ) || ( st->bwidth != st->last_bwidth ) || ( st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) ) || ( st->idchan == 1 && st->element_mode == IVAS_CPE_MDCT && last_element_mode != IVAS_CPE_MDCT ); if ( reconf ) { Word16 Q_cldfbAna_cldfb_state = 0, Q_cldfbBPF_cldfb_state = 0, Q_cldfbSyn_cldfb_state = 0, Q_cldfbSynHB_cldfb_state = 0;//, if ( tofix ) { IF( st->hTcxDec ) { st->hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) ); st->output_frame_fx = st->hTcxDec->L_frameTCX; } IF( st->hHQ_core ) { //st->hHQ_core->Q_old_out = Q_factor_arr( st->hHQ_core->old_out, L_FRAME48k ); //st->hHQ_core->Q_old_outLB = Q_factor_arr( st->hHQ_core->old_outLB, L_FRAME32k ); st->hHQ_core->Q_fer_samples = 0; } IF( st->cldfbAna ) { Q_cldfbAna_cldfb_state = Q_factor_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_fx, Q_cldfbAna_cldfb_state, st->cldfbAna->cldfb_state_length ); } IF( st->cldfbBPF ) { Q_cldfbBPF_cldfb_state = Q_factor_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_fx, Q_cldfbBPF_cldfb_state, st->cldfbBPF->cldfb_state_length ); } IF( st->cldfbSyn ) { Q_cldfbSyn_cldfb_state = Q_factor_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_fx, Q_cldfbSyn_cldfb_state, st->cldfbSyn->cldfb_state_length ); } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } st->last_gain_syn_deemph = 0; } else { IF( st->cldfbAna ) { Q_cldfbAna_cldfb_state = Q_factor_arrL( st->cldfbAna->cldfb_state, st->cldfbAna->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbAna->cldfb_state_fx, st->cldfbAna->cldfb_state, Q_cldfbAna_cldfb_state, st->cldfbAna->cldfb_state_length ); } IF( st->cldfbBPF ) { Q_cldfbBPF_cldfb_state = Q_factor_arrL( st->cldfbBPF->cldfb_state, st->cldfbBPF->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbBPF->cldfb_state_fx, st->cldfbBPF->cldfb_state, Q_cldfbBPF_cldfb_state, st->cldfbBPF->cldfb_state_length ); } IF( st->cldfbSyn ) { Q_cldfbSyn_cldfb_state = Q_factor_arrL( st->cldfbSyn->cldfb_state, st->cldfbSyn->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->cldfb_state, Q_cldfbSyn_cldfb_state, st->cldfbSyn->cldfb_state_length ); } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } } } } void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( Decoder_State *st, Word16 tofix, Word16 last_element_mode, const FRAME_MODE frameMode) { UNUSED_PARAM(frameMode); bool reconf = ( st->bits_frame_nominal != st->last_bits_frame_nominal ) || ( st->bwidth != st->last_bwidth ) || ( st->last_core != TCX_20_CORE && st->last_core != TCX_10_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) ) || ( st->idchan == 1 && st->element_mode == IVAS_CPE_MDCT && last_element_mode != IVAS_CPE_MDCT ); if ( reconf ) { Word16 Q_cldfbSynHB_cldfb_state = 0;//, if ( tofix ) { IF( st->hTcxDec ) { st->hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) ); st->output_frame_fx = st->hTcxDec->L_frameTCX; } IF( st->hHQ_core ) { st->hHQ_core->Q_old_out = 0; st->hHQ_core->Q_old_outLB = 0; st->hHQ_core->Q_fer_samples = 0; } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; floatToFixed_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } st->last_gain_syn_deemph = 0; } else { IF( st->hTcxDec ) { st->hTcxDec->conCngLevelBackgroundTrace_e = 0; st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi; st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi; st->hTcxDec->conLastFrameLevel = st->hTcxDec->LastFrameLevel_bfi_fx; } IF( st->cldfbSynHB ) { Q_cldfbSynHB_cldfb_state = Q_factor_arrL( st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_length ) - 1; fixedToFloat_arrL( st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q_cldfbSynHB_cldfb_state, st->cldfbSynHB->cldfb_state_length ); } } } if ( tofix ) { st->Q_syn = 0; st->prev_Q_syn = st->Q_syn; st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi; st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi; st->mem_error = st->hBPF->pst_mem_deemp_err_fx; // u8bit to 16bit FOR(int l = 0; l < IGF_START_MX; l++) { st->hIGFDec->infoTCXNoise_evs[l] = (Word16)st->hIGFDec->infoTCXNoise[l]; } } } #endif // IVAS_FLOAT_FIXED
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO //#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO #define UNUSED_PARAM(...) (void)(__VA_ARGS__) Loading
lib_com/prot_fx2.h +0 −18 Original line number Diff line number Diff line Loading @@ -62,18 +62,6 @@ /* conversion functions: */ // needed to be removed void stereo_tcx_dec_mode_switch_reconf_To_fixed( Decoder_State *st, Word16 tofix, Word16 last_element_mode ); void stereo_tcx_dec_mode_switch_reconf_To_fixed_2( Decoder_State *st, Word16 tofix, Word16 last_element_mode, const FRAME_MODE frameMode); // Float to Word32 Word32 float_to_fix( float number, Word32 Q ); // Word32 to Float Loading Loading @@ -9358,12 +9346,6 @@ void ivas_bw_switching_pre_proc_fx( Word16 Q_audio ); #ifdef IVAS_FLOAT_FIXED /* float2fix and fix2float utilities (to be removed) */ void acelp_decoder_state_float2fix(Decoder_State *st); void acelp_decoder_state_fix2float(Decoder_State *st); #endif uint32_t mvl2s_r( const Word32 x[], /* i : input vector */ const Word16 q, Loading
lib_dec/acelp_core_dec_ivas_fx.c +1 −15 Original line number Diff line number Diff line Loading @@ -1946,10 +1946,6 @@ ivas_error acelp_core_dec_ivas_fx( } } pop_wmops(); { if (save_hb_synth_fx16) { Copy_Scale_sig_32_16(save_hb_synth_fx, save_hb_synth_fx16, L_FRAME48k, 0); Loading @@ -1966,20 +1962,10 @@ ivas_error acelp_core_dec_ivas_fx( } pop_wmops(); return error; } void acelp_decoder_state_float2fix(Decoder_State *st/*, STEREO_CNG_DEC_HANDLE hStereoCng*/) { if(st->cldfbSynHB) floatToFixed_arrL(st->cldfbSynHB->cldfb_state, st->cldfbSynHB->cldfb_state_fx, Q10, st->cldfbSynHB->p_filter_length); } void acelp_decoder_state_fix2float(Decoder_State *st) { /* CLDFB */ if (st->cldfbSynHB) fixedToFloat_arrL(st->cldfbSynHB->cldfb_state_fx, st->cldfbSynHB->cldfb_state, Q10, st->cldfbSynHB->p_filter_length); } static void rescale_fdCngDec(HANDLE_FD_CNG_DEC hFdCngDec, Word16 Exp_diff) { Scale_sig32(hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, Exp_diff); Loading