summaryrefslogtreecommitdiff
path: root/apps/codecs/libffmpegFLAC/decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libffmpegFLAC/decoder.h')
-rw-r--r--apps/codecs/libffmpegFLAC/decoder.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/codecs/libffmpegFLAC/decoder.h b/apps/codecs/libffmpegFLAC/decoder.h
new file mode 100644
index 0000000000..5d503adc78
--- /dev/null
+++ b/apps/codecs/libffmpegFLAC/decoder.h
@@ -0,0 +1,46 @@
1#ifndef _FLAC_DECODER_H
2#define _FLAC_DECODER_H
3
4#include "bitstream.h"
5
6#define MAX_CHANNELS 2 /* Maximum supported channels */
7#define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */
8#define MAX_FRAMESIZE 32768 /* Maxsize in bytes of one compressed frame */
9
10#define FLAC_OUTPUT_DEPTH 28 /* Provide samples left-shifted to 28-bits */
11
12enum decorrelation_type {
13 INDEPENDENT,
14 LEFT_SIDE,
15 RIGHT_SIDE,
16 MID_SIDE,
17};
18
19typedef struct FLACContext {
20 GetBitContext gb;
21
22 int min_blocksize, max_blocksize;
23 int min_framesize, max_framesize;
24 int samplerate, channels;
25 int blocksize/*, last_blocksize*/;
26 int bps, curr_bps;
27 unsigned long samplenumber;
28 unsigned long totalsamples;
29 enum decorrelation_type decorrelation;
30
31 int filesize;
32 int length;
33 int bitrate;
34 int metadatalength;
35
36 int bitstream_size;
37 int bitstream_index;
38} FLACContext;
39
40int flac_decode_frame(FLACContext *s,
41 int32_t* decoded0,
42 int32_t* decoded1,
43 uint8_t *buf, int buf_size,
44 void (*yield)(void));
45
46#endif