27#ifndef AVCODEC_MPEGAUDIODECHEADER_H
28#define AVCODEC_MPEGAUDIODECHEADER_H
37#define MP3_MASK 0xFFFE0CCF
39#define FF_MPEGAUDIO_LEGACY_DECODE_HEADER (LIBAVCODEC_VERSION_MAJOR < 64)
41#if FF_MPEGAUDIO_LEGACY_DECODE_HEADER
42#define MPA_DECODE_HEADER \
44 int error_protection; \
47 int sample_rate_index; \
54typedef struct MPADecodeHeader {
61int avpriv_mpegaudio_decode_header(MPADecodeHeader *
s, uint32_t
header);
111 if ((
header & 0xffe00000) != 0xffe00000)
114 if ((
header & (3<<19)) == 1<<19)
117 if ((
header & (3<<17)) == 0)
120 if ((
header & (0xf<<12)) == 0xf<<12)
123 if ((
header & (3<<10)) == 3<<10)
130 int version =
s->sample_rate_index < 6 ? 3 -
s->sample_rate_index / 3 : 0;
132 return 0xffeU << 20 |
134 (4 -
s->layer) << 17 |
135 !
s->error_protection << 16 |
136 s->bitrate_index << 12 |
137 s->sample_rate_index % 3 << 10 |
139 s->private_bit << 8 |
static const uint8_t frame_size[4]
AVCodecID
Identify the syntax and semantics of the bitstream.
Libavcodec version macros.
Macro definitions for various function/variable attributes.
static const uint8_t header[24]