Loading lib_enc/cod_tcx.c +16 −2 Original line number Diff line number Diff line Loading @@ -68,10 +68,16 @@ void HBAutocorrelation( move16(); L_tmp = L_msu0( 0, y[i], y[i] ); L_tmp = L_shr( L_tmp, 1 ); #ifdef BASOP_NOGLOB /* Only the sub can overflow is the current L_sum is negative and already close to MIN */ L_sum = L_add( L_shr( L_sub_o( L_sum, 1, &Overflow ), 1 ), 1 ); #else L_sum = L_add( L_shr( L_sub( L_sum, 1 ), 1 ), 1 ); #endif #ifdef BASOP_NOGLOB L_sum = L_sub_o( L_sum, L_tmp, &Overflow ); #else L_sum = L_sub( L_sum, L_tmp ); #endif FOR (j = add(i,1); j<len; j++) { L_tmp = L_msu0( 0, y[j], y[j] ); Loading @@ -89,9 +95,17 @@ void HBAutocorrelation( move16(); shift = add( shift, 1 ); L_tmp = L_shr( L_tmp, 1 ); #ifdef BASOP_NOGLOB /* Only the sub can overflow is the current L_sum is negative and already close to MIN */ L_sum = L_add( L_shr( L_sub_o( L_sum, 1, &Overflow ), 1 ), 1 ); #else L_sum = L_add( L_shr( L_sub( L_sum, 1 ), 1 ), 1 ); #endif } #ifdef BASOP_NOGLOB L_sum = L_sub_o( L_sum, L_tmp, &Overflow ); #else L_sum = L_sub( L_sum, L_tmp ); #endif } BREAK; } Loading Loading
lib_enc/cod_tcx.c +16 −2 Original line number Diff line number Diff line Loading @@ -68,10 +68,16 @@ void HBAutocorrelation( move16(); L_tmp = L_msu0( 0, y[i], y[i] ); L_tmp = L_shr( L_tmp, 1 ); #ifdef BASOP_NOGLOB /* Only the sub can overflow is the current L_sum is negative and already close to MIN */ L_sum = L_add( L_shr( L_sub_o( L_sum, 1, &Overflow ), 1 ), 1 ); #else L_sum = L_add( L_shr( L_sub( L_sum, 1 ), 1 ), 1 ); #endif #ifdef BASOP_NOGLOB L_sum = L_sub_o( L_sum, L_tmp, &Overflow ); #else L_sum = L_sub( L_sum, L_tmp ); #endif FOR (j = add(i,1); j<len; j++) { L_tmp = L_msu0( 0, y[j], y[j] ); Loading @@ -89,9 +95,17 @@ void HBAutocorrelation( move16(); shift = add( shift, 1 ); L_tmp = L_shr( L_tmp, 1 ); #ifdef BASOP_NOGLOB /* Only the sub can overflow is the current L_sum is negative and already close to MIN */ L_sum = L_add( L_shr( L_sub_o( L_sum, 1, &Overflow ), 1 ), 1 ); #else L_sum = L_add( L_shr( L_sub( L_sum, 1 ), 1 ), 1 ); #endif } #ifdef BASOP_NOGLOB L_sum = L_sub_o( L_sum, L_tmp, &Overflow ); #else L_sum = L_sub( L_sum, L_tmp ); #endif } BREAK; } Loading