Commit 4b06cf14 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

MSAN fixes

parent 426271f5
Loading
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -447,6 +447,14 @@ int main(
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
            goto cleanup;
        }
#ifdef IVAS_FLOAT_FIXED
        FOR( Word16 i = 0; i < 4; i++ )
        {
            renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( 1u << 15 ) );
        }
#endif // IVAS_FLOAT_FIXED

        if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
+1 −1
Original line number Diff line number Diff line
@@ -1859,7 +1859,7 @@ typedef enum
#define ER_RADIUS_FX                           (1* ONE_IN_Q30) //Q2.30
#define ER_LIST_ORIGIN_X_FX                    (0)
#define ER_LIST_ORIGIN_Y_FX                    (0)
#define ER_LIST_HEIGHT_FX                      (1.6 *ONE_IN_Q22) //Q.22
#define ER_LIST_HEIGHT_FX                      (6710886) /* 1.6 in Q.22 */
#endif // IVAS_FLOAT_FIXED


+20 −0
Original line number Diff line number Diff line
@@ -406,6 +406,12 @@ static int16_t decode_indexes_ivas_fx(
        {
            // set_f(x_lvq, 0.0f, 2 * LATTICE_DIM);
            set_s( x_lvq, 0, 2 * LATTICE_DIM );
#ifdef MSAN_FIX
            scales_mslvq[0] = 0;
            move16();
            scales_mslvq[1] = 0;
            move16();
#endif
            index[i] = 0;
            return 1;
        }
@@ -430,6 +436,10 @@ static int16_t decode_indexes_ivas_fx(
        {
            // x_lvq[i] = 0.0;
            x_lvq[i] = 0;
#ifdef MSAN_FIX
            scales_mslvq[0] = 0;
            move16();
#endif
        }
    }
    else
@@ -439,6 +449,12 @@ static int16_t decode_indexes_ivas_fx(
            /* safety check in case of bit errors */
            // set_f(x_lvq, 0.0f, 2 * LATTICE_DIM);
            set_s( x_lvq, 0, 2 * LATTICE_DIM );
#ifdef MSAN_FIX
            scales_mslvq[0] = 0;
            move16();
            scales_mslvq[1] = 0;
            move16();
#endif
            return 1;
        }

@@ -476,6 +492,10 @@ static int16_t decode_indexes_ivas_fx(
            // x_lvq[i] = 0.0;
            x_lvq[i] = 0;
        }
#ifdef MSAN_FIX
        scales_mslvq[1] = 0;
        move16();
#endif
    }
    else
    {
+10 −0
Original line number Diff line number Diff line
@@ -1681,10 +1681,16 @@ ivas_error acelp_core_dec_ivas_fx(
                Scale_sig32(imagBuffer_fx[i], CLDFB_NO_CHANNELS_MAX, Q_real);
            }
            Scale_sig32(st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, (Q_real - 1) - Q10); //(Q_real - 1)
#ifndef MSAN_FIX
            Scale_sig32( synth_fx, L_FRAME48k, Q_real - 1);
#endif

            cldfbSynthesis_ivas_fx(realBuffer_fx, imagBuffer_fx, synth_fx, -1, st->cldfbSyn);
#ifdef MSAN_FIX
            Scale_sig32(synth_fx, output_frame, -(Q_real - 1));
#else
            Scale_sig32(synth_fx, L_FRAME48k, -(Q_real - 1));
#endif
            Scale_sig32(st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, Q10 - (Q_real - 1)); //Q10
        }

@@ -1879,7 +1885,11 @@ ivas_error acelp_core_dec_ivas_fx(
        if (save_hb_synth_fx16) {
            Copy_Scale_sig_32_16(save_hb_synth_fx, save_hb_synth_fx16, L_FRAME48k, 0);
        }
#ifdef MSAN_FIX
        Copy_Scale_sig_32_16(synth_fx, synth_fx16, output_frame, 0);
#else
        Copy_Scale_sig_32_16(synth_fx, synth_fx16, L_FRAME48k, 0);
#endif
        if (st->hFdCngDec)
        {
            st->hFdCngDec->hFdCngCom->A_cng[0] = ONE_IN_Q12;
+2 −0
Original line number Diff line number Diff line
@@ -956,7 +956,9 @@ void ivas_hq_core_dec_fx(
        index = tcx_cfg->tcx_last_overlap_mode;
        move16();

#ifndef MSAN_FIX
        Copy_Scale_sig_32_16( wtda_audio, wtda_audio_16, 2 * L_FRAME48k, -13 );
#endif

        /* LB synthesis */
        E_audio = 31 - Q_audio;
Loading