FFmpeg
Functions | Variables
mlp_parse.c File Reference
#include <stdint.h>
#include "libavutil/channel_layout.h"
#include "get_bits.h"
#include "mlp_parse.h"
#include "mlp.h"

Go to the source code of this file.

Functions

static int mlp_samplerate (int in)
 
static int truehd_channels (int chanmap)
 
static uint64_t truehd_layout (int chanmap)
 
static int mlp_get_major_sync_size (const uint8_t *buf, int bufsize)
 
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. More...
 

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]
 

Function Documentation

◆ mlp_samplerate()

static int mlp_samplerate ( int  in)
static

Definition at line 84 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ truehd_channels()

static int truehd_channels ( int  chanmap)
static

Definition at line 92 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ truehd_layout()

static uint64_t truehd_layout ( int  chanmap)
static

Definition at line 102 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ mlp_get_major_sync_size()

static int mlp_get_major_sync_size ( const uint8_t buf,
int  bufsize 
)
static

Definition at line 113 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ ff_mlp_read_major_sync()

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 136 of file mlp_parse.c.

Referenced by mlp_parse(), read_major_sync(), and truehd_core_filter().

Variable Documentation

◆ mlp_quants

const uint8_t mlp_quants[16]
static
Initial value:
= {
16, 20, 24, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
}

Definition at line 28 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ mlp_channels

const uint8_t mlp_channels[32]
static
Initial value:
= {
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 33 of file mlp_parse.c.

Referenced by ff_mlp_read_major_sync().

◆ mlp_layout

const uint64_t mlp_layout[32]
static

◆ thd_chancount

const uint8_t thd_chancount[13]
static
Initial value:
= {
2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1
}

Definition at line 63 of file mlp_parse.c.

Referenced by truehd_channels().

◆ thd_layout

const uint64_t thd_layout[13]
static
AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
Definition: channel_layout.h:97
AV_CH_TOP_FRONT_CENTER
#define AV_CH_TOP_FRONT_CENTER
Definition: channel_layout.h:62
AV_CH_LOW_FREQUENCY_2
#define AV_CH_LOW_FREQUENCY_2
Definition: channel_layout.h:73
AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_MONO
Definition: channel_layout.h:85
AV_CH_TOP_FRONT_RIGHT
#define AV_CH_TOP_FRONT_RIGHT
Definition: channel_layout.h:63
AV_CH_TOP_FRONT_LEFT
#define AV_CH_TOP_FRONT_LEFT
Definition: channel_layout.h:61
AV_CH_WIDE_LEFT
#define AV_CH_WIDE_LEFT
Definition: channel_layout.h:69
AV_CH_SURROUND_DIRECT_RIGHT
#define AV_CH_SURROUND_DIRECT_RIGHT
Definition: channel_layout.h:72
AV_CH_WIDE_RIGHT
#define AV_CH_WIDE_RIGHT
Definition: channel_layout.h:70
AV_CH_BACK_LEFT
#define AV_CH_BACK_LEFT
Definition: channel_layout.h:53
AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_STEREO
Definition: channel_layout.h:86
AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_QUAD
Definition: channel_layout.h:94
AV_CH_LOW_FREQUENCY
#define AV_CH_LOW_FREQUENCY
Definition: channel_layout.h:52
AV_CH_LAYOUT_2_1
#define AV_CH_LAYOUT_2_1
Definition: channel_layout.h:88
AV_CH_TOP_CENTER
#define AV_CH_TOP_CENTER
Definition: channel_layout.h:60
AV_CH_FRONT_CENTER
#define AV_CH_FRONT_CENTER
Definition: channel_layout.h:51
AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_FRONT_LEFT_OF_CENTER
Definition: channel_layout.h:55
AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LAYOUT_5POINT1_BACK
Definition: channel_layout.h:98
AV_CH_FRONT_RIGHT_OF_CENTER
#define AV_CH_FRONT_RIGHT_OF_CENTER
Definition: channel_layout.h:56
AV_CH_BACK_CENTER
#define AV_CH_BACK_CENTER
Definition: channel_layout.h:57
AV_CH_FRONT_LEFT
#define AV_CH_FRONT_LEFT
Definition: channel_layout.h:49
AV_CH_SIDE_RIGHT
#define AV_CH_SIDE_RIGHT
Definition: channel_layout.h:59
AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_SURROUND
Definition: channel_layout.h:89
AV_CH_SURROUND_DIRECT_LEFT
#define AV_CH_SURROUND_DIRECT_LEFT
Definition: channel_layout.h:71
AV_CH_FRONT_RIGHT
#define AV_CH_FRONT_RIGHT
Definition: channel_layout.h:50
AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_4POINT0
Definition: channel_layout.h:91
AV_CH_BACK_RIGHT
#define AV_CH_BACK_RIGHT
Definition: channel_layout.h:54
AV_CH_SIDE_LEFT
#define AV_CH_SIDE_LEFT
Definition: channel_layout.h:58