Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DSPLIB - IMA/DVI ADPCM

All the IMA/DVI ADPCM functions implemented in the DSP advanced library.


Functions

void dsp_adpcm_ima_decode (S16 *out, void *in, int size, S16 *step_index, S16 *predicted_value)
 IMA/DVI ADPCM decoder. More...
 
S16 dsp_adpcm_ima_decode_nibble (S8 nibble, S16 *step_index, S16 *predicted_value)
 IMA/DVI ADPCM sample decoder. More...
 
void dsp_adpcm_ima_encode (void *out, S16 *in, int size, S16 *step_index, S16 *predicted_value)
 IMA/DVI ADPCM encoder. More...
 
S8 dsp_adpcm_ima_encode_nibble (S16 nibble, S16 *step_index, S16 *predicted_value)
 IMA/DVI ADPCM sample encoder. More...
 

void dsp_adpcm_ima_decode ( S16 out,
void *  in,
int  size,
S16 step_index,
S16 predicted_value 
)

IMA/DVI ADPCM decoder.

Parameters
outA 16-bit data vector that will contain the decoded data.
inA 4-bit data vector that contains the IMA/DVI ADPCM encoded data to decode.
sizeThe number of data to decode.
step_indexA pointer on a 16 bits data which contain the current step index of the ADPCM algorithm.
predicted_valueA pointer on a 16 bits data which contain the current predicted value of the ADPCM algorithm.

References ADPCM_IMA_DECODE_NIBBLE, predicted_value, and step_index.

S16 dsp_adpcm_ima_decode_nibble ( S8  nibble,
S16 step_index,
S16 predicted_value 
)

IMA/DVI ADPCM sample decoder.

Parameters
nibbleThe sample to decode. It must be a 4-bit data.
step_indexA pointer on a 16 bits data which contain the previous step index of the ADPCM algorithm.
predicted_valueA pointer on a 16 bits data which contain the previous predicted value of the ADPCM algorithm.
Returns
A 16-bit data that corresponds to the sample decoded.

References ADPCM_IMA_DECODE_NIBBLE.

Referenced by main().

void dsp_adpcm_ima_encode ( void *  out,
S16 in,
int  size,
S16 step_index,
S16 predicted_value 
)

IMA/DVI ADPCM encoder.

Parameters
outA 4-bit data vector that will contain the encoded data.
inA 16-bit data vector that contains the data to encode.
sizeThe number of data to encode.
step_indexA pointer on a 16 bits data which contain the current step index of the ADPCM algorithm.
predicted_valueA pointer on a 16 bits data which contain the current predicted value of the ADPCM algorithm.
Note
Can be performed "in-place".

References ADPCM_IMA_ENCODE_NIBBLE, predicted_value, and step_index.

S8 dsp_adpcm_ima_encode_nibble ( S16  nibble,
S16 step_index,
S16 predicted_value 
)

IMA/DVI ADPCM sample encoder.

Parameters
nibbleThe sample to encode.
step_indexA pointer on a 16 bits data which contain the current step index of the ADPCM algorithm.
predicted_valueA pointer on a 16 bits data which contain the current predicted value of the ADPCM algorithm.
Returns
A 4-bit data that corresponds to the sample encoded.

References ADPCM_IMA_ENCODE_NIBBLE.