Commit 14ac0c02 authored by Devansh Kandpal's avatar Devansh Kandpal
Browse files

Merge branch 'ivas-float-update' of...

Merge branch 'ivas-float-update' of https://forge.3gpp.org/rep/sa4/audio/ivas-basop into 1863_ref_port_fl1678
parents 163b2a2d 3423bb61
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@
#define NONBE_1214_PLC_LSF_MEMORY                       /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */
#define NONBE_1293_SR_HRTF                              /* VA: issue 1293: add support of external HRTFs in split rendering */
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */
#define FIX_1369_HQ_LR_OVERFLOW                         /* FhG: fix BASOP overflow in hq_lr_enc(), brings floating-point code inline with FX */

/* #################### End BASOP porting switches ############################ */

+8 −0
Original line number Diff line number Diff line
@@ -334,7 +334,15 @@ void hq_lr_enc(
        frac1 = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */
        L_tmp = Pow2( 30, frac1 );
        exp = sub( exp, 30 );
#ifdef FIX_1369_HQ_LR_OVERFLOW
#ifdef BASOP_NOGLOB
        Ep_fx[i] = L_shl_o( L_tmp, s_max( sub( exp, 6 ), -31 ), &Overflow ); /* Q -6 */
#else
        Ep_fx[i] = L_shl( L_tmp, s_max( sub( exp, 6 ), -31 ) ); /* Q -6 */
#endif
#else
        Ep_fx[i] = L_shl( L_tmp, sub( exp, 6 ) ); /* Q -6 */
#endif
        Ep[i] = (float) ( Ep_fx[i] / pow( 2.0, -6 ) );
    }