diff --git a/lib_com/options.h b/lib_com/options.h index 3b1434ddd9480f7f801fbb1d4f74d302365c4b1f..7d55c32792597473ab667e8581f611d27fe724f9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,6 +172,7 @@ #define BE_FIX_832_ASAN_ERROR_EFAP_OSBA /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/ #define NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS /* VA: issue 820: Double precision arithmetic in combined formats */ #define NONBE_FIX_849_OMASA_BFI_CRASH /* VA: issue 849: fix OMASA 2TC and FEC crashes */ +#define NONBE_FIX_856_TCX_LTP_SYNTH_FILTER /* FhG: issue 856: correct filtering length for tcx-ltp synth filtering*/ #define NONBE_UNIFIED_DECODING_PATHS /* FhG: unify decoding paths */ #define NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING /* VA: issue 861: fix MASA 2TC crash when switching from MDCT stereo to TD/DFT stereo */ diff --git a/lib_com/tcx_ltp.c b/lib_com/tcx_ltp.c old mode 100644 new mode 100755 index 90dcb1515ce6bd332f2311975c12b9741ec828a2..502328348df6501804da45227e4e2949f9259f6a --- a/lib_com/tcx_ltp.c +++ b/lib_com/tcx_ltp.c @@ -740,7 +740,11 @@ static void tcx_ltp_synth_filter_11_unequal_pitch( gain = prev_gain; gain_step = -prev_gain / length; +#ifdef NONBE_FIX_856_TCX_LTP_SYNTH_FILTER + for ( j = 0; j < length; j++ ) +#else for ( j = 0; j < length + L; j++ ) +#endif { s = 0; s2 = 0; @@ -761,8 +765,14 @@ static void tcx_ltp_synth_filter_11_unequal_pitch( gain += gain_step; } +#ifdef NONBE_FIX_856_TCX_LTP_SYNTH_FILTER + mvr2r( out - L, temp_buf, length + L ); + mvr2r( in + length, temp_buf + length + L, L ); + temp_ptr = &temp_buf[0] + L; +#else mvr2r( out - MAX_TCX_LTP_FILTER_LEN, temp_buf, MAX_TRANSITION_LEN + 2 * MAX_TCX_LTP_FILTER_LEN ); temp_ptr = &temp_buf[0] + MAX_TCX_LTP_FILTER_LEN; +#endif m0 = temp_ptr; m1 = temp_ptr - 1;