37 int sample_rate_index, bitrate_index;
45 s->lsf = (
header & (1<<19)) ? 0 : 1;
52 s->layer = 4 - ((
header >> 17) & 3);
54 sample_rate_index = (
header >> 10) & 3;
56 sample_rate_index = 0;
58 sample_rate_index += 3 * (
s->lsf + mpeg25);
59 s->sample_rate_index = sample_rate_index;
60 s->error_protection = ((
header >> 16) & 1) ^ 1;
61 s->sample_rate = sample_rate;
63 bitrate_index = (
header >> 12) & 0xf;
64 padding = (
header >> 9) & 1;
67 s->mode_ext = (
header >> 4) & 3;
77 if (bitrate_index != 0) {
103 s->layer,
s->sample_rate,
s->bit_rate);
104 if (
s->nb_channels == 2) {
148 *sample_rate =
s->sample_rate;
150 *bit_rate =
s->bit_rate;
151 return s->frame_size;
static const uint8_t frame_size[4]
AVCodecID
Identify the syntax and semantics of the bitstream.
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Utility Preprocessor macros.
mpeg audio declarations for both encoder and decoder.
mpeg audio layer common tables.
#define MODE_EXT_MS_STEREO
FF_VISIBILITY_PUSH_HIDDEN const uint16_t ff_mpa_bitrate_tab[2][3][15]
#define MODE_EXT_I_STEREO
const uint16_t ff_mpa_freq_tab[3]
static const uint8_t header[24]
#define FF_ARRAY_ELEMS(a)