Skip to content
Snippets Groups Projects
Commit aa8ff201 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

Clean up celt_pitch_xcorr() test code.

This will be removed shortly, but at least it should be correct
 before it goes.
Makes the code get used unconditionally (when uncommented), and
 actually frees the buffer it allocates (now using the libopus
 allocation functions).
parent d6eb9c46
No related branches found
No related tags found
No related merge requests found
......@@ -167,15 +167,17 @@ void
# define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \
((void)(arch),celt_pitch_xcorr_c(_x, _y, xcorr, len, max_pitch))
# endif
#else
#endif
/*#include "os_support.h"
/*static inline opus_val32 real_celt_pitch_xcorr(const opus_val16 *_x,
static inline opus_val32 real_celt_pitch_xcorr(const opus_val16 *_x,
const opus_val16 *_y,opus_val32 *xcorr,int len,int max_pitch,int arch){
opus_val32 *xcorr_tmp;
opus_val32 ret_tmp;
opus_val32 ret;
int i;
xcorr_tmp=(opus_val32 *)malloc(max_pitch*sizeof(*xcorr));
xcorr_tmp=(opus_val32 *)opus_alloc(max_pitch*sizeof(*xcorr));
ret_tmp=celt_pitch_xcorr_c(_x,_y,xcorr_tmp,len,max_pitch);
ret=celt_pitch_xcorr(_x,_y,xcorr,len,max_pitch,arch);
for(i=0;i<max_pitch;i++)if(xcorr[i]!=xcorr_tmp[i]){
......@@ -185,6 +187,7 @@ void
if(ret!=ret_tmp){
fprintf(stderr,"ret (0x%08X) != ret_tmp (0x%08X)\n",ret,ret_tmp);
}
opus_free(xcorr_tmp);
return ret_tmp;
}
......@@ -192,5 +195,3 @@ void
#define celt_pitch_xcorr real_celt_pitch_xcorr*/
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment