250 for (
i = 0;
i < 3;
i++) {
267 if (
code >= 0x400 &&
code != 0x7fff) {
268 for (
i = 2;
i >= 0;
i--) {
335 int object_type_id =
avio_r8(pb);
351 if (object_type_id == 0x69 || object_type_id == 0x6b)
353 if (!
len || (uint64_t)
len > (1<<30))
368 if (
cfg.object_type == 29 &&
cfg.sampling_index < 3)
370 else if (
cfg.ext_sample_rate)
374 switch (
cfg.object_type) {
387 "sample rate %d ext sample rate %d frame_length %d\n",
cfg.channels,
388 cfg.object_type,
cfg.ext_object_type,
389 cfg.sample_rate,
cfg.ext_sample_rate,
433 uint32_t layout_tag = 0;
436 if (channel_layout ==
layouts->channel_layout) {
437 layout_tag =
layouts->layout_tag;
void avio_wb32(AVIOContext *s, unsigned int val)
unsigned int avio_rb16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rb24(AVIOContext *s)
unsigned int avio_rb32(AVIOContext *s)
int avio_r8(AVIOContext *s)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
static CheckasmConfig cfg
#define AV_CH_LAYOUT_2POINT1
#define AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_5POINT0
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_7POINT1_WIDE
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT1
#define AV_CH_LAYOUT_4POINT1
#define AV_CH_LAYOUT_3POINT1
#define AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LOW_FREQUENCY
AVCodecID
Identify the syntax and semantics of the bitstream.
@ AV_CODEC_ID_DVD_SUBTITLE
@ AV_CODEC_ID_MPEG4SYSTEMS
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id)
int ff_mp4_read_descr_len(AVIOContext *pb)
int ff_mp4_read_dec_config_descr(void *logctx, AVStream *st, AVIOContext *pb)
int ff_mp4_read_descr(void *logctx, AVIOContext *pb, int *tag)
const AVCodecTag ff_mp4_obj_type[]
int ff_mov_iso639_to_lang(const char lang[4], int mp4)
static const char mov_mdhd_language_map[][4]
int ff_mov_lang_to_iso639(unsigned code, char to[4])
static const struct MP4TrackKindValueMapping dash_role_map[]
static const AVCodecTag mp4_audio_types[]
void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout)
const AVCodecTag ff_codec_movdata_tags[]
const struct MP4TrackKindMapping ff_mov_track_kind_table[]
static const MovChannelLayout mov_channel_layout[]
const AVCodecTag ff_codec_movsubtitle_tags[]
#define MP4DecSpecificDescrTag
#define MKTAG(a, b, c, d)
enum MovChannelLayoutTag * layouts
int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, int size, int sync_extension, void *logctx)
Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration.
@ AOT_ALS
Y Audio LosslesS.
@ AOT_AAC_LTP
Y Long Term Prediction.
@ AOT_ER_AAC_LD
N Error Resilient Low Delay.
@ AOT_ER_AAC_ELD
N Error Resilient Enhanced Low Delay.
@ AOT_ER_AAC_LC
N Error Resilient Low Complexity.
@ AOT_USAC
Y Unified Speech and Audio Coding.
@ AOT_AAC_SSR
N (code in SoC repo) Scalable Sample Rate.
@ AOT_AAC_LC
Y Low Complexity.
@ AOT_PS
N Parametric Stereo.
mpeg audio layer common tables.
const uint16_t ff_mpa_freq_tab[3]
#define FF_ARRAY_ELEMS(a)
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
int extradata_size
Size of the extradata content in bytes.
int frame_size
Audio frame size, if known.
AVChannelLayout ch_layout
The channel layout and number of channels.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
AVCodecParameters * codecpar
Codec parameters associated with this stream.