Commit b3e78067 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch...

Merge branch '1037-usan-left-shift-of-negative-value-for-evs-decoding-at-48kbps-in-waveadjust_fec_dec-c' into 'main'

fix usan error in waveforma adjustment - compute sign differently

See merge request !1498
parents 26ad912c d3e674ad
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST           /* FhG: address issue 1037 */
#define NON_BE_1055_RESET_LP_MEMORIES                   /* VA: issue 1055: Correctly reset LP filter MA and AR memories in bitrate switching */
#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM   /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */
#define NONBE_FIX_1056_ISM_RATE_SWITCH                  /* FhG: Fix #1056: fix TC buffer udpate on a ISM rate switch */	
@@ -175,7 +176,6 @@
#define NONBE_FIX_1054_NEGATIVE_LVQ_INDEX               /* Nokia: issue 1054: Input to decode_comb in deindex_lvq_SHB should be positive */
#define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG               /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */


/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+6 −0
Original line number Diff line number Diff line
@@ -742,7 +742,13 @@ void concealment_decode(
            /* sign randomization */
            for ( i = 0; i < hPlcInfo->L_frameTCX; i++ )
            {
#ifdef NON_BE_FIX_EVS_USAN_ERR_IN_WAVEADJUST
                int16_t rnd;
                rnd = own_random( seed );
                sign = ( rnd >= 0 ) - ( rnd < 0 );
#else
                sign = ( ( own_random( seed ) >> 15 ) << 1 ) + 1;
#endif
                invkoef[i] *= sign;
            }
        }