2399
|
1 #ifndef QUICKTIME_IMA4_H
|
|
2 #define QUICKTIME_IMA4_H
|
|
3
|
|
4 //#include "quicktime.h"
|
2420
|
5 //#include "inttypes.h"
|
|
6
|
|
7 /* Known by divine revelation */
|
|
8
|
|
9 #define IMA4_BLOCK_SIZE 0x22
|
|
10 #define IMA4_SAMPLES_PER_BLOCK 0x40
|
|
11
|
|
12 // in: out buffer, in buffer (IMA4_BLOCK_SIZE bytes), outbuf max size
|
|
13 // return: number of samples decoded
|
|
14 int ima4_decode_block(unsigned short *output, unsigned char *input, int maxlen);
|
|
15
|
|
16 #if 0
|
2399
|
17
|
|
18 typedef struct
|
|
19 {
|
|
20 /* During decoding the work_buffer contains the most recently read chunk. */
|
|
21 /* During encoding the work_buffer contains interlaced overflow samples */
|
|
22 /* from the last chunk written. */
|
|
23 int16_t *work_buffer;
|
|
24 unsigned char *read_buffer; /* Temporary buffer for drive reads. */
|
|
25
|
|
26 /* Starting information for all channels during encoding. */
|
|
27 int *last_samples, *last_indexes;
|
|
28 long chunk; /* Number of chunk in work buffer */
|
|
29 int buffer_channel; /* Channel of work buffer */
|
|
30
|
|
31 /* Number of samples in largest chunk read. */
|
|
32 /* Number of samples plus overflow in largest chunk write, interlaced. */
|
|
33 long work_size;
|
|
34 long work_overflow; /* Number of overflow samples from the last chunk written. */
|
|
35 long read_size; /* Size of read buffer. */
|
|
36 } quicktime_ima4_codec_t;
|
|
37
|
2420
|
38 #endif
|
2399
|
39
|
|
40 #endif
|