Commit 68cc59f2 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 1209: Assertion exit in BASOP encoder (stereo_dmx_evs)

Link #1209
parent 07ad5d7b
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -125,4 +125,5 @@
#define FIX_ISSUE_1186                          /* Ittiam: Fix for Issue 1186: Energy/scaling issue for ISM-1 at all bitrates */
#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)*/
#endif
+4 −0
Original line number Diff line number Diff line
@@ -451,7 +451,11 @@ void background_update_fx(
            tmp = L_shr( 2147 /* 0.000001 Q31 */, sub( 31, scale_sb_energy ) ); /* scale_sb_energy */
            FOR( i = 0; i < SNR_sb_num; i++ )
            {
#ifdef FIX_ISSUE_1209
                sb_bg_energy[i] = L_add_sat( MUL_F( sb_bg_energy[i], 32112 /* 0.98 Q15 */ ), tmp ); /* scale_sb_energy */
#else
                sb_bg_energy[i] = L_add( MUL_F( sb_bg_energy[i], 32112 /* 0.98 Q15 */ ), tmp ); /* scale_sb_energy */
#endif
                move32();
            }
        }
+5 −0
Original line number Diff line number Diff line
@@ -221,7 +221,12 @@ void spec_flatness_fx(
    SFM_Qtmp = sub( SFM_Qtmp, SPEC_AMP_Q );
    SFM_Qtmp = sub( SFM_Qtmp, SFM_Q );

#ifdef FIX_ISSUE_1209
    sSFM[1] = add_sat( mult( sSFM[1], 0x6ccc ), shr( mult( SFM, 0x1333 ), SFM_Qtmp ) );
#else
    sSFM[1] = add( mult( sSFM[1], 0x6ccc ), shr( mult( SFM, 0x1333 ), SFM_Qtmp ) );
#endif

    move16();
    /*sSFM3*/
    sums = 0;