Commit 36609908 authored by vaclav's avatar vaclav
Browse files

fix

parent 8c6364b8
Loading
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -1574,6 +1574,15 @@ Word16 ApplyFdCng_ivas_fx(
                /* This sets the new CNG levels until a SID update overwrites it */
                Copy32( hFdCngDec->bandNoiseShape, cngNoiseLevel, sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand ) ); /* This sets the new CNG levels until a SID update overwrites it */ /*Q31 - hFdCngDec->bandNoiseShape_exp*/

#ifdef REMOVE_EVS_DUPLICATES
                IF( EQ_16( st->element_mode, EVS_MONO ) )
                {
                    *cngNoiseLevel_exp = hFdCngDec->bandNoiseShape_exp;
                    move16();
                }
                ELSE
#endif
                {
                    Word16 shift1 = L_norm_arr( cngNoiseLevel, sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand ) );
                    Word16 shift2 = L_norm_arr( cngNoiseLevel + sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand ), sub( FFTCLDFBLEN, sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand ) ) );
                    Word16 shift = s_max( sub( hFdCngDec->bandNoiseShape_exp, shift1 ), sub( *cngNoiseLevel_exp, shift2 ) );
@@ -1583,6 +1592,7 @@ Word16 ApplyFdCng_ivas_fx(

                    *cngNoiseLevel_exp = shift;
                    move16();
                }

                /*st->cngTDLevel = (float)sqrt( (sumFLOAT(cngNoiseLevel, hFdCngCom->stopFFTbin - hFdCngCom->startBand) / 2 * hFdCngCom->fftlen) / st->Mode2_L_frame);*/
                tmp_loop = sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand );