29 16, 20, 24, 0, 0, 0, 0, 0,
30 0, 0, 0, 0, 0, 0, 0, 0,
34 1, 2, 3, 4, 3, 4, 5, 3, 4, 5, 4, 5, 6, 4, 5, 4,
35 5, 6, 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
65 int has_extension, extensions = 0;
70 if (
AV_RB32(buf) == 0xf8726fba) {
71 has_extension = buf[25] & 1;
73 extensions = buf[26] >> 4;
74 size += 2 + extensions * 2;
88 int ratebits, channel_arrangement, header_size;
94 if (header_size < 0 || gb->size_in_bits < header_size << 3) {
122 channel_arrangement =
get_bits(gb, 5);
139 channel_arrangement =
get_bits(gb, 5);
145 channel_arrangement =
get_bits(gb, 13);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_CH_LAYOUT_SURROUND
uint16_t ff_mlp_checksum16(const uint8_t *buf, unsigned int buf_size)
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
Read a major sync info header - contains high level information about the stream - sample rate...
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LOW_FREQUENCY
static int get_bits_count(const GetBitContext *s)
bitstream reader API header.
static int mlp_samplerate(int in)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_CH_LAYOUT_QUAD
audio channel layout utility functions
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
static uint64_t truehd_layout(int chanmap)
static volatile int checksum
#define AV_CH_LAYOUT_5POINT1_BACK
static const uint8_t mlp_quants[16]
static int mlp_get_major_sync_size(const uint8_t *buf, int bufsize)
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
#define AV_CH_LAYOUT_5POINT0_BACK
static const uint8_t mlp_channels[32]
static int truehd_channels(int chanmap)
static const uint64_t mlp_layout[32]
#define AV_CH_LAYOUT_MONO