Of interest to anybody using CVSD: I have tried using gr-cvsd-vocoder code on a microcontroller.
The primary problem seen was related to the decoder: mask=cvsd_pow(2,7-bit_count); // Pull off the corresponding bit input_bit = input_byte & mask; // Update the bit counter bit_count++; // Update runner with the next input bit // Runner is a shift-register; shift left, add on newest output bit d_runner = (d_runner<<1) | ((unsigned int) input_bit);
where the input_bit is not always being added to the LSbit of d_runner. Should be: //d_runner = (d_runner<<1) | ((unsigned int) input_bit); d_runner <<= 1; if (input_bit) d_runner |= 1; // always add it to the LSbit
Additionally, because I was using on microcontroller, the pow() function is to slow. Since powers of 2 is needed, pow can be replaced by leftshifting 1.
Also, the d_step_decay effect was being rounded out.
The source-code is gr-cvsd-vocoder put into C language using ascii-text files for input and output.
Separate decoder and encoder executables.
I had used a Makefile for MingGW on windows, however a linux makefile could be easily made if necessary.
[Prev in Thread]
Current Thread
[Next in Thread]
[Discuss-gnuradio] gr-cvsd-vocoder bugfix,
wayne roberts<=