diff options
author | Sean Bartell <wingedtachikoma@gmail.com> | 2011-06-25 21:32:25 -0400 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-04-25 22:13:20 +0200 |
commit | f40bfc9267b13b54e6379dfe7539447662879d24 (patch) | |
tree | 9b20069d5e62809ff434061ad730096836f916f2 /lib/rbcodec/codecs/libalac/decomp.h | |
parent | a0009907de7a0107d49040d8a180f140e2eff299 (diff) | |
download | rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.tar.gz rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.zip |
Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/codecs/libalac/decomp.h')
-rw-r--r-- | lib/rbcodec/codecs/libalac/decomp.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libalac/decomp.h b/lib/rbcodec/codecs/libalac/decomp.h new file mode 100644 index 0000000000..21dabd86b0 --- /dev/null +++ b/lib/rbcodec/codecs/libalac/decomp.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __ALAC__DECOMP_H | ||
2 | #define __ALAC__DECOMP_H | ||
3 | |||
4 | #ifndef ICODE_ATTR_ALAC | ||
5 | #define ICODE_ATTR_ALAC ICODE_ATTR | ||
6 | #endif | ||
7 | |||
8 | /* Always output samples shifted to 28 bits + sign*/ | ||
9 | #define ALAC_OUTPUT_DEPTH 29 | ||
10 | #define SCALE16 (ALAC_OUTPUT_DEPTH - 16) | ||
11 | #define SCALE24 (ALAC_OUTPUT_DEPTH - 24) | ||
12 | #define ALAC_MAX_CHANNELS 2 | ||
13 | #define ALAC_BLOCKSIZE 4096 /* Number of samples per channel per block */ | ||
14 | |||
15 | typedef struct | ||
16 | { | ||
17 | unsigned char *input_buffer; | ||
18 | int input_buffer_bitaccumulator; /* used so we can do arbitary | ||
19 | bit reads */ | ||
20 | |||
21 | /* rockbox: not used | ||
22 | int samplesize; | ||
23 | int numchannels; | ||
24 | int bytespersample; */ | ||
25 | |||
26 | int bytes_consumed; | ||
27 | |||
28 | /* stuff from setinfo */ | ||
29 | uint32_t setinfo_max_samples_per_frame; /* 0x1000 = 4096 */ /* max samples per frame? */ | ||
30 | uint8_t setinfo_7a; /* 0x00 */ | ||
31 | uint8_t setinfo_sample_size; /* 0x10 */ | ||
32 | uint8_t setinfo_rice_historymult; /* 0x28 */ | ||
33 | uint8_t setinfo_rice_initialhistory; /* 0x0a */ | ||
34 | uint8_t setinfo_rice_kmodifier; /* 0x0e */ | ||
35 | uint8_t setinfo_7f; /* 0x02 */ | ||
36 | uint16_t setinfo_80; /* 0x00ff */ | ||
37 | uint32_t setinfo_82; /* 0x000020e7 */ | ||
38 | uint32_t setinfo_86; /* 0x00069fe4 */ | ||
39 | uint32_t setinfo_8a_rate; /* 0x0000ac44 */ | ||
40 | /* end setinfo stuff */ | ||
41 | } alac_file; | ||
42 | |||
43 | /* rockbox: not used | ||
44 | void create_alac(int samplesize, int numchannels, alac_file* alac) | ||
45 | ICODE_ATTR_ALAC; */ | ||
46 | |||
47 | int alac_decode_frame(alac_file *alac, | ||
48 | unsigned char *inbuffer, | ||
49 | int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE], | ||
50 | void (*yield)(void)) ICODE_ATTR_ALAC; | ||
51 | void alac_set_info(alac_file *alac, char *inputbuffer) ICODE_ATTR_ALAC; | ||
52 | |||
53 | #endif /* __ALAC__DECOMP_H */ | ||
54 | |||