Commit 8805c2b7 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fix-791' into 'ivas-float-update'

Port fix for issue 791 from floating point codec

See merge request !423
parents 95760f09 49cd6b43
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@
#define NON_BE_1055_RESET_LP_MEMORIES                   /* VA: issue 1055: Correctly reset LP filter MA and AR memories in bitrate switching */
#define NONBE_FIX_1069_SVD_TUNING                       /* FhG: issue 1069: tune SVD constants */
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO           /* Eri: Issue 1010: Division by zero in Stereo CNG */
#define NONBE_MDCT_ST_DTX_SKIP_DEWHITENING_OF_NOISE_SHAPES_ON_SID_FRAMES /* FhG: issue 1133: skip de-whitening of bg noise shape after frameloss period if the first good frame is an SID */
#define NONBE_MDCT_ST_PLC_DO_NOT_SCALE_OLD_OUT_IF_FIRST_GOOD_IS_SID /* FhG: issue 1133: in TCX PLC, don't scale hHQ_core->old_out after applying fade to noise in burst frame error */
/* #################### End FIXES switches ############################ */

#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
+12 −0
Original line number Diff line number Diff line
@@ -183,7 +183,12 @@ ivas_error ivas_core_dec(
            st->flagGuidedAcelp = 0;
        }

#ifdef NONBE_MDCT_ST_PLC_DO_NOT_SCALE_OLD_OUT_IF_FIRST_GOOD_IS_SID
        if ( !st->bfi && st->prev_bfi && st->total_brate > SID_2k40 && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL )
#else

        if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL )
#endif
        {
            v_multc( st->hHQ_core->old_out, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX );
            v_multc( st->hHQ_core->old_outLB, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_outLB, st->L_frame );
@@ -396,10 +401,17 @@ ivas_error ivas_core_dec(
        {
            updateBuffersForDmxMdctStereo( hCPE, output_frame, output, synth );
        }
#ifdef NONBE_MDCT_ST_DTX_SKIP_DEWHITENING_OF_NOISE_SHAPES_ON_SID_FRAMES

        /* On first good active frame after frameloss undo the whitening of the bg noise shape */
        if ( sts[0]->core_brate > SID_2k40 && sts[0]->bfi == 0 && sts[0]->prev_bfi == 1 )
        {
#else

        if ( sts[0]->bfi == 0 && sts[0]->prev_bfi == 1 )
        {
            /* On first good frame after frameloss undo the whitening of the bg noise shape */
#endif
            for ( n = 0; n < n_channels; ++n )
            {
                if ( sts[n]->last_core_bfi != ACELP_CORE )