diff options
Diffstat (limited to 'apps/codecs/libspeex/cb_search.c')
-rw-r--r-- | apps/codecs/libspeex/cb_search.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/codecs/libspeex/cb_search.c b/apps/codecs/libspeex/cb_search.c index a3857c3afa..d280757e59 100644 --- a/apps/codecs/libspeex/cb_search.c +++ b/apps/codecs/libspeex/cb_search.c | |||
@@ -149,8 +149,7 @@ int update_target | |||
149 | ALLOC(e, nsf, spx_sig_t); | 149 | ALLOC(e, nsf, spx_sig_t); |
150 | 150 | ||
151 | /* FIXME: Do we still need to copy the target? */ | 151 | /* FIXME: Do we still need to copy the target? */ |
152 | for (i=0;i<nsf;i++) | 152 | SPEEX_COPY(t, target, nsf); |
153 | t[i]=target[i]; | ||
154 | 153 | ||
155 | compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); | 154 | compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); |
156 | 155 | ||
@@ -344,11 +343,10 @@ int update_target | |||
344 | oind[i]=itmp+(2*i+1)*nb_subvect; | 343 | oind[i]=itmp+(2*i+1)*nb_subvect; |
345 | } | 344 | } |
346 | 345 | ||
347 | for (i=0;i<nsf;i++) | 346 | SPEEX_COPY(t, target, nsf); |
348 | t[i]=target[i]; | ||
349 | 347 | ||
350 | for (j=0;j<N;j++) | 348 | for (j=0;j<N;j++) |
351 | speex_move(&ot[j][0], t, nsf*sizeof(spx_word16_t)); | 349 | SPEEX_COPY(&ot[j][0], t, nsf); |
352 | 350 | ||
353 | /* Pre-compute codewords response and energy */ | 351 | /* Pre-compute codewords response and energy */ |
354 | compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); | 352 | compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); |
@@ -597,8 +595,7 @@ int update_target | |||
597 | 595 | ||
598 | for (i=0;i<nsf;i++) | 596 | for (i=0;i<nsf;i++) |
599 | exc[i]+=SHL32(EXTEND32(tmp[i]),8); | 597 | exc[i]+=SHL32(EXTEND32(tmp[i]),8); |
600 | for (i=0;i<nsf;i++) | 598 | SPEEX_MEMSET(target, 0, nsf); |
601 | target[i]=0; | ||
602 | } | 599 | } |
603 | #endif /* SPEEX_DISABLE_ENCODER */ | 600 | #endif /* SPEEX_DISABLE_ENCODER */ |
604 | 601 | ||