28 #include "libavutil/channel_layout.h"
29 #include "libavcodec/avcodec.h"
432 static const struct {
465 return bitmap < 0x40000 ? bitmap : 0;
468 channels = tag & 0xFFFF;
471 layout_map = mov_ch_layout_map[channels];
474 for (i = 0; layout_map[i].
tag != 0; i++) {
475 if (layout_map[i].tag == tag)
478 return layout_map[i].
layout;
486 return 1
U << (label - 1);
495 uint64_t channel_layout,
518 layout_map = mov_ch_layout_map[channels];
521 for (i = 0; layouts[i] != 0; i++) {
522 if ((layouts[i] & 0xFFFF) != channels)
524 for (j = 0; layout_map[j].
tag != 0; j++) {
525 if (layout_map[j].tag == layouts[i] &&
526 layout_map[j].
layout == channel_layout)
529 if (layout_map[j].tag)
536 if (tag == 0 && channel_layout > 0 && channel_layout < 0x40000) {
538 *bitmap = (uint32_t)channel_layout;
550 uint32_t layout_tag, bitmap, num_descr, label_mask;
560 av_dlog(s,
"chan: layout=%u bitmap=%u num_descr=%u\n",
561 layout_tag, bitmap, num_descr);
563 if (size < 12ULL + num_descr * 20ULL)
567 for (i = 0; i < num_descr; i++) {
575 if (layout_tag == 0) {
577 if (mask_incr == 0) {
581 label_mask |= mask_incr;
584 if (layout_tag == 0) {
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_4POINT1
#define AV_CH_TOP_FRONT_RIGHT
#define AV_CH_LAYOUT_6POINT1
#define AV_CH_LAYOUT_6POINT0
#define AV_CH_LAYOUT_SURROUND
MovChannelLayoutTag
mov 'chan' tag reading/writing.
#define AV_CH_TOP_FRONT_LEFT
AVCodecContext * codec
Codec context associated with this stream.
#define AV_CH_TOP_FRONT_CENTER
static struct @150 mov_codec_ch_layouts[]
#define AV_CH_LAYOUT_7POINT0_FRONT
uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
mov 'chan' tag reading/writing.
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_7POINT0
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
#define AV_CH_SURROUND_DIRECT_RIGHT
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT0
static struct MovChannelLayoutMap mov_ch_layout_map_6ch[]
#define AV_CH_TOP_BACK_LEFT
#define AV_CH_LAYOUT_HEXAGONAL
static struct MovChannelLayoutMap mov_ch_layout_map_2ch[]
#define AV_CH_LOW_FREQUENCY
static enum MovChannelLayoutTag mov_ch_layouts_wav[]
static struct MovChannelLayoutMap mov_ch_layout_map_8ch[]
#define AV_CH_LAYOUT_5POINT1
AVCodecID
Identify the syntax and semantics of the bitstream.
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
static struct MovChannelLayoutMap mov_ch_layout_map_3ch[]
#define AV_CH_LAYOUT_QUAD
uint64_t channel_layout
Audio channel layout.
#define AV_CH_LAYOUT_6POINT0_FRONT
#define AV_CH_STEREO_RIGHT
See AV_CH_STEREO_LEFT.
static struct MovChannelLayoutMap * mov_ch_layout_map[]
static struct MovChannelLayoutMap mov_ch_layout_map_9ch[]
#define AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_CH_LAYOUT_3POINT1
static struct MovChannelLayoutMap mov_ch_layout_map_5ch[]
static enum MovChannelLayoutTag mov_ch_layouts_alac[]
#define AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_LAYOUT_5POINT1_BACK
static enum MovChannelLayoutTag mov_ch_layouts_ac3[]
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size)
Read 'chan' tag from the input stream.
#define AV_CH_LAYOUT_6POINT1_BACK
#define AV_CH_FRONT_RIGHT_OF_CENTER
static enum MovChannelLayoutTag mov_ch_layouts_aac[]
static uint32_t mov_get_channel_label(uint32_t label)
#define AV_CH_TOP_BACK_RIGHT
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_OCTAGONAL
enum MovChannelLayoutTag * layouts
#define AV_CH_BACK_CENTER
#define AV_CH_LAYOUT_7POINT1_WIDE
#define AV_CH_LAYOUT_2POINT1
static struct MovChannelLayoutMap mov_ch_layout_map_7ch[]
static struct MovChannelLayoutMap mov_ch_layout_map_4ch[]
static struct MovChannelLayoutMap mov_ch_layout_map_1ch[]
#define AVERROR_INVALIDDATA
#define AV_CH_SURROUND_DIRECT_LEFT
#define AV_CH_LAYOUT_6POINT1_FRONT
uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, uint64_t channel_layout, uint32_t *bitmap)
Get the channel layout tag for the specified codec id and channel layout.
#define AV_CH_LAYOUT_MONO
#define AV_CH_STEREO_LEFT
Stereo downmix.
static struct MovChannelLayoutMap mov_ch_layout_map_misc[]