Fixed issue simonyiszk/csdr#15 by fixing allocating size in bytes instead of size in amount of taps

This commit is contained in:
Rico van Genugten 2016-10-06 11:28:34 +00:00
parent 7ba726af5b
commit 12d7db8b49

2
csdr.c
View file

@ -940,7 +940,7 @@ int main(int argc, char *argv[])
padded_taps_length = taps_length+(NEON_ALIGNMENT/4)-1 - ((taps_length+(NEON_ALIGNMENT/4)-1)%(NEON_ALIGNMENT/4));
fprintf(stderr,"padded_taps_length = %d\n", padded_taps_length);
taps = (float*) (float*)malloc(padded_taps_length+NEON_ALIGNMENT);
taps = (float*) (float*)malloc((padded_taps_length+NEON_ALIGNMENT)*sizeof(float));
fprintf(stderr,"taps = %x\n", taps);
taps = (float*)((((unsigned)taps)+NEON_ALIGNMENT-1) & ~(NEON_ALIGNMENT-1));
fprintf(stderr,"taps = %x\n", taps);