Mercurial > libavcodec.hg
comparison ac3tab.h @ 782:dd7d5748d064 libavcodec
preparing integration of new AC3 decoder
author | bellard |
---|---|
date | Mon, 28 Oct 2002 00:39:05 +0000 |
parents | 986e461dc072 |
children | b32afefe7d33 |
comparison
equal
deleted
inserted
replaced
781:6f5e87957bcb | 782:dd7d5748d064 |
---|---|
1 /* tables taken directly from AC3 spec */ | 1 /* tables taken directly from AC3 spec */ |
2 | 2 |
3 /* possible frequencies */ | |
4 const UINT16 ac3_freqs[3] = { 48000, 44100, 32000 }; | |
5 | |
3 /* possible bitrates */ | 6 /* possible bitrates */ |
4 static const UINT16 bitratetab[19] = { | 7 const UINT16 ac3_bitratetab[19] = { |
5 32, 40, 48, 56, 64, 80, 96, 112, 128, | 8 32, 40, 48, 56, 64, 80, 96, 112, 128, |
6 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 | 9 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 |
7 }; | 10 }; |
8 | 11 |
9 /* AC3 MDCT window */ | 12 /* AC3 MDCT window */ |
10 | 13 |
11 /* MDCT window */ | 14 /* MDCT window */ |
12 static const INT16 ac3_window[256]= { | 15 const INT16 ac3_window[256] = { |
13 4, 7, 12, 16, 21, 28, 34, 42, | 16 4, 7, 12, 16, 21, 28, 34, 42, |
14 51, 61, 72, 84, 97, 111, 127, 145, | 17 51, 61, 72, 84, 97, 111, 127, 145, |
15 164, 184, 207, 231, 257, 285, 315, 347, | 18 164, 184, 207, 231, 257, 285, 315, 347, |
16 382, 419, 458, 500, 544, 591, 641, 694, | 19 382, 419, 458, 500, 544, 591, 641, 694, |
17 750, 810, 872, 937, 1007, 1079, 1155, 1235, | 20 750, 810, 872, 937, 1007, 1079, 1155, 1235, |
136 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, | 139 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, |
137 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, | 140 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, |
138 15, 15, 15, 15, | 141 15, 15, 15, 15, |
139 }; | 142 }; |
140 | 143 |
141 static const UINT8 sdecaytab[4]={ | 144 const UINT8 sdecaytab[4]={ |
142 0x0f, 0x11, 0x13, 0x15, | 145 0x0f, 0x11, 0x13, 0x15, |
143 }; | 146 }; |
144 | 147 |
145 static const UINT8 fdecaytab[4]={ | 148 const UINT8 fdecaytab[4]={ |
146 0x3f, 0x53, 0x67, 0x7b, | 149 0x3f, 0x53, 0x67, 0x7b, |
147 }; | 150 }; |
148 | 151 |
149 static const UINT16 sgaintab[4]= { | 152 const UINT16 sgaintab[4]= { |
150 0x540, 0x4d8, 0x478, 0x410, | 153 0x540, 0x4d8, 0x478, 0x410, |
151 }; | 154 }; |
152 | 155 |
153 static const UINT16 dbkneetab[4]= { | 156 const UINT16 dbkneetab[4]= { |
154 0x000, 0x700, 0x900, 0xb00, | 157 0x000, 0x700, 0x900, 0xb00, |
155 }; | 158 }; |
156 | 159 |
157 static const UINT16 floortab[8]= { | 160 const UINT16 floortab[8]= { |
158 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, | 161 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, |
159 }; | 162 }; |
160 | 163 |
161 static const UINT16 fgaintab[8]= { | 164 const UINT16 fgaintab[8]= { |
162 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, | 165 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, |
163 }; | 166 }; |
164 | 167 |
165 static const UINT8 bndsz[50]={ | 168 static const UINT8 bndsz[50]={ |
166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |