Commit 9a3b899d authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT

parent af626296
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT   /* FhG: BASOP #2621: stereo_dft_generate_comfort_noise_fx flag_noisy_speech: compare (lp_speech-lp_noise) Q23 diff against 28.0 in Q23 (was vs integer 28 with q_lp_noise=0) */
#define FIX_ISSUE_2618_PLC_RES_ATT_SCALING              /* FhG: BASOP #2618: residual PLC burst attenuation, apply divide/Sqrt32 exponent so fac tracks exponent correctly */
#define NONBE_FIX2614_LP_CNG_ASSERT                     /* FhG: */
#define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH          /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */
+0 −8
Original line number Diff line number Diff line
@@ -775,10 +775,6 @@ static void stereo_dft_generate_comfort_noise_fx(
    }
    ELSE IF( ( chan == 0 ) )
    {
#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT
        Word16 q_lp_noise = 0; // st->hFdCngDec->q_lp_noise; // to be populated appropriately.
        move16();
#endif
        Word32 log_lp_noise = L_add( L_shl( lp_noise_e, Q25 ), BASOP_Util_Log2( L_add( lp_noise, DELTA_FX ) ) ); /* Q25 */
        // log10(x) is computed as log2(x) * log10(2)
        // log_lp_noise at this stage is in Q25. where as the structure value is in Q23
@@ -788,11 +784,7 @@ static void stereo_dft_generate_comfort_noise_fx(
        move32();
        st->lp_noise = st->hFdCngDec->lp_noise; /* Q23 */
        move32();
#ifdef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT
        st->hFdCngDec->hFdCngCom->flag_noisy_speech = extract_l( LT_32( L_sub( st->hFdCngDec->lp_speech, st->hFdCngDec->lp_noise ), 234881024 /* 28.0f in Q23 */ ) ); /* Q0 */
#else
        st->hFdCngDec->hFdCngCom->flag_noisy_speech = extract_l( LT_32( L_shr( L_sub( st->hFdCngDec->lp_speech, st->hFdCngDec->lp_noise ), q_lp_noise ), 28 ) ); /* Q0 */
#endif
        move16();
        st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = add( mult_r( 32440 /* 0.99 in Q15 */, st->hFdCngDec->hFdCngCom->likelihood_noisy_speech ),
                                                                 mult_r( 328 /* 0.01 in Q15 */, st->hFdCngDec->hFdCngCom->flag_noisy_speech ) ); /* Q15 */
+0 −6
Original line number Diff line number Diff line
@@ -137,14 +137,8 @@ typedef struct

    Word16 flag_dtx_mode;
    Word32 lp_speech; /* format: Q9.23 */
#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT
    Word16 q_lp_speech;
#endif

    Word32 lp_noise; /* format: Q9.23 */
#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT
    Word16 q_lp_noise;
#endif

    Word16 msPeriodogBuf[MSBUFLEN * NPART_SHAPING];