diff --git a/lib_com/options.h b/lib_com/options.h index 343515281cd9ed3dabd01c37b43f2392338dee68..9c1d0b089096bf7b76300ce2948fab698089a5ed 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -108,4 +108,5 @@ #define FIX_1132_STACK_CORRUPTION /* Stack corruption issue due of extending index access*/ #define FIX_ISSUE_1092 /* Ittiam: Fix for Issue 1092: BASOP asserts in stereo fx encoder for selection test inputs*/ #define FIX_ISSUE_1148 +#define FIX_ISSUE_1147 /*Ittiam: Fix for issue 1147: Added saturation in DetectTnsFilt_fx.*/ #endif diff --git a/lib_enc/tns_base_enc_fx.c b/lib_enc/tns_base_enc_fx.c index 34d23e22b2029ab1328323629c595b6da894c843..2f1762e435858dfbee8bee8b2791c5a8ff47312d 100644 --- a/lib_enc/tns_base_enc_fx.c +++ b/lib_enc/tns_base_enc_fx.c @@ -230,7 +230,11 @@ Word16 DetectTnsFilt_fx( STnsConfig const *pTnsConfig, assert( n < (Word16) ( sizeof( tmpbuf ) / sizeof( Word16 ) ) ); FOR( i = 0; i < n; i++ ) { +#ifdef FIX_ISSUE_1147 + tmpbuf[i] = round_fx_sat( L_shl( pSpectrum[iStartLine + i], shift ) ); +#else tmpbuf[i] = round_fx( L_shl( pSpectrum[iStartLine + i], shift ) ); +#endif } FOR( lag = 0; lag <= pTnsConfig->maxOrder; lag++ )