Commit 045ab91e authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for +10dB crashes

parent 0db55faf
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -647,7 +647,6 @@ void ivas_analy_sp_fx_front(
            pt_bands += NB_BANDS;
            pt_fft += L_FFT;
        }
        LEtot = L_shr( LEtot, 2 ); // Q_new + Q_SCALE - 2
    }
    ELSE
    {
@@ -981,7 +980,7 @@ static void ivas_find_enr1(
    Word16 q_data,         /* i  : Q of fft result                                                  */
    Word32 band[],         /* o  : per band energy                           Q_new + QSCALE   */
    Word32 *ptE,           /* o  : per bin energy  for low frequencies       Q_new + QSCALE-2 */
    Word32 *LEtot,         /* o  : total energy                              Q_new + QSCALE   */
    Word32 *LEtot,         /* o  : total energy                              Q_new + QSCALE-2   */
    const Word16 min_band, /* i  : minimum critical band                     Q0                */
    const Word16 max_band, /* i  : maximum critical band                     Q0                */
    const Word16 Q_new,    /* i  : scaling factor                            Q0                */
@@ -1116,7 +1115,7 @@ static void ivas_find_enr1(
    move32();
    FOR( i = min_band; i <= max_band; i++ )
    {
        etot = L_add( etot, band[i] ); // Q_new + QSCALE
        etot = L_add( etot, L_shr( band[i], Q2 ) ); // Q_new + QSCALE - 2
    }
    *LEtot = etot;
    move32();