Commit 15a227df authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch '856-bug-in-tcx-ltp-synth-filtering' into 'main'

[non-BE][split-non-BE] Resolve "Bug in tcx ltp synth filtering"

See merge request !1158
parents e6b606ca 15587cef
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 */

lib_com/tcx_ltp.c

100644 → 100755
+10 −0
Original line number Diff line number Diff line
@@ -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;