Commit 6d95be08 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 1798: Decoder crash for ParamUpmix MC 7.1+4 at 160kbps...

Fix for 3GPP issue 1798: Decoder crash for ParamUpmix MC 7.1+4 at 160kbps decoding to mono at 16/32kHz in ivas_ls_setup_conversion_process_mdct_fx()

Link #1798
parent 5d9ebfb5
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -695,6 +695,11 @@ void ivas_ls_setup_conversion_process_mdct_fx(
    Word16 guard_1 = shr( add( find_guarded_bits_fx( tmp_sub ), 1 ), 1 );
    Word16 guard_2 = find_guarded_bits_fx( L_mult0( outChannels, inChannels ) );
    q_output = sub( q_output, s_max( guard_1, guard_2 ) );
    /* Increase the guard bit by 1 to avoid overflow only if q_output is positive */
    if ( q_output > 0 )
    {
        q_output = sub( q_output, 1 );
    }

    FOR( i = 0; i < inChannels; ++i )
    {