BT-CVSD¶
Introduction¶
Bluetooth Continuous Variable Slope Delta Modulation (BT-CVSD) is a voice coding method. It uses delta modulation with a variable step size a special case of adaptive delta modulation. The input to the CVSD encoder is 64000 samples per second linear PCM (16 bits per sample). This design is according to the Bluetooth Core Specification v 5.1.
Source Code¶
BT-CVSD codec is developed according to Bluetooth Core Specification v 5.1, 21 January 2019.
Upsampling and Downsampling¶
8x-upsampler and 8x-downsampler are parts of the test application and provided as examples only. FIR filter parameters coefficients are designed per Bluetooth Core 5.1 spectral mask requirements and provided as an example also. Test application processes 8 kHz sampled signal at the input and provides 8 kHz samples signal as output.
Multi-instance and Reentrance¶
BT-CVSD codec implementation is reentrant and supports multi-instance. The codec doesn't use any DSP registers directly. It is independent of DSP modes like saturation, guard bits and accumulator shift. If CVSD codec process frame is interrupted e.g. by interrupt it is the responsibility of ISR to restore DSP specific registers.
Codec-Specific Build Options¶
The LTO_BUILD
and REMAPITU_T
options are not available for this codec.
Codec-Specific Run-time Options¶
Use the following command to run the BT-CVSD codec in MetaWare Debugger (refer 2 in References):
mdb -cl -run -nsim -tcf=<default TCF from /rules/common_hw_config.mk> \
ARC_CVSD_CODEC_app.elf [-u| -h] [-F <frame_len>] [-enc|-dec|-encdec] \
-i <input_file.inp> -o <output_file.cod>
The following table lists the parameters that can be passed to this codec:
Option | Description |
---|---|
<input_file.inp> |
Specifies the input *.inp file |
<output_file.cod> |
Specifies the output *.cod file |
-u/-h |
Print help message |
-F <frame_len> |
Number of samples, default: 256 |
-enc |
Run encoder only |
-dec |
Run decoder only |
-encdec |
Run encoder and decoder |
Examples¶
Note
The encoder output and the decoder input for this codec may have a format different from Bluetooth format.
The following command encodes the test_vector_8000.raw
stream with a frame
length of 2056 samples:
mdb -cl -run -nsim -tcf=em9d_voice_audio ARC_CVSD_CODEC_app.elf -enc -F 2056 \
-i "../testvectors/inp/test_vector_8000.raw" -o "../testvectors/test_vector_64000.cod"
The following command decodes the test_vector_64000.cod
stream with a frame
length 4096 samples:
mdb -cl -run -nsim -tcf=em9d_voice_audio ARC_CVSD_CODEC_app.elf -dec -F 4096 \
-i "../testvectors/ref/test_vector_64000.cod" -o "../testvectors/test_vector_8000.out"
The following command encodes and decodes the test_vector_8000.raw
to
test_vector_8000.out
stream with a frame length of 4096 samples: