Go to the documentation of this file.
54 const uint8_t **poutbuf,
int *poutbuf_size,
55 const uint8_t *buf,
int buf_size)
77 for (
i = 0;
i < buf_size;
i++) {
78 mp->pc.state = (
mp->pc.state << 8) | buf[
i];
79 if ((
mp->pc.state & 0xfffffffe) == 0xf8726fba &&
81 mp->pc.index +
i >= 7) {
102 if (
mp->bytes_left == 0) {
106 for(;
mp->pc.overread>0;
mp->pc.overread--) {
107 mp->pc.buffer[
mp->pc.index++]=
mp->pc.buffer[
mp->pc.overread_index++];
110 if (
mp->pc.index + buf_size < 2) {
116 mp->bytes_left = ((
mp->pc.index > 0 ?
mp->pc.buffer[0] : buf[0]) << 8)
117 | (
mp->pc.index > 1 ?
mp->pc.buffer[1] : buf[1-
mp->pc.index]);
118 mp->bytes_left = (
mp->bytes_left & 0xfff) * 2;
119 if (
mp->bytes_left <= 0) {
122 mp->bytes_left -=
mp->pc.index;
128 mp->bytes_left -= buf_size;
135 sync_present = buf_size >= 8 && (
AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba;
145 for (
i = -1;
i <
mp->num_substreams;
i++) {
146 parity_bits ^= buf[p++];
147 parity_bits ^= buf[p++];
149 if (
i < 0 || buf[p-2] & 0x80) {
150 parity_bits ^= buf[p++];
151 parity_bits ^= buf[p++];
155 if ((((parity_bits >> 4) ^ parity_bits) & 0xF) != 0xF) {
176 s->duration =
mh.access_unit_size;
179 if (
mh.stream_type == 0xbb) {
185 if (!
mh.channels_thd_stream2) {
198 mp->num_substreams =
mh.num_substreams;
202 *poutbuf_size = buf_size;
int frame_size
Number of samples per channel in an audio frame.
#define AV_LOG_WARNING
Something somehow does not look correct.
uint64_t channel_layout
Audio channel layout.
int sample_rate
samples per second
static double mp(int i, double w0, double r)
void ff_parse_close(AVCodecParserContext *s)
const AVCodecParser ff_mlp_parser
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
int64_t bit_rate
the average bitrate
enum AVSampleFormat sample_fmt
audio sample format
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
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,...
static int mlp_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define AV_LOG_INFO
Standard information.
int channels
number of audio channels
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
@ AV_SAMPLE_FMT_S16
signed 16 bits
av_cold void ff_mlp_init_crc(void)
static av_cold int mlp_init(AVCodecParserContext *s)
main external API structure.
@ AV_SAMPLE_FMT_S32
signed 32 bits