Commit 4538b4ff authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fix_ltv_crash_shift_operation' into 'main'

Fix for shift overflow issue observed with LTV test.

See merge request !55
parents 4cf0c7ba 48ead1c1
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -360,7 +360,11 @@ void tcxFormantEnhancement_with_shift(
    {
        fac = add( fac0, mult( d, extract_l( L_mult0( j, inv_int[n] ) ) ) );
        BASOP_SATURATE_WARNING_OFF_EVS;
#ifdef BASOP_NOGLOB
        xn_buf[l + j] = s_min( xn_one, shl_o( mult( xn_buf[l + j], fac ), fac_e, &Overflow ));
#else
        xn_buf[l + j] = s_min( xn_one, shl( mult( xn_buf[l + j], fac ), fac_e ) );
#endif
        move16();
        BASOP_SATURATE_WARNING_ON_EVS;
    }
+4 −0
Original line number Diff line number Diff line
@@ -2841,7 +2841,11 @@ void decoder_tcx_invQ_fx(
                FOR( i = 0; i < noiseFillingSize; ++i )
                {
                    tmp32 = L_shr( x[i], 31 - *x_e );
#ifdef BASOP_NOGLOB
                    *nf_seed = add_o( *nf_seed, (Word16) abs( tmp32 ) * i * 2, &Overflow );
#else
                    *nf_seed = add( *nf_seed, (Word16) abs( tmp32 ) * i * 2 );
#endif
                }
            }
            ELSE /* TCX-only: context based arithmetic coder */