Commit 3c627a8d authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for ltv crashes, clean-up of float struct elements

parent 4ac8a3fd
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1306,7 +1306,7 @@ enum
#define MASA_COHERENCE_TOLERANCE                0.1f
#define MASA_COHERENCE_THRESHOLD                0.1f
#ifdef IVAS_FLOAT_FIXED
#define MASA_COHERENCE_TOLERANCE_FX             419430    // 0.1 in Q22
#define MASA_COHERENCE_TOLERANCE_FX             3277/*0.1 Q15*/
#define MASA_COHERENCE_THRESHOLD_FX             214748365 // 0.1 in Q31
#endif
#define MASA_RATIO_TOLERANCE                    0.1f
@@ -1314,7 +1314,7 @@ enum
#define MASA_ANGLE_TOLERANCE                    0.5f
#ifdef IVAS_FLOAT_FIXED
#define MASA_RATIO_THRESHOLD_FX                 214748365   // 0.1 in Q31
#define MASA_RATIO_TOLERANCE_FX                 419430      // 0.1 in Q22
#define MASA_RATIO_TOLERANCE_FX                 214748364/*0.1 Q30*/
#define MASA_ANGLE_TOLERANCE_FX                 ONE_IN_Q21  // 0.5 in Q22
#endif
#define MASA_LIMIT_NO_BANDS_SUR_COH             8
+4 −0
Original line number Diff line number Diff line
@@ -387,6 +387,10 @@ ivas_error ivas_FB_mixer_open_fx(
        move16();
    }

#ifdef MSAN_FIX
    set16_fx( hFbMixer->q_ppFilterbank_prior_input_fx, Q31, IVAS_MAX_FB_MIXER_IN_CH );
#endif

    test();
    IF( ( NE_16( fb_cfg->active_w_mixing, -1 ) ) && ( fb_cfg->num_out_chans > 0 ) )
    {
+1 −1
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ ivas_error acelp_core_enc(
        Copy( hLPDmem->mem_syn, hLPDmem->mem_syn1_fx, M );

        /* update old synthesis buffer - needed for ACELP internal sampling rate switching */
        Copy( syn_fx + add( st->L_frame, L_SYN_MEM ), hLPDmem->mem_syn_r, L_SYN_MEM );
        Copy( syn_fx + sub( st->L_frame, L_SYN_MEM ), hLPDmem->mem_syn_r, L_SYN_MEM );

        Scale_sig( syn_fx, L_FRAME16k, sub( st->Q_syn, Q_new - 1 ) );
        /* save and delay synthesis to be used by SWB BWE */
+1 −0
Original line number Diff line number Diff line
@@ -999,6 +999,7 @@ static void ivas_find_enr1(
    Word32 norm_val;

    norm_val = 131072 /* 4.0f / ( L_FFT * L_FFT ) in Q31 */;
    move32();

    ptR = &data[1];         /* first real */
    ptI = &data[L_FFT - 1]; /* first imaginary */
+4 −1
Original line number Diff line number Diff line
@@ -634,7 +634,9 @@ void enc_pit_exc_ivas_fx(
    test();
    Pitch_CT = GENERIC;
    move16();

#ifdef MSAN_FIX
    set16_fx( cn1, 0, PIT_EXC_L_SUBFR );
#endif
    IF( st_fx->GSC_IVAS_mode > 0 && ( st_fx->GSC_noisy_speech || GT_32( st_fx->core_brate, GSC_H_RATE_STG ) ) )
    {
        Local_BR = ACELP_8k00;
@@ -843,6 +845,7 @@ void enc_pit_exc_ivas_fx(
             * Innovation encoding
             *-----------------------------------------------------------------*/


            inov_encode_ivas_fx( st_fx, st_fx->core_brate, 0, st_fx->L_frame, st_fx->last_L_frame, GENERIC, st_fx->bwidth, 0, i_subfr, -1, p_Aq,
                                 gain_pit, cn, exc, h2, st_fx->hLPDmem->tilt_code, *pt_pitch, xn2, code, y2, &unbits_PI, 2 * L_SUBFR, shift, Q_new );
            // PMT("code to be validated")
Loading