MLP parser. More...
#include <stdint.h>#include "libavutil/crc.h"#include "libavutil/audioconvert.h"#include "get_bits.h"#include "parser.h"#include "mlp_parser.h"#include "mlp.h"Go to the source code of this file.
Data Structures | |
| struct | MLPParseContext |
Typedefs | |
| typedef struct MLPParseContext | MLPParseContext |
Functions | |
| static int | mlp_samplerate (int in) |
| static int | truehd_channels (int chanmap) |
| static uint64_t | truehd_layout (int chanmap) |
| 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, channel arrangement etc. | |
| static av_cold int | mlp_init (AVCodecParserContext *s) |
| static int | mlp_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) |
Variables | |
| static const uint8_t | mlp_quants [16] |
| static const uint8_t | mlp_channels [32] |
| static const uint64_t | mlp_layout [32] |
| static const uint8_t | thd_chancount [13] |
| static const uint64_t | thd_layout [13] |
| AVCodecParser | ff_mlp_parser |
MLP parser.
Definition in file mlp_parser.c.
| typedef struct MLPParseContext MLPParseContext |
| 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, channel arrangement etc.
Most of this information is not actually necessary for decoding, only for playback. gb must be a freshly initialized GetBitContext with no bits read.
Definition at line 126 of file mlp_parser.c.
Referenced by mlp_parse(), and read_major_sync().
| static av_cold int mlp_init | ( | AVCodecParserContext * | s | ) | [static] |
Definition at line 205 of file mlp_parser.c.
| static int mlp_parse | ( | AVCodecParserContext * | s, | |
| AVCodecContext * | avctx, | |||
| const uint8_t ** | poutbuf, | |||
| int * | poutbuf_size, | |||
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 211 of file mlp_parser.c.
| static int mlp_samplerate | ( | int | in | ) | [static] |
Definition at line 92 of file mlp_parser.c.
Referenced by ff_mlp_read_major_sync().
| static int truehd_channels | ( | int | chanmap | ) | [static] |
Definition at line 100 of file mlp_parser.c.
Referenced by mlp_parse().
| static uint64_t truehd_layout | ( | int | chanmap | ) | [static] |
Definition at line 110 of file mlp_parser.c.
Referenced by mlp_parse().
{
.codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD },
.priv_data_size = sizeof(MLPParseContext),
.parser_init = mlp_init,
.parser_parse = mlp_parse,
.parser_close = ff_parse_close,
}
Definition at line 347 of file mlp_parser.c.
const uint8_t mlp_channels[32] [static] |
{
1, 2, 3, 4, 3, 4, 5, 3, 4, 5, 4, 5, 6, 4, 5, 4,
5, 6, 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}
Definition at line 41 of file mlp_parser.c.
Referenced by mlp_parse().
const uint64_t mlp_layout[32] [static] |
{
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_2_1,
AV_CH_LAYOUT_2_2,
AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_2_1|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_2_2|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_SURROUND,
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_5POINT0,
AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_5POINT1,
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_5POINT0,
AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_5POINT1,
AV_CH_LAYOUT_2_2|AV_CH_LOW_FREQUENCY,
AV_CH_LAYOUT_5POINT0,
AV_CH_LAYOUT_5POINT1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
Definition at line 46 of file mlp_parser.c.
Referenced by mlp_parse().
const uint8_t mlp_quants[16] [static] |
{
16, 20, 24, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
}
Definition at line 36 of file mlp_parser.c.
Referenced by ff_mlp_read_major_sync().
const uint8_t thd_chancount[13] [static] |
{
2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1
}
Definition at line 71 of file mlp_parser.c.
Referenced by truehd_channels().
const uint64_t thd_layout[13] [static] |
{
AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT,
AV_CH_FRONT_CENTER,
AV_CH_LOW_FREQUENCY,
AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT,
AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT,
AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT,
AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT,
AV_CH_BACK_CENTER,
AV_CH_TOP_BACK_CENTER,
AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT,
AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER,
AV_CH_TOP_BACK_CENTER,
AV_CH_LOW_FREQUENCY
}
Definition at line 76 of file mlp_parser.c.
Referenced by truehd_layout().