Loading lib_dec/TonalComponentDetection_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ void ivas_DetectTonalComponents_fx( { Word16 F0; Word16 thresholdModification[L_FRAME_MAX], lastMDCTSpect_exp; Word32 pScaledMdctSpectrum[L_FRAME_MAX]; Word32 pScaledMdctSpectrum[L_FRAME_MAX] = { 0 }; Word16 nBands; Word32 sns_int_scf_fx[FDNS_NPTS]; Word16 q_pScaledMdctSpectrum; Loading lib_dec/hf_synth_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,11 @@ void hf_synth_init_fx( hBWE_zero->seed2 = RANDOM_INITSEED; set16_fx(hBWE_zero->mem_hf_fx, 0, (L_FIR - 1)); set16_fx(hBWE_zero->mem_syn_hf_fx, 0, M); #ifdef MSAN_FIX set16_fx(hBWE_zero->mem_hp400_fx, 0, 6); #else set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); #endif // MSAN_FIX set16_fx(hBWE_zero->delay_syn_hf_fx, 0, NS2SA(16000, DELAY_CLDFB_NS)); set16_fx(hBWE_zero->mem_hp_interp_fx, 0, INTERP_3_1_MEM_LEN); Loading @@ -75,7 +79,11 @@ void hf_synth_reset_fx( set16_fx(hBWE_zero->mem_hf_fx, 0, (L_FIR - 1)); set16_fx(hBWE_zero->mem_syn_hf_fx, 0, M); set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); /* TBV -> mem_hp400_fx has a length of 6, but only 4 values initialized in EVS ??? */ #ifdef MSAN_FIX set16_fx(hBWE_zero->mem_hp400_fx, 0, 6); #else set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); #endif set16_fx(hBWE_zero->delay_syn_hf_fx, 0, NS2SA(16000, DELAY_CLDFB_NS)); set16_fx(hBWE_zero->mem_hp_interp_fx, 0, INTERP_3_1_MEM_LEN); Loading lib_dec/init_dec_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -321,6 +321,9 @@ ivas_error init_decoder_fx( move16(); /*1; Q15*/ st_fx->exc_pe_fx = 0; move16(); #ifdef MSAN_FIX st_fx->Q_stat_noise = 31; #endif // MSAN_FIX /*-----------------------------------------------------------------* * LD music post-filter *-----------------------------------------------------------------*/ Loading Loading @@ -1156,7 +1159,10 @@ ivas_error init_decoder_ivas_fx( move16(); /*1; Q15*/ st_fx->exc_pe_fx = 0; move16(); #ifdef MSAN_FIX st_fx->Q_stat_noise = 31; move16(); #endif st_fx->prev_coder_type = GENERIC; move16(); Loading Loading @@ -1344,6 +1350,8 @@ ivas_error init_decoder_ivas_fx( } st_fx->masa_sid_format = 0; move16(); st_fx->Q_stat_noise_ge = GE_SHIFT; move16(); /*-----------------------------------------------------------------* Loading lib_dec/ivas_core_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1117,7 +1117,7 @@ ivas_error ivas_core_dec( Scale_sig( tmp_buffer_fx, L_FRAME48k, Q11 - Q_white_exc ); stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q ); #ifdef MSAN_FIX IF( !( ( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && EQ_16( hCPE->nchan_out, 1 ) ) || ( NE_16( st->core, ACELP_CORE ) || EQ_16( st->extl, -1 ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( hCPE->hCoreCoder[0]->tdm_LRTD_flag, 0 ) ) ) ) ) IF( (GT_32( st->core_brate, SID_2k40 ) && ( !( ((EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && EQ_16( hCPE->nchan_out, 1 )) || (( NE_16( st->core, ACELP_CORE ) || EQ_16( st->extl, -1 )) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( hCPE->hCoreCoder[0]->tdm_LRTD_flag, 0 ) ) )) ) )) ) { Scale_sig32( hb_synth_32_fx[0], output_frame, sub( Q11, q ) ); Scale_sig32( hb_synth_32_fx[1], output_frame, sub( Q11, q ) ); Loading lib_dec/ivas_init_dec.c +11 −9 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ ivas_error ivas_dec_setup( //////////////// Cleanup changes: float to fixed ////////////////// Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; Word16 i, Q_cldfbSynDec = 21; Word16 i; Word16 old_ism_mode = ivas_omasa_ism_mode_select(st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->nchan_ism); Word16 new_ism_mode = ivas_omasa_ism_mode_select(st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_ism); Loading Loading @@ -354,8 +354,7 @@ ivas_error ivas_dec_setup( } IF(st_ivas->cldfbSynDec[0]) { Q_cldfbSynDec = s_min(Q_cldfbSynDec, Q_factor_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, sub(st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels))); floatToFixed_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q_cldfbSynDec, sub(st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels)); floatToFixed_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q11, sub(st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels)); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -402,7 +401,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -433,7 +432,7 @@ ivas_error ivas_dec_setup( //////////////// Cleanup changes: float to fixed ////////////////// Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; Word16 i, Q_cldfbSynDec = 21; Word16 i; Word16 old_ism_mode = ivas_omasa_ism_mode_select( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->nchan_ism ); Word16 new_ism_mode = ivas_omasa_ism_mode_select( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_ism ); Loading Loading @@ -462,8 +461,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { Q_cldfbSynDec = s_min( Q_cldfbSynDec, Q_factor_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ) ); floatToFixed_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); floatToFixed_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -510,7 +508,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -1497,6 +1495,10 @@ ivas_error ivas_init_decoder_fx( { return error; } #ifdef MSAN_FIX set_f( st_ivas->hSpar->hFbMixer->cldfb_cross_fade, 0.f, CLDFB_NO_COL_MAX ); set_s( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 0, CLDFB_NO_COL_MAX ); #endif IF ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) { Loading Loading @@ -2532,7 +2534,7 @@ ivas_error ivas_init_decoder_fx( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } IF( st_ivas->hSpar ) { Loading Loading
lib_dec/TonalComponentDetection_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ void ivas_DetectTonalComponents_fx( { Word16 F0; Word16 thresholdModification[L_FRAME_MAX], lastMDCTSpect_exp; Word32 pScaledMdctSpectrum[L_FRAME_MAX]; Word32 pScaledMdctSpectrum[L_FRAME_MAX] = { 0 }; Word16 nBands; Word32 sns_int_scf_fx[FDNS_NPTS]; Word16 q_pScaledMdctSpectrum; Loading
lib_dec/hf_synth_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,11 @@ void hf_synth_init_fx( hBWE_zero->seed2 = RANDOM_INITSEED; set16_fx(hBWE_zero->mem_hf_fx, 0, (L_FIR - 1)); set16_fx(hBWE_zero->mem_syn_hf_fx, 0, M); #ifdef MSAN_FIX set16_fx(hBWE_zero->mem_hp400_fx, 0, 6); #else set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); #endif // MSAN_FIX set16_fx(hBWE_zero->delay_syn_hf_fx, 0, NS2SA(16000, DELAY_CLDFB_NS)); set16_fx(hBWE_zero->mem_hp_interp_fx, 0, INTERP_3_1_MEM_LEN); Loading @@ -75,7 +79,11 @@ void hf_synth_reset_fx( set16_fx(hBWE_zero->mem_hf_fx, 0, (L_FIR - 1)); set16_fx(hBWE_zero->mem_syn_hf_fx, 0, M); set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); /* TBV -> mem_hp400_fx has a length of 6, but only 4 values initialized in EVS ??? */ #ifdef MSAN_FIX set16_fx(hBWE_zero->mem_hp400_fx, 0, 6); #else set16_fx(hBWE_zero->mem_hp400_fx, 0, 4); #endif set16_fx(hBWE_zero->delay_syn_hf_fx, 0, NS2SA(16000, DELAY_CLDFB_NS)); set16_fx(hBWE_zero->mem_hp_interp_fx, 0, INTERP_3_1_MEM_LEN); Loading
lib_dec/init_dec_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -321,6 +321,9 @@ ivas_error init_decoder_fx( move16(); /*1; Q15*/ st_fx->exc_pe_fx = 0; move16(); #ifdef MSAN_FIX st_fx->Q_stat_noise = 31; #endif // MSAN_FIX /*-----------------------------------------------------------------* * LD music post-filter *-----------------------------------------------------------------*/ Loading Loading @@ -1156,7 +1159,10 @@ ivas_error init_decoder_ivas_fx( move16(); /*1; Q15*/ st_fx->exc_pe_fx = 0; move16(); #ifdef MSAN_FIX st_fx->Q_stat_noise = 31; move16(); #endif st_fx->prev_coder_type = GENERIC; move16(); Loading Loading @@ -1344,6 +1350,8 @@ ivas_error init_decoder_ivas_fx( } st_fx->masa_sid_format = 0; move16(); st_fx->Q_stat_noise_ge = GE_SHIFT; move16(); /*-----------------------------------------------------------------* Loading
lib_dec/ivas_core_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1117,7 +1117,7 @@ ivas_error ivas_core_dec( Scale_sig( tmp_buffer_fx, L_FRAME48k, Q11 - Q_white_exc ); stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q ); #ifdef MSAN_FIX IF( !( ( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && EQ_16( hCPE->nchan_out, 1 ) ) || ( NE_16( st->core, ACELP_CORE ) || EQ_16( st->extl, -1 ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( hCPE->hCoreCoder[0]->tdm_LRTD_flag, 0 ) ) ) ) ) IF( (GT_32( st->core_brate, SID_2k40 ) && ( !( ((EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && EQ_16( hCPE->nchan_out, 1 )) || (( NE_16( st->core, ACELP_CORE ) || EQ_16( st->extl, -1 )) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( hCPE->hCoreCoder[0]->tdm_LRTD_flag, 0 ) ) )) ) )) ) { Scale_sig32( hb_synth_32_fx[0], output_frame, sub( Q11, q ) ); Scale_sig32( hb_synth_32_fx[1], output_frame, sub( Q11, q ) ); Loading
lib_dec/ivas_init_dec.c +11 −9 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ ivas_error ivas_dec_setup( //////////////// Cleanup changes: float to fixed ////////////////// Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; Word16 i, Q_cldfbSynDec = 21; Word16 i; Word16 old_ism_mode = ivas_omasa_ism_mode_select(st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->nchan_ism); Word16 new_ism_mode = ivas_omasa_ism_mode_select(st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_ism); Loading Loading @@ -354,8 +354,7 @@ ivas_error ivas_dec_setup( } IF(st_ivas->cldfbSynDec[0]) { Q_cldfbSynDec = s_min(Q_cldfbSynDec, Q_factor_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, sub(st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels))); floatToFixed_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q_cldfbSynDec, sub(st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels)); floatToFixed_arrL(st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q11, sub(st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels)); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -402,7 +401,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -433,7 +432,7 @@ ivas_error ivas_dec_setup( //////////////// Cleanup changes: float to fixed ////////////////// Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; Word16 i, Q_cldfbSynDec = 21; Word16 i; Word16 old_ism_mode = ivas_omasa_ism_mode_select( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->nchan_ism ); Word16 new_ism_mode = ivas_omasa_ism_mode_select( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_ism ); Loading Loading @@ -462,8 +461,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { Q_cldfbSynDec = s_min( Q_cldfbSynDec, Q_factor_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ) ); floatToFixed_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); floatToFixed_arrL( st_ivas->cldfbSynDec[0]->cldfb_state, st_ivas->cldfbSynDec[0]->cldfb_state_fx, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -510,7 +508,7 @@ ivas_error ivas_dec_setup( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q11, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } } //////////////////////////////////////////////////////////////// Loading Loading @@ -1497,6 +1495,10 @@ ivas_error ivas_init_decoder_fx( { return error; } #ifdef MSAN_FIX set_f( st_ivas->hSpar->hFbMixer->cldfb_cross_fade, 0.f, CLDFB_NO_COL_MAX ); set_s( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 0, CLDFB_NO_COL_MAX ); #endif IF ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) { Loading Loading @@ -2532,7 +2534,7 @@ ivas_error ivas_init_decoder_fx( } IF( st_ivas->cldfbSynDec[0] ) { fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbAnaDec[i]->p_filter_length, st_ivas->cldfbAnaDec[i]->no_channels ) ); fixedToFloat_arrL( st_ivas->cldfbSynDec[0]->cldfb_state_fx, st_ivas->cldfbSynDec[0]->cldfb_state, Q_cldfbSynDec, sub( st_ivas->cldfbSynDec[0]->p_filter_length, st_ivas->cldfbSynDec[0]->no_channels ) ); } IF( st_ivas->hSpar ) { Loading