r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / quicktime / ffmpeg / libavcodec / mpegaudio.h
blob072c41bda7fbee6d7b0613b0e2f6d26a5e81e1e5
1 /**
2 * @file mpegaudio.h
3 * mpeg audio declarations for both encoder and decoder.
4 */
6 /* max frame size, in samples */
7 #define MPA_FRAME_SIZE 1152
9 /* max compressed frame size */
10 #define MPA_MAX_CODED_FRAME_SIZE 1792
12 #define MPA_MAX_CHANNELS 2
14 #define SBLIMIT 32 /* number of subbands */
16 #define MPA_STEREO 0
17 #define MPA_JSTEREO 1
18 #define MPA_DUAL 2
19 #define MPA_MONO 3
21 /* header + layer + bitrate + freq + lsf/mpeg25 */
22 #define SAME_HEADER_MASK \
23 (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19))
25 int l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
26 int mpa_decode_header(AVCodecContext *avctx, uint32_t head);
28 extern const uint16_t mpa_bitrate_tab[2][3][15];
29 extern const uint16_t mpa_freq_tab[3];
30 extern const unsigned char *alloc_tables[5];
31 extern const double enwindow[512];
32 extern const int sblimit_table[5];
33 extern const int quant_steps[17];
34 extern const int quant_bits[17];
35 extern const int32_t mpa_enwindow[257];
37 /* fast header check for resync */
38 static inline int ff_mpa_check_header(uint32_t header){
39 /* header */
40 if ((header & 0xffe00000) != 0xffe00000)
41 return -1;
42 /* layer check */
43 if ((header & (3<<17)) == 0)
44 return -1;
45 /* bit rate */
46 if ((header & (0xf<<12)) == 0xf<<12)
47 return -1;
48 /* frequency */
49 if ((header & (3<<10)) == 3<<10)
50 return -1;
51 return 0;