Commit 010c4af7 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Renderer cleanup changes, MSAN error fixes, MC reconfig cleanup

[x] Few MSAN errors for stereo fixed.
[x] renderMcToMasa(), renderInputMc(), renderActiveInputsMc() cleaned up
[x] MC dec config cleanup
parent 55c77f8d
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -683,7 +683,7 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2(
                st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi;
                st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi;
                st->hTcxDec->conLastFrameLevel = st->hTcxDec->LastFrameLevel_bfi_fx;
                st->hTcxDec->conLastFrameLevel_e = 0;
                //st->hTcxDec->conLastFrameLevel_e = 0;
            }

            IF( st->hHQ_core )
@@ -756,10 +756,10 @@ void stereo_tcx_dec_mode_switch_reconf_To_fixed_2(
        st->prev_Q_syn = st->Q_syn;
        //st->hTcxDec->conceal_eof_gain = (Word16) floatToFixed( st->hTcxDec->conceal_eof_gain_float, Q14 );
        //st->hTcxDec->conCngLevelBackgroundTrace = (Word16) floatToFixed( st->hTcxDec->CngLevelBackgroundTrace_bfi, Q15 - st->hTcxDec->conCngLevelBackgroundTrace_e );
        if ( st->hTcxDec->conNoiseLevelMemory_e[0] < 0 )
        {
            set16_fx( st->hTcxDec->conNoiseLevelMemory_e, 0, PLC_MIN_STAT_BUFF_SIZE );
        }
        //if ( st->hTcxDec->conNoiseLevelMemory_e[0] < 0 )
        //{
        //    set16_fx( st->hTcxDec->conNoiseLevelMemory_e, 0, PLC_MIN_STAT_BUFF_SIZE );
        //}
        st->hTcxDec->conNoiseLevelIndex = st->hTcxDec->NoiseLevelIndex_bfi;
        st->hTcxDec->conCurrLevelIndex = st->hTcxDec->CurrLevelIndex_bfi;
        if ( hTcxLtpDec->tcxltp )
+1 −1
Original line number Diff line number Diff line
@@ -1865,7 +1865,7 @@ void stereo_tcx_core_dec_fx(
    const FRAME_MODE frameMode,          /* i  : Decoder frame mode                 */
    Word16 *signal_out,                  /* o  : synthesis @internal_Fs, Q0             */
    Word16 *signal_outFB,                /* o  : synthesis @output_Fs, Q0               */
    Word32 pitch_buf[],                  /* o  : floating pitch for each subframe, Q6   */
    Word16 pitch_buf[],                  /* o  : floating pitch for each subframe, Q6   */
    const Word16 sba_dirac_stereo_flag,  /* i  : signal stereo output for SBA DirAC */
    STEREO_TD_DEC_DATA_HANDLE hStereoTD, /* i/o: TD stereo decoder handle           */
    const Word16 last_element_mode,      /* i  : last element mode                  */
+8 −1
Original line number Diff line number Diff line
@@ -73,7 +73,12 @@ void ivas_DetectTonalComponents_fx(
    {
        pScaledMdctSpectrum[i] = L_shl(lastMDCTSpectrum[i], 16); // Q31 - lastMDCTSpectrum_exp
    }

#ifdef MSAN_FIX
    FOR(Word16 i = 0; i < FDNS_NPTS; i++)
    {
      sns_int_scf_fx[i] = L_shl_sat(scaleFactors[i], 1 + scaleFactors_exp[i]); // Q16
    }
#endif
    IF (psychParamsCurrent == NULL)
    {
        nBands = FDNS_NPTS;
@@ -84,10 +89,12 @@ void ivas_DetectTonalComponents_fx(
    }
    ELSE
    {
#ifndef MSAN_FIX
        FOR(Word16 i = 0; i < FDNS_NPTS; i++)
        {
            sns_int_scf_fx[i] = L_shl(scaleFactors[i], 1 + scaleFactors_exp[i]); // Q16
        }
#endif
        q_pScaledMdctSpectrum = 31 - lastMDCTSpectrum_exp;
        sns_shape_spectrum_fx(pScaledMdctSpectrum, &q_pScaledMdctSpectrum, psychParamsCurrent, sns_int_scf_fx,16, nSamplesCore);
        q_pScaledMdctSpectrum = q_pScaledMdctSpectrum + 1;
+4 −0
Original line number Diff line number Diff line
@@ -1104,7 +1104,11 @@ ivas_error acelp_core_dec_ivas_fx(
        lsf_dec_bfi(MODE1, lsf_new_fx, st->lsf_old_fx, st->lsf_adaptive_mean_fx, NULL, st->mem_MA_fx, st->mem_AR_fx, st->stab_fac_fx, st->last_coder_type, st->L_frame, st->last_good, st->nbLostCmpt, 0, NULL, NULL, NULL, st->hGSCDec->Last_GSC_pit_band_idx, st->Opt_AMR_WB, 0, st->bwidth);

        FEC_lsf2lsp_interp(st, st->L_frame, Aq_fx, lsf_new_fx, lsp_new_fx);
#ifndef MSAN_FIX
        for (int nsf = 0; nsf < NB_SUBFR16k; nsf++) {
#else
        FOR(int nsf = 0; nsf < st->nb_subfr; nsf++) {
#endif
            Scale_sig(Aq_fx + (nsf * (M + 1)), M + 1, norm_s(Aq_fx[nsf * (M + 1)]) - Q2);
            Aq_fx[nsf * (M + 1)] = ONE_IN_Q12;
        }
+5 −0
Original line number Diff line number Diff line
@@ -2259,8 +2259,13 @@ static void smoothTransitionDtxToTcx_fx(
    Word16 i, filter_len;
    Word16 w, step, fade_in;
    Word32 mem;
#ifdef MSAN_FIX
    Word16 smoothing_input_buffer[2 * NS2SA( 48000, DELAY_CLDFB_NS ) + TRANSITION_SMOOTHING_LEN_48k] = { 0 };
    Word16 smoothing_out_buffer[2 * NS2SA( 48000, DELAY_CLDFB_NS ) + TRANSITION_SMOOTHING_LEN_48k] = { 0 };
#else
    Word16 smoothing_input_buffer[2 * NS2SA( 48000, DELAY_CLDFB_NS ) + TRANSITION_SMOOTHING_LEN_48k];
    Word16 smoothing_out_buffer[2 * NS2SA( 48000, DELAY_CLDFB_NS ) + TRANSITION_SMOOTHING_LEN_48k];
#endif

    filter_len = TRANSITION_SMOOTHING_LEN_16k;
    IF( EQ_16( output_frame, L_FRAME32k ) )
Loading