diff options
Diffstat (limited to 'apps/codecs/libspeex/ltp_bfin.h')
-rw-r--r-- | apps/codecs/libspeex/ltp_bfin.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/apps/codecs/libspeex/ltp_bfin.h b/apps/codecs/libspeex/ltp_bfin.h index b530f85986..8d7225b017 100644 --- a/apps/codecs/libspeex/ltp_bfin.h +++ b/apps/codecs/libspeex/ltp_bfin.h | |||
@@ -220,7 +220,7 @@ void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *p | |||
220 | normalize16(energy, ener16, 180, end-start+1); | 220 | normalize16(energy, ener16, 180, end-start+1); |
221 | 221 | ||
222 | if (N == 1) { | 222 | if (N == 1) { |
223 | /* optimised asm to handle N==1 case */ | 223 | /* optimised asm to handle N==1 case */ |
224 | __asm__ __volatile__ | 224 | __asm__ __volatile__ |
225 | ( | 225 | ( |
226 | " I0 = %1;\n\t" /* I0: corr16[] */ | 226 | " I0 = %1;\n\t" /* I0: corr16[] */ |
@@ -253,35 +253,35 @@ void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *p | |||
253 | 253 | ||
254 | } | 254 | } |
255 | else { | 255 | else { |
256 | for (i=start;i<=end;i++) | 256 | for (i=start;i<=end;i++) |
257 | { | 257 | { |
258 | spx_word16_t tmp = MULT16_16_16(corr16[i-start],corr16[i-start]); | 258 | spx_word16_t tmp = MULT16_16_16(corr16[i-start],corr16[i-start]); |
259 | /* Instead of dividing the tmp by the energy, we multiply on the other side */ | 259 | /* Instead of dividing the tmp by the energy, we multiply on the other side */ |
260 | if (MULT16_16(tmp,best_ener[N-1])>MULT16_16(best_score[N-1],ADD16(1,ener16[i-start]))) | 260 | if (MULT16_16(tmp,best_ener[N-1])>MULT16_16(best_score[N-1],ADD16(1,ener16[i-start]))) |
261 | { | 261 | { |
262 | /* We can safely put it last and then check */ | 262 | /* We can safely put it last and then check */ |
263 | best_score[N-1]=tmp; | 263 | best_score[N-1]=tmp; |
264 | best_ener[N-1]=ener16[i-start]+1; | 264 | best_ener[N-1]=ener16[i-start]+1; |
265 | pitch[N-1]=i; | 265 | pitch[N-1]=i; |
266 | /* Check if it comes in front of others */ | 266 | /* Check if it comes in front of others */ |
267 | for (j=0;j<N-1;j++) | 267 | for (j=0;j<N-1;j++) |
268 | { | 268 | { |
269 | if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start]))) | 269 | if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start]))) |
270 | { | 270 | { |
271 | for (k=N-1;k>j;k--) | 271 | for (k=N-1;k>j;k--) |
272 | { | 272 | { |
273 | best_score[k]=best_score[k-1]; | 273 | best_score[k]=best_score[k-1]; |
274 | best_ener[k]=best_ener[k-1]; | 274 | best_ener[k]=best_ener[k-1]; |
275 | pitch[k]=pitch[k-1]; | 275 | pitch[k]=pitch[k-1]; |
276 | } | 276 | } |
277 | best_score[j]=tmp; | 277 | best_score[j]=tmp; |
278 | best_ener[j]=ener16[i-start]+1; | 278 | best_ener[j]=ener16[i-start]+1; |
279 | pitch[j]=i; | 279 | pitch[j]=i; |
280 | break; | 280 | break; |
281 | } | 281 | } |
282 | } | 282 | } |
283 | } | 283 | } |
284 | } | 284 | } |
285 | } | 285 | } |
286 | } | 286 | } |
287 | 287 | ||