2016-03-07 03:12:32 +00:00
|
|
|
#ifndef _DSP_h
|
|
|
|
#define _DSP_h
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2016-03-15 04:55:57 +00:00
|
|
|
static inline int16_t DSPSampClamp(int32_t val)
|
2016-03-08 07:10:52 +00:00
|
|
|
{
|
|
|
|
if (val < -32768) val = -32768;
|
2016-03-09 20:03:35 +00:00
|
|
|
else if (val > 32767) val = 32767;
|
2016-03-08 07:10:52 +00:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
2016-03-07 03:12:32 +00:00
|
|
|
void DSPDecompressFrame(int16_t* out, const uint8_t* in,
|
|
|
|
const int16_t coefs[8][2], int16_t* prev1, int16_t* prev2,
|
|
|
|
unsigned lastSample);
|
|
|
|
void DSPDecompressFrameStereoStride(int16_t* out, const uint8_t* in,
|
|
|
|
const int16_t coefs[8][2], int16_t* prev1, int16_t* prev2,
|
|
|
|
unsigned lastSample);
|
|
|
|
void DSPDecompressFrameStereoDupe(int16_t* out, const uint8_t* in,
|
|
|
|
const int16_t coefs[8][2], int16_t* prev1, int16_t* prev2,
|
|
|
|
unsigned lastSample);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // _DSP_h
|