Commit 0674e858 authored by Jan Kiene's avatar Jan Kiene
Browse files

fix index calculation - needs to be done after t0 update

parent cbef8154
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -245,10 +245,10 @@ static void tcx_ltp_pitch_search(
#ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH
        Word16 cor_idx_tmp;

        cor_idx_tmp = add( cor_idx, t0 );
#endif
        t0 = sub( t0, 1 );
#ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH
        cor_idx_tmp = add( cor_idx, t0 );
        cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres );
#else
        cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres );
@@ -496,10 +496,10 @@ static void tcx_ltp_pitch_search_ivas_fx(
#ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH
        Word16 cor_idx_tmp;

        cor_idx_tmp = add( cor_idx, t0 );
#endif
        t0 = sub( t0, 1 );
#ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH
        cor_idx_tmp = add( cor_idx, t0 );
        cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres );
#else
        cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres );