diff options
author | Dave Chapman <dave@dchapman.com> | 2005-09-22 20:46:58 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-09-22 20:46:58 +0000 |
commit | debbe9747eb6eecfd79aab648212b55220922eb6 (patch) | |
tree | dfd131c1505b32e5b8201bce212ea49fc3b3574d /apps/codecs/libalac/decomp.h | |
parent | 567718d8372564028ca85c8f5892c86659f14d4c (diff) | |
download | rockbox-debbe9747eb6eecfd79aab648212b55220922eb6.tar.gz rockbox-debbe9747eb6eecfd79aab648212b55220922eb6.zip |
First Rockbox version of ALAC decoder - porting to work in Rockbox environment and some simple (but significant) optimisations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7544 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libalac/decomp.h')
-rw-r--r-- | apps/codecs/libalac/decomp.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/apps/codecs/libalac/decomp.h b/apps/codecs/libalac/decomp.h index 23dbc52779..e6fa82d3d7 100644 --- a/apps/codecs/libalac/decomp.h +++ b/apps/codecs/libalac/decomp.h | |||
@@ -1,12 +1,34 @@ | |||
1 | #ifndef __ALAC__DECOMP_H | 1 | #ifndef __ALAC__DECOMP_H |
2 | #define __ALAC__DECOMP_H | 2 | #define __ALAC__DECOMP_H |
3 | 3 | ||
4 | typedef struct alac_file alac_file; | 4 | typedef struct |
5 | { | ||
6 | unsigned char *input_buffer; | ||
7 | int input_buffer_bitaccumulator; /* used so we can do arbitary | ||
8 | bit reads */ | ||
9 | int samplesize; | ||
10 | int numchannels; | ||
11 | int bytespersample; | ||
5 | 12 | ||
6 | alac_file *create_alac(int samplesize, int numchannels); | 13 | /* stuff from setinfo */ |
7 | void decode_frame(alac_file *alac, | 14 | uint32_t setinfo_max_samples_per_frame; /* 0x1000 = 4096 */ /* max samples per frame? */ |
15 | uint8_t setinfo_7a; /* 0x00 */ | ||
16 | uint8_t setinfo_sample_size; /* 0x10 */ | ||
17 | uint8_t setinfo_rice_historymult; /* 0x28 */ | ||
18 | uint8_t setinfo_rice_initialhistory; /* 0x0a */ | ||
19 | uint8_t setinfo_rice_kmodifier; /* 0x0e */ | ||
20 | uint8_t setinfo_7f; /* 0x02 */ | ||
21 | uint16_t setinfo_80; /* 0x00ff */ | ||
22 | uint32_t setinfo_82; /* 0x000020e7 */ | ||
23 | uint32_t setinfo_86; /* 0x00069fe4 */ | ||
24 | uint32_t setinfo_8a_rate; /* 0x0000ac44 */ | ||
25 | /* end setinfo stuff */ | ||
26 | } alac_file; | ||
27 | |||
28 | void create_alac(int samplesize, int numchannels, alac_file* alac); | ||
29 | int16_t* decode_frame(alac_file *alac, | ||
8 | unsigned char *inbuffer, | 30 | unsigned char *inbuffer, |
9 | void *outbuffer, int *outputsize); | 31 | int *outputsize); |
10 | void alac_set_info(alac_file *alac, char *inputbuffer); | 32 | void alac_set_info(alac_file *alac, char *inputbuffer); |
11 | 33 | ||
12 | #endif /* __ALAC__DECOMP_H */ | 34 | #endif /* __ALAC__DECOMP_H */ |