Commit a0c504c4 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1188_fix_1' into 'main'

Fix for 3GPP issue 1188: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from encode_magnitude_tcq_fx function

See merge request !1020
parents 0254b8b1 11f6cf5e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -126,4 +126,5 @@
#define FIX_ISSUE_1165                          /* Ittiam: Fix for issue 1165: Assertion in lpc2lsp_fx for OMASA LTV input */
#define FIX_ISSUE_1185                          /* Ittiam: Fix for issue 1185: Assertion in ivas_dirac_dec_binaural_internal_fx() for crash in decoder in fft30_with_cmplx_data()*/
#define FIX_ISSUE_1209                          /* Ittiam: Fix for issue 1209: Assertion exit in BASOP encoder (stereo_dmx_evs)*/
#define IVAS_ISSUE_1188_EVS_CRASH               /* Ittiam: Fix for issue 1188: Issue due to ASAN */
#endif
+8 −0
Original line number Diff line number Diff line
@@ -1983,7 +1983,11 @@ Word32 encode_magnitude_tcq_fx(
    move16();

    bits_fx = L_deposit_l( 0 );
#ifdef IVAS_ISSUE_1188_EVS_CRASH
    tcq_bits_fx = L_sub( table_logcum_fx[npulses], L_add( table_logcum_fx[nzpos], table_logcum_fx[npulses - ( nzpos - 1 )] ) );
#else
    tcq_bits_fx = L_sub( table_logcum_fx[npulses], L_add( table_logcum_fx[nzpos], table_logcum_fx[npulses - nzpos - 1] ) );
#endif
    *est_frame_bits_fx = L_add( *est_frame_bits_fx, tcq_bits_fx );
    move32();

@@ -2466,7 +2470,11 @@ void decode_mangitude_tcq_fx(
    move16();

    bits_fx = L_deposit_l( 0 );
#ifdef IVAS_ISSUE_1188_EVS_CRASH
    tcq_bits_fx = L_sub( table_logcum_fx[npulses], L_add( table_logcum_fx[nzpos], table_logcum_fx[npulses - ( nzpos - 1 )] ) );
#else
    tcq_bits_fx = L_sub( table_logcum_fx[npulses], L_add( table_logcum_fx[nzpos], table_logcum_fx[npulses - nzpos - 1] ) );
#endif

    IF( EQ_16( nzpos, npulses ) )
    {