/* create_interleaver.c David Rowe May 27 2012 Creates an interleaver for Codec 2. */ #include #include #include int main(int argc, char * argv[]) { int m,i, src_bit, dest_bit; FILE *f; int *interleaver; if (argc != 3) { printf("usage: %s InterleaverBits InterleaverFile\n", argv[0]); exit(1); } m = atoi(argv[1]); f = fopen(argv[2],"wt"); assert(f != NULL); interleaver = (int*)malloc(m*sizeof(int)); assert(interleaver != NULL); for(i=0; i