Loading lib_com/tools_fx.c +17 −0 Original line number Diff line number Diff line Loading @@ -1220,6 +1220,7 @@ Word16 maximum_exp_fx( /* o : index of the maximum value const Word16 lvec_fx /* i : length of input vector */ ) { //#define TEST_HR Word16 j, ind; Word16 tmp, exp; ind = 0; Loading @@ -1235,10 +1236,26 @@ Word16 maximum_exp_fx( /* o : index of the maximum value scale = sub( norm_s( vec_fx[ind] ), 1 ); tmp = shl( vec_fx[ind], scale ); exp = sub( exp_vec[ind], scale ); #ifdef TEST_HR // Insert assert for testing purposes Word16 nzHR = 33; if ( vec_fx[0] != 0) nzHR = norm_s( vec_fx[0] ); #endif #endif FOR( j = 1; j < lvec_fx; j++ ) { #ifdef TEST_HR //Insert assert for testing purposes if ( vec_fx[j] != 0 ) { if ( nzHR != 33 ) assert( norm_s( vec_fx[j] ) == nzHR ); nzHR = norm_s( vec_fx[0] ); } #endif IF( LT_16( tmp, shr_sat( vec_fx[j], sub( exp, exp_vec[j] ) ) ) ) { ind = j; Loading Loading
lib_com/tools_fx.c +17 −0 Original line number Diff line number Diff line Loading @@ -1220,6 +1220,7 @@ Word16 maximum_exp_fx( /* o : index of the maximum value const Word16 lvec_fx /* i : length of input vector */ ) { //#define TEST_HR Word16 j, ind; Word16 tmp, exp; ind = 0; Loading @@ -1235,10 +1236,26 @@ Word16 maximum_exp_fx( /* o : index of the maximum value scale = sub( norm_s( vec_fx[ind] ), 1 ); tmp = shl( vec_fx[ind], scale ); exp = sub( exp_vec[ind], scale ); #ifdef TEST_HR // Insert assert for testing purposes Word16 nzHR = 33; if ( vec_fx[0] != 0) nzHR = norm_s( vec_fx[0] ); #endif #endif FOR( j = 1; j < lvec_fx; j++ ) { #ifdef TEST_HR //Insert assert for testing purposes if ( vec_fx[j] != 0 ) { if ( nzHR != 33 ) assert( norm_s( vec_fx[j] ) == nzHR ); nzHR = norm_s( vec_fx[0] ); } #endif IF( LT_16( tmp, shr_sat( vec_fx[j], sub( exp, exp_vec[j] ) ) ) ) { ind = j; Loading