Commit 298c2401 authored by Anjaneyulu Sana's avatar Anjaneyulu Sana
Browse files

Fix for LTV Multichannel 5_1 at 13.2 kbps 48kHz stream crash

parent 98e28d13
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ void pre_echo_att_ivas_fx(
            tmp = BASOP_Util_Divide3232_Scale( *Last_frame_ener_fx, etmp_fx, &tmp_e ); /* numerator Q = 2 * Q_new + 1;  denominator Q = 31 - tmp_e */
            tmp_e = add( tmp_e, sub( sub( 31, etmp_e ), add( shl( Q_new, 1 ), 1 ) ) ); /* tmp_e = tmp_e + (31 - tmp_e) - (2 * Q_new + 1) */
            tmp = Sqrt16( tmp, &tmp_e );
            ratio_fx = shr( tmp, sub( 2, tmp_e ) ); /* Q13 */
            ratio_fx = shr_sat( tmp, sub( 2, tmp_e ) ); /* Q13 */

            /* Pre-echo atttenuation should never increase the energy */
            ratio_fx = s_min( ratio_fx, 8192 /* 1 in Q13 */ ); /* Q13 */