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

fix length of filtering for the decreasing gain filter of fucntion...

fix length of filtering for the decreasing gain filter of fucntion tcx_ltp_synth_filter_11_unequal_pitch()
parent aaaa9234
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,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*/


/* ##################### End NON-BE switches ########################### */

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;