diff --git a/lib_com/options.h b/lib_com/options.h index 7797d408dc5b72d6ca49fe9b8bf7ac0b43715165..1efaa714cc9369da4f42aef141057b0388fb56a3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -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 ################################## */ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c old mode 100755 new mode 100644 index b54fd07a1aa833f69909f02db840e28d6ba865ea..d115eb5a259a4e0e2d44e6bca37633827da3aa41 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -1051,7 +1051,18 @@ void stereo_dft_enc_compute_itd( } /*calculate total cohSNR for frame in dB*/ - cohSNR = 20 * log10f( mEr ); +#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 */ {