3 #define SHN_OUTPUT_DEPTH 29 /* 28 bits + sign */
6 #define MAX_PRED_ORDER 16
7 #define MAX_NWRAP MAX_PRED_ORDER
10 /* NUM_DEC_LOOPS should be even number */
11 #define NUM_DEC_LOOPS 26
12 #define DEFAULT_BLOCK_SIZE 256
13 #define MAX_HEADER_SIZE DEFAULT_BLOCK_SIZE*4
14 #define MAX_BUFFER_SIZE 2*DEFAULT_BLOCK_SIZE*NUM_DEC_LOOPS
15 #define MAX_DECODE_SIZE ((DEFAULT_BLOCK_SIZE*NUM_DEC_LOOPS/2) + MAX_NWRAP)
16 #define MAX_OFFSET_SIZE MAX_NMEAN
23 #define FN_BLOCKSIZE 5
30 typedef struct ShortenContext
{
33 uint32_t totalsamples
;
47 int shorten_init(ShortenContext
* s
, uint8_t *buf
, int buf_size
);
48 int shorten_decode_frames(ShortenContext
*s
, int *nsamples
,
49 int32_t *decoded0
, int32_t *decoded1
,
50 int32_t *offset0
, int32_t *offset1
,
51 uint8_t *buf
, int buf_size
,
52 void (*yield
)(void)) ICODE_ATTR
;