-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmpeg_2__3.h
More file actions
77 lines (65 loc) · 1.37 KB
/
mpeg_2__3.h
File metadata and controls
77 lines (65 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* mpeg_2__3.h
*
* Copyright 2014 Fernando Rodriguez (support@fernansoft.com).
* All rights reserved
*
*/
#ifndef MP3_MPEG_2__3_H
#define MP3_MPEG_2__3_H
typedef struct
{
unsigned short part2_3_length;
unsigned short big_values;
unsigned short global_gain;
unsigned short scalefac_compress;
unsigned int count1table_select:1;
unsigned int scalefac_scale:1;
unsigned int preflag:1;
unsigned int mixed_block:1;
unsigned char block_type;
unsigned char region0_count;
unsigned char region1_count;
unsigned char table_select[3];
unsigned char subblock_gain[3];
}
mp3_channel_t;
typedef struct
{
mp3_channel_t channel[2];
}
mp3_granule_t;
typedef struct
{
unsigned int main_data_begin;
unsigned int private_bits; /* 5 bits */
unsigned char scfsi[2];
mp3_granule_t granule[2];
}
mp3_sideinfo_t;
typedef struct mp3_sfbwidth_tables
{
unsigned char const *l;
unsigned char const *s;
unsigned char const *m;
}
mp3_sfbwidth_tables;
typedef struct mp3_sflen
{
unsigned char slen1;
unsigned char slen2;
}
mp3_sflen;
/*
// initialize layer 3 decoder
*/
void mp3_layer3_init(void);
/*
// initialize overlap buffer
*/
void mp3_layer3_overlap_init(void);
/*
// decode the next layer 3 frame on the bitstream
*/
unsigned int mp3_layer3_decode(unsigned int nch);
#endif