Go to the documentation of this file.
26 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1
30 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
34 0, 42965, 43008, 44800, 53706, 53760
39 if (nb_words >
s->input_size) {
43 s->input += nb_words *
s->word_bytes;
44 s->input_size -= nb_words;
51 const uint8_t *
key =
s->input;
62 const uint8_t *
src =
s->input;
63 uint8_t *dst =
s->buffer;
69 if (nb_words >
s->input_size) {
75 switch (
s->word_bits) {
77 for (
i = 0;
i < nb_words;
i++,
src += 2, dst += 2)
82 for (
i = 0;
i < nb_words;
i++,
src += 3)
87 for (
i = 0;
i < nb_words;
i++,
src += 3, dst += 3)
100 int hdr,
ret,
key, mtd_size;
106 if ((hdr & 0xfffffe) == 0x7888e) {
108 }
else if ((hdr & 0xffffe0) == 0x788e0) {
110 }
else if ((hdr & 0xfffe00) == 0x78e00) {
118 s->word_bytes =
s->word_bits + 7 >> 3;
119 s->input = buf +
s->word_bytes;
120 s->input_size = buf_size /
s->word_bytes - 1;
121 s->key_present = hdr >> 24 -
s->word_bits & 1;
160 for (
int i = 0;
i <
header->nb_channels;
i++)
166 for (
int i = 0;
i <
header->nb_channels;
i++) {
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static int get_bits_left(GetBitContext *gb)
#define u(width, name, range_min, range_max)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static int skip_input(DBEContext *s, int nb_words)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static const uint8_t nb_channels_tab[MAX_PROG_CONF+1]
int ff_dolby_e_parse_header(DBEContext *s, const uint8_t *buf, int buf_size)
Initialize DBEContext and parse Dolby E metadata.
static const uint8_t header[24]
static void skip_bits1(GetBitContext *s)
#define i(width, name, range_min, range_max)
static int parse_key(DBEContext *s)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static const uint16_t sample_rate_tab[16]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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_WB32 unsigned int_TMPL AV_RB24
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 proce...
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_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
static const uint8_t nb_programs_tab[MAX_PROG_CONF+1]