FFmpeg
Functions | Variables
dolby_e_parse.c File Reference
#include "get_bits.h"
#include "put_bits.h"
#include "dolby_e.h"

Go to the source code of this file.

Functions

static int skip_input (DBEContext *s, int nb_words)
 
static int parse_key (DBEContext *s)
 
int ff_dolby_e_convert_input (DBEContext *s, int nb_words, int key)
 Use the provided key to transform the input into data (put into s->buffer) suitable for further processing and initialize s->gb to read said data. More...
 
int ff_dolby_e_parse_header (DBEContext *s, const uint8_t *buf, int buf_size)
 Initialize DBEContext and parse Dolby E metadata. More...
 

Variables

static const uint8_t nb_programs_tab [MAX_PROG_CONF+1]
 
static const uint8_t nb_channels_tab [MAX_PROG_CONF+1]
 
static const uint16_t sample_rate_tab [16]
 

Function Documentation

◆ skip_input()

static int skip_input ( DBEContext s,
int  nb_words 
)
static

Definition at line 37 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header(), and parse_key().

◆ parse_key()

static int parse_key ( DBEContext s)
static

Definition at line 48 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header().

◆ ff_dolby_e_convert_input()

int ff_dolby_e_convert_input ( DBEContext s,
int  nb_words,
int  key 
)

Use the provided key to transform the input into data (put into s->buffer) suitable for further processing and initialize s->gb to read said data.

Definition at line 60 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header(), and parse_audio().

◆ ff_dolby_e_parse_header()

int ff_dolby_e_parse_header ( DBEContext s,
const uint8_t *  buf,
int  buf_size 
)

Initialize DBEContext and parse Dolby E metadata.

Set word_bits/word_bytes, input, input_size, key_present and parse the header up to the end_gain element.

Parameters
[out]sDBEContext.
[in]bufraw input buffer.
[in]buf_sizemust be 3 bytes at least.
Returns
Returns 0 on success, AVERROR_INVALIDDATA on error

Definition at line 97 of file dolby_e_parse.c.

Referenced by dolby_e_decode_frame(), and dolby_e_parse().

Variable Documentation

◆ nb_programs_tab

const uint8_t nb_programs_tab[MAX_PROG_CONF+1]
static
Initial value:
= {
2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1
}

Definition at line 25 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header().

◆ nb_channels_tab

const uint8_t nb_channels_tab[MAX_PROG_CONF+1]
static
Initial value:
= {
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
}

Definition at line 29 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header().

◆ sample_rate_tab

const uint16_t sample_rate_tab[16]
static
Initial value:
= {
0, 42965, 43008, 44800, 53706, 53760
}

Definition at line 33 of file dolby_e_parse.c.

Referenced by ff_dolby_e_parse_header().