3 * mpeg audio declarations for both encoder and decoder.
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 */
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
){
40 if ((header
& 0xffe00000) != 0xffe00000)
43 if ((header
& (3<<17)) == 0)
46 if ((header
& (0xf<<12)) == 0xf<<12)
49 if ((header
& (3<<10)) == 3<<10)