summary refs log tree commit diff
path: root/pkgs/development/libraries/a52dec/A00-a52-state-t-public.patch
blob: 5e0af3577d6a9912813bd2d2e8296ac1b5c86c60 (plain) (blame)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
diff -Naur a52dec.old/include/a52.h a52dec.new/include/a52.h
--- a52dec.old/include/a52.h	2002-01-28 06:37:54.000000000 +0100
+++ a52dec.new/include/a52.h	2012-07-16 14:13:35.000000000 +0200
@@ -30,7 +30,71 @@
 typedef double sample_t;
 #endif
 
-typedef struct a52_state_s a52_state_t;
+typedef struct {
+    uint8_t bai;              /* fine SNR offset, fast gain */
+    uint8_t deltbae;          /* delta bit allocation exists */
+    int8_t deltba[50];        /* per-band delta bit allocation */
+} ba_t;
+
+typedef struct {
+    uint8_t exp[256];         /* decoded channel exponents */
+    int8_t bap[256];          /* derived channel bit allocation */
+} expbap_t;
+
+typedef struct {
+    uint8_t fscod;            /* sample rate */
+    uint8_t halfrate;         /* halfrate factor */
+    uint8_t acmod;            /* coded channels */
+    uint8_t lfeon;            /* coded lfe channel */
+    sample_t clev;            /* centre channel mix level */
+    sample_t slev;            /* surround channels mix level */
+
+    int output;               /* type of output */
+    sample_t level;           /* output level */
+    sample_t bias;            /* output bias */
+
+    int dynrnge;              /* apply dynamic range */
+    sample_t dynrng;          /* dynamic range */
+    void * dynrngdata;        /* dynamic range callback funtion and data */
+    sample_t (* dynrngcall) (sample_t range, void * dynrngdata);
+
+    uint8_t chincpl;          /* channel coupled */
+    uint8_t phsflginu;        /* phase flags in use (stereo only) */
+    uint8_t cplstrtmant;      /* coupling channel start mantissa */
+    uint8_t cplendmant;       /* coupling channel end mantissa */
+    uint32_t cplbndstrc;      /* coupling band structure */
+    sample_t cplco[5][18];    /* coupling coordinates */
+
+    /* derived information */
+    uint8_t cplstrtbnd;       /* coupling start band (for bit allocation) */
+    uint8_t ncplbnd;          /* number of coupling bands */
+
+    uint8_t rematflg;         /* stereo rematrixing */
+
+    uint8_t endmant[5];       /* channel end mantissa */
+
+    uint16_t bai;             /* bit allocation information */
+
+    uint32_t * buffer_start;
+    uint16_t lfsr_state;      /* dither state */
+    uint32_t bits_left;
+    uint32_t current_word;
+
+    uint8_t csnroffst;        /* coarse SNR offset */
+    ba_t cplba;               /* coupling bit allocation parameters */
+    ba_t ba[5];               /* channel bit allocation parameters */
+    ba_t lfeba;               /* lfe bit allocation parameters */
+
+    uint8_t cplfleak;         /* coupling fast leak init */
+    uint8_t cplsleak;         /* coupling slow leak init */
+
+    expbap_t cpl_expbap;
+    expbap_t fbw_expbap[5];
+    expbap_t lfe_expbap;
+
+    sample_t * samples;
+    int downmixed;
+} a52_state_t;
 
 #define A52_CHANNEL 0
 #define A52_MONO 1
diff -Naur a52dec.old/liba52/a52_internal.h a52dec.new/liba52/a52_internal.h
--- a52dec.old/liba52/a52_internal.h	2002-07-28 03:52:06.000000000 +0200
+++ a52dec.new/liba52/a52_internal.h	2012-07-16 14:11:47.000000000 +0200
@@ -21,72 +21,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-typedef struct {
-    uint8_t bai;		/* fine SNR offset, fast gain */
-    uint8_t deltbae;		/* delta bit allocation exists */
-    int8_t deltba[50];		/* per-band delta bit allocation */
-} ba_t;
-
-typedef struct {
-    uint8_t exp[256];		/* decoded channel exponents */
-    int8_t bap[256];		/* derived channel bit allocation */
-} expbap_t;
-
-struct a52_state_s {
-    uint8_t fscod;		/* sample rate */
-    uint8_t halfrate;		/* halfrate factor */
-    uint8_t acmod;		/* coded channels */
-    uint8_t lfeon;		/* coded lfe channel */
-    sample_t clev;		/* centre channel mix level */
-    sample_t slev;		/* surround channels mix level */
-
-    int output;			/* type of output */
-    sample_t level;		/* output level */
-    sample_t bias;		/* output bias */
-
-    int dynrnge;		/* apply dynamic range */
-    sample_t dynrng;		/* dynamic range */
-    void * dynrngdata;		/* dynamic range callback funtion and data */
-    sample_t (* dynrngcall) (sample_t range, void * dynrngdata);
-
-    uint8_t chincpl;		/* channel coupled */
-    uint8_t phsflginu;		/* phase flags in use (stereo only) */
-    uint8_t cplstrtmant;	/* coupling channel start mantissa */
-    uint8_t cplendmant;		/* coupling channel end mantissa */
-    uint32_t cplbndstrc;	/* coupling band structure */
-    sample_t cplco[5][18];	/* coupling coordinates */
-
-    /* derived information */
-    uint8_t cplstrtbnd;		/* coupling start band (for bit allocation) */
-    uint8_t ncplbnd;		/* number of coupling bands */
-
-    uint8_t rematflg;		/* stereo rematrixing */
-
-    uint8_t endmant[5];		/* channel end mantissa */
-
-    uint16_t bai;		/* bit allocation information */
-
-    uint32_t * buffer_start;
-    uint16_t lfsr_state;	/* dither state */
-    uint32_t bits_left;
-    uint32_t current_word;
-
-    uint8_t csnroffst;		/* coarse SNR offset */
-    ba_t cplba;			/* coupling bit allocation parameters */
-    ba_t ba[5];			/* channel bit allocation parameters */
-    ba_t lfeba;			/* lfe bit allocation parameters */
-
-    uint8_t cplfleak;		/* coupling fast leak init */
-    uint8_t cplsleak;		/* coupling slow leak init */
-
-    expbap_t cpl_expbap;
-    expbap_t fbw_expbap[5];
-    expbap_t lfe_expbap;
-
-    sample_t * samples;
-    int downmixed;
-};
-
 #define LEVEL_PLUS6DB 2.0
 #define LEVEL_PLUS3DB 1.4142135623730951
 #define LEVEL_3DB 0.7071067811865476