Commit 3f49cea3 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'basop-issue-812-fix-nan-cohsnr' into 'main'

fix reported issue where cohSNR is nan because of negative mEr

See merge request !1694
parents bad3bfaa e77eaa36
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@
#define FIX_1123_FASTCONV_16BIT_ROM                     /* FhG: issue 1123: update FastConv ROM tables and scripts to generate 16 bit tables instead of float */
#define FIX_1123_PARAMBIN_16BIT_ROM                     /* FhG,Nok: issue 1123: update ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
#endif
#define FIX_BASOP_812_NAN_COHSNR                        /* FhG: BASOP issue 812: fix nan values in sparse frames for cohSNR value in ITD estimation*/

/* #################### End BE switches ################################## */

+12 −1
Original line number Diff line number Diff line
@@ -1051,7 +1051,18 @@ void stereo_dft_enc_compute_itd(
    }

    /*calculate total cohSNR for frame in dB*/
#ifdef FIX_BASOP_812_NAN_COHSNR
    if ( mEr > 1.0f )
    {
#endif
        cohSNR = 20 * log10f( mEr );
#ifdef FIX_BASOP_812_NAN_COHSNR
    }
    else
    {
        cohSNR = 0;
    }
#endif

    /* collect UNCLR classifier parameters */
    {