Loading lib_enc/tcx_ltp_enc_fx.c +18 −32 Original line number Diff line number Diff line Loading @@ -88,10 +88,9 @@ static void tcx_ltp_pitch_search( Word16 pitmax, Word16 pitres ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 i, t, t0, t1, cor_idx, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #else Word16 i, t, t0, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_ini, cor_idx; #endif Word32 cor_max, cor[256], *pt_cor, temp; Word16 wsp2[L_FRAME_PLUS + PIT_MAX_MAX + L_INTERPOL1]; Loading Loading @@ -208,7 +207,7 @@ static void tcx_ltp_pitch_search( *-----------------------------------------------------------------*/ #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = sub( L_INTERPOL1, t0_min ); cor_idx_ini = sub( L_INTERPOL1, t0_min ); #else pt_cor = cor + sub( L_INTERPOL1, t0_min ); #endif Loading @@ -228,28 +227,22 @@ static void tcx_ltp_pitch_search( IF( EQ_16( t0, t0_min ) ) /* Limit case */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; cor_idx_tmp = add( cor_idx, t0 ); cor_idx = add( cor_idx_ini, t0 ); #endif fraction = 0; move16(); #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif } ELSE /* Process negative fractions */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; #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 ); cor_idx = add( cor_idx_ini, t0 ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif Loading @@ -257,7 +250,7 @@ static void tcx_ltp_pitch_search( FOR( i = fraction + step; i < pitres; i += step ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH temp = interpolate_corr( &cor[cor_idx_tmp], i, pitres ); temp = interpolate_corr( &cor[cor_idx], i, pitres ); #else temp = interpolate_corr( &pt_cor[t0], i, pitres ); #endif Loading @@ -272,7 +265,7 @@ static void tcx_ltp_pitch_search( } #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = add( t1, cor_idx ); cor_idx = add( cor_idx_ini, t1 ); #endif FOR( i = 0; i < pitres; i += step ) /* Process positive fractions */ { Loading Loading @@ -327,10 +320,9 @@ static void tcx_ltp_pitch_search_ivas_fx( const Word16 check_border_case, Word16 *border_case ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 i, t, t0, cor_idx, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #else Word16 i, t, t0, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_ini, cor_idx; #endif Word32 cor_max, cor[256], *pt_cor, temp; Word16 wsp2[L_FRAME_PLUS + PIT_MAX_MAX + L_INTERPOL1]; Loading Loading @@ -458,7 +450,7 @@ static void tcx_ltp_pitch_search_ivas_fx( * the interpolated normalized correlation. *-----------------------------------------------------------------*/ #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = sub( L_INTERPOL1, t0_min ); cor_idx_ini = sub( L_INTERPOL1, t0_min ); #else pt_cor = cor + sub( L_INTERPOL1, t0_min ); Loading @@ -479,28 +471,22 @@ static void tcx_ltp_pitch_search_ivas_fx( IF( EQ_16( t0, t0_min ) ) /* Limit case */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; cor_idx_tmp = add( cor_idx, t0 ); cor_idx = add( cor_idx_ini, t0 ); #endif fraction = 0; move16(); #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif } ELSE /* Process negative fractions */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; #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 ); cor_idx = add( cor_idx_ini, t0 ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif Loading @@ -508,7 +494,7 @@ static void tcx_ltp_pitch_search_ivas_fx( FOR( i = fraction + step; i < pitres; i += step ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH temp = interpolate_corr( &cor[cor_idx_tmp], i, pitres ); temp = interpolate_corr( &cor[cor_idx], i, pitres ); #else temp = interpolate_corr( &pt_cor[t0], i, pitres ); #endif Loading @@ -523,7 +509,7 @@ static void tcx_ltp_pitch_search_ivas_fx( } #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = add( t1, cor_idx ); cor_idx = add( cor_idx_ini, t1 ); #endif FOR( i = 0; i < pitres; i += step ) /* Process positive fractions */ { Loading Loading
lib_enc/tcx_ltp_enc_fx.c +18 −32 Original line number Diff line number Diff line Loading @@ -88,10 +88,9 @@ static void tcx_ltp_pitch_search( Word16 pitmax, Word16 pitres ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 i, t, t0, t1, cor_idx, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #else Word16 i, t, t0, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_ini, cor_idx; #endif Word32 cor_max, cor[256], *pt_cor, temp; Word16 wsp2[L_FRAME_PLUS + PIT_MAX_MAX + L_INTERPOL1]; Loading Loading @@ -208,7 +207,7 @@ static void tcx_ltp_pitch_search( *-----------------------------------------------------------------*/ #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = sub( L_INTERPOL1, t0_min ); cor_idx_ini = sub( L_INTERPOL1, t0_min ); #else pt_cor = cor + sub( L_INTERPOL1, t0_min ); #endif Loading @@ -228,28 +227,22 @@ static void tcx_ltp_pitch_search( IF( EQ_16( t0, t0_min ) ) /* Limit case */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; cor_idx_tmp = add( cor_idx, t0 ); cor_idx = add( cor_idx_ini, t0 ); #endif fraction = 0; move16(); #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif } ELSE /* Process negative fractions */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; #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 ); cor_idx = add( cor_idx_ini, t0 ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif Loading @@ -257,7 +250,7 @@ static void tcx_ltp_pitch_search( FOR( i = fraction + step; i < pitres; i += step ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH temp = interpolate_corr( &cor[cor_idx_tmp], i, pitres ); temp = interpolate_corr( &cor[cor_idx], i, pitres ); #else temp = interpolate_corr( &pt_cor[t0], i, pitres ); #endif Loading @@ -272,7 +265,7 @@ static void tcx_ltp_pitch_search( } #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = add( t1, cor_idx ); cor_idx = add( cor_idx_ini, t1 ); #endif FOR( i = 0; i < pitres; i += step ) /* Process positive fractions */ { Loading Loading @@ -327,10 +320,9 @@ static void tcx_ltp_pitch_search_ivas_fx( const Word16 check_border_case, Word16 *border_case ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 i, t, t0, cor_idx, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #else Word16 i, t, t0, t1, step, fraction, t0_min, t0_max, t_min, t_max, delta, temp_m, temp_e, s, s_wsp; #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_ini, cor_idx; #endif Word32 cor_max, cor[256], *pt_cor, temp; Word16 wsp2[L_FRAME_PLUS + PIT_MAX_MAX + L_INTERPOL1]; Loading Loading @@ -458,7 +450,7 @@ static void tcx_ltp_pitch_search_ivas_fx( * the interpolated normalized correlation. *-----------------------------------------------------------------*/ #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = sub( L_INTERPOL1, t0_min ); cor_idx_ini = sub( L_INTERPOL1, t0_min ); #else pt_cor = cor + sub( L_INTERPOL1, t0_min ); Loading @@ -479,28 +471,22 @@ static void tcx_ltp_pitch_search_ivas_fx( IF( EQ_16( t0, t0_min ) ) /* Limit case */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; cor_idx_tmp = add( cor_idx, t0 ); cor_idx = add( cor_idx_ini, t0 ); #endif fraction = 0; move16(); #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_max = interpolate_corr( &cor[cor_idx_tmp], fraction, pitres ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif } ELSE /* Process negative fractions */ { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH Word16 cor_idx_tmp; #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 ); cor_idx = add( cor_idx_ini, t0 ); cor_max = interpolate_corr( &cor[cor_idx], fraction, pitres ); #else cor_max = interpolate_corr( &pt_cor[t0], fraction, pitres ); #endif Loading @@ -508,7 +494,7 @@ static void tcx_ltp_pitch_search_ivas_fx( FOR( i = fraction + step; i < pitres; i += step ) { #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH temp = interpolate_corr( &cor[cor_idx_tmp], i, pitres ); temp = interpolate_corr( &cor[cor_idx], i, pitres ); #else temp = interpolate_corr( &pt_cor[t0], i, pitres ); #endif Loading @@ -523,7 +509,7 @@ static void tcx_ltp_pitch_search_ivas_fx( } #ifdef FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH cor_idx = add( t1, cor_idx ); cor_idx = add( cor_idx_ini, t1 ); #endif FOR( i = 0; i < pitres; i += step ) /* Process positive fractions */ { Loading