![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
Implementation of TI Codec Type 1 (IMA ADPCM) encoding and decoding.
============================================================================
This module provides functions for encoding and decoding data using ADPCM encoding.
#include <stdint.h>
Go to the source code of this file.
Functions | |
uint8_t | Codec1_encodeSingle (int16_t audSample) |
This routine encodes one int16 sample with TI Codec Type 1. More... | |
int16_t | Codec1_decodeSingle (uint8_t nibble_4bits) |
This routine decode a 4-bit nibble sample to a uint16 PCM audio sample. More... | |
uint8_t | Codec1_encodeBuff (uint8_t *dst, int16_t *src, int16_t srcSize, int8_t *si, int16_t *pv) |
This routine encode a buffer with TI codec Type 1. More... | |
void | Codec1_decodeBuff (int16_t *dst, uint8_t *src, unsigned srcSize, int8_t *si, int16_t *pv) |
This routine decodes a buffer with TI codec Type 1. More... | |
uint8_t Codec1_encodeSingle | ( | int16_t | audSample | ) |
This routine encodes one int16 sample with TI Codec Type 1.
audSample | The audtion sample to encode |
int16_t Codec1_decodeSingle | ( | uint8_t | nibble_4bits | ) |
This routine decode a 4-bit nibble sample to a uint16 PCM audio sample.
nibble_4bits | A 4-bit nibble to decode |
uint8_t Codec1_encodeBuff | ( | uint8_t * | dst, |
int16_t * | src, | ||
int16_t | srcSize, | ||
int8_t * | si, | ||
int16_t * | pv | ||
) |
This routine encode a buffer with TI codec Type 1.
dst | Pointer to the buffer where encoding result will be written to |
src | Pointer to the buffer that should be encoded. Must be a multiple of 4 bytes |
srcSize | The number of samples (int16) in the src buffer. Must be a multiple of 2. |
si | Pointer to the current step index |
pv | Pointer to the current predicted-value |
void Codec1_decodeBuff | ( | int16_t * | dst, |
uint8_t * | src, | ||
unsigned | srcSize, | ||
int8_t * | si, | ||
int16_t * | pv | ||
) |
This routine decodes a buffer with TI codec Type 1.
dst | Pointer to the buffer where decoded result will be written to |
src | Pointer to the buffer that should be decoded. Must be a multiple of 4 bytes |
srcSize | Number of byte that will be generated by the encoder (4* (src buffer size in byte)) |
si | Pointer to the current step index |
pv | Pointer to the current predicted-value |