FFmpeg
Data Structures | Macros | Functions | Variables
dolby_e.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/thread.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "internal.h"
#include "get_bits.h"
#include "dolby_e.h"
#include "kbdwin.h"
#include "fft.h"

Go to the source code of this file.

Data Structures

struct  DBEGroup
 
struct  DBEChannel
 
struct  DBEDecodeContext
 

Macros

#define MAX_SEGMENTS   2
 
#define MAX_GROUPS   8
 
#define MAX_EXPONENTS   304
 
#define MAX_MANTISSAS   1024
 
#define MAX_MSTR_EXP   2
 
#define MAX_BIAS_EXP   50
 

Functions

static int skip_input (DBEContext *s, int nb_words)
 
static int parse_key (DBEContext *s)
 
static int parse_metadata_ext (DBEDecodeContext *s1)
 
static void unbias_exponents (DBEContext *s, DBEChannel *c, DBEGroup *g)
 
static int parse_exponents (DBEContext *s, DBEChannel *c)
 
static int log_add (int a, int b)
 
static void calc_lowcomp (int *msk_val)
 
static void bit_allocate (int nb_exponent, int nb_code, int fr_code, int *exp, int *bap, int fg_spc, int fg_ofs, int msk_mod, int snr_ofs)
 
static int parse_bit_alloc (DBEDecodeContext *s1, DBEChannel *c)
 
static int parse_indices (DBEContext *s, DBEChannel *c)
 
static int parse_mantissas (DBEContext *s, DBEChannel *c)
 
static int parse_channel (DBEDecodeContext *s1, int ch, int seg_id)
 
static int parse_audio (DBEDecodeContext *s1, int start, int end, int seg_id)
 
static int parse_meter (DBEDecodeContext *s1)
 
static void imdct_calc (DBEDecodeContext *s1, DBEGroup *g, float *result, float *values)
 
static void transform (DBEDecodeContext *s1, DBEChannel *c, float *history, float *output)
 
static void apply_gain (DBEDecodeContext *s, int begin, int end, float *output)
 
static int filter_frame (DBEDecodeContext *s, AVFrame *frame)
 
static int dolby_e_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void dolby_e_flush (AVCodecContext *avctx)
 
static av_cold int dolby_e_close (AVCodecContext *avctx)
 
static av_cold void init_tables (void)
 
static av_cold int dolby_e_init (AVCodecContext *avctx)
 

Variables

static const int8_t lfe_channel_tab [MAX_PROG_CONF+1]
 
static const uint8_t ch_reorder_4 [4] = { 0, 2, 1, 3 }
 
static const uint8_t ch_reorder_6 [6] = { 0, 2, 4, 1, 3, 5 }
 
static const uint8_t ch_reorder_8 [8] = { 0, 2, 6, 4, 1, 3, 7, 5 }
 
static const uint8_t ch_reorder_n [8] = { 0, 2, 4, 6, 1, 3, 5, 7 }
 
static const uint8_t nb_groups_tab [4] = { 1, 8, 7, 1 }
 
static const uint8_t nb_mstr_exp_tab [4] = { 2, 2, 2, 1 }
 
static const uint8_t nb_mantissa_38 [38]
 
static const uint8_t nb_mantissa_44 [44]
 
static const uint8_t nb_mantissa_50 [50]
 
static const uint8_t imdct_bits_tab [3] = { 8, 9, 11 }
 
static const DBEGroup grp_tab_0 [1]
 
static const DBEGroup grp_tab_1 [8]
 
static const DBEGroup grp_tab_2 [7]
 
static const DBEGroup grp_tab_3 [1]
 
static const DBEGroup grp_tab_4 [1]
 
static const DBEGroup grp_tab_5 [8]
 
static const DBEGroup grp_tab_6 [7]
 
static const DBEGroup grp_tab_7 [1]
 
static const DBEGroup *const frm_ofs_tab [2][4]
 
static const uint8_t mantissa_size1 [16][4]
 
static const uint8_t mantissa_size2 [16][4]
 
static const float start_window [192]
 
static const float short_window2 [192]
 
static const float short_window3 [64]
 
static const uint8_t dc_code_tab [5] = { 0, 0, 0, 1, 1 }
 
static const uint8_t ht_code_tab [5] = { 0, 0, 1, 2, 2 }
 
static const uint8_t band_ofs_tab [3][4]
 
static const uint8_t band_low_tab [3] = { 9, 17, 24 }
 
static const uint16_t fast_gain_tab [8]
 
static const uint16_t slow_decay_tab [2][2] = { { 27, -1 }, { 32, 21 } }
 
static const uint16_t misc_decay_tab [3][2][2]
 
static const uint16_t fast_decay_tab [3][2][2][50]
 
static const uint16_t fast_gain_adj_tab [3][2][62]
 
static const uint16_t slow_gain_tab [3][2][50]
 
static const uint16_t hearing_thresh_tab [3][3][50]
 
static const int16_t lwc_gain_tab [11][7]
 
static const int16_t lwc_adj_tab [7]
 
static const uint8_t log_add_tab [212]
 
static const uint8_t bap_tab [64]
 
static float mantissa_tab1 [17][4]
 
static float mantissa_tab2 [17][4]
 
static float mantissa_tab3 [17][4]
 
static float exponent_tab [50]
 
static float gain_tab [1024]
 
static float window [3712]
 
const AVCodec ff_dolby_e_decoder
 

Macro Definition Documentation

◆ MAX_SEGMENTS

#define MAX_SEGMENTS   2

Definition at line 33 of file dolby_e.c.

◆ MAX_GROUPS

#define MAX_GROUPS   8

Definition at line 35 of file dolby_e.c.

◆ MAX_EXPONENTS

#define MAX_EXPONENTS   304

Definition at line 36 of file dolby_e.c.

◆ MAX_MANTISSAS

#define MAX_MANTISSAS   1024

Definition at line 37 of file dolby_e.c.

◆ MAX_MSTR_EXP

#define MAX_MSTR_EXP   2

Definition at line 39 of file dolby_e.c.

◆ MAX_BIAS_EXP

#define MAX_BIAS_EXP   50

Definition at line 40 of file dolby_e.c.

Function Documentation

◆ skip_input()

static int skip_input ( DBEContext s,
int  nb_words 
)
static

Definition at line 605 of file dolby_e.c.

Referenced by parse_audio(), parse_key(), parse_metadata_ext(), and parse_meter().

◆ parse_key()

static int parse_key ( DBEContext s)
static

Definition at line 617 of file dolby_e.c.

Referenced by amf_tag_skip(), and parse_audio().

◆ parse_metadata_ext()

static int parse_metadata_ext ( DBEDecodeContext s1)
static

Definition at line 629 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ unbias_exponents()

static void unbias_exponents ( DBEContext s,
DBEChannel c,
DBEGroup g 
)
static

Definition at line 637 of file dolby_e.c.

Referenced by parse_exponents().

◆ parse_exponents()

static int parse_exponents ( DBEContext s,
DBEChannel c 
)
static

Definition at line 654 of file dolby_e.c.

Referenced by encode_block(), and parse_channel().

◆ log_add()

static int log_add ( int  a,
int  b 
)
inlinestatic

Definition at line 673 of file dolby_e.c.

Referenced by bit_allocate(), and calc_lowcomp().

◆ calc_lowcomp()

static void calc_lowcomp ( int msk_val)
static

Definition at line 679 of file dolby_e.c.

Referenced by bit_allocate().

◆ bit_allocate()

static void bit_allocate ( int  nb_exponent,
int  nb_code,
int  fr_code,
int exp,
int bap,
int  fg_spc,
int  fg_ofs,
int  msk_mod,
int  snr_ofs 
)
static

Definition at line 712 of file dolby_e.c.

Referenced by parse_bit_alloc().

◆ parse_bit_alloc()

static int parse_bit_alloc ( DBEDecodeContext s1,
DBEChannel c 
)
static

Definition at line 761 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_indices()

static int parse_indices ( DBEContext s,
DBEChannel c 
)
static

Definition at line 808 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_mantissas()

static int parse_mantissas ( DBEContext s,
DBEChannel c 
)
static

Definition at line 839 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_channel()

static int parse_channel ( DBEDecodeContext s1,
int  ch,
int  seg_id 
)
static

Definition at line 895 of file dolby_e.c.

Referenced by parse_audio().

◆ parse_audio()

static int parse_audio ( DBEDecodeContext s1,
int  start,
int  end,
int  seg_id 
)
static

Definition at line 946 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ parse_meter()

static int parse_meter ( DBEDecodeContext s1)
static

Definition at line 974 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ imdct_calc()

static void imdct_calc ( DBEDecodeContext s1,
DBEGroup g,
float *  result,
float *  values 
)
static

Definition at line 982 of file dolby_e.c.

Referenced by transform().

◆ transform()

static void transform ( DBEDecodeContext s1,
DBEChannel c,
float *  history,
float *  output 
)
static

Definition at line 1008 of file dolby_e.c.

Referenced by filter_frame().

◆ apply_gain()

static void apply_gain ( DBEDecodeContext s,
int  begin,
int  end,
float *  output 
)
static

Definition at line 1033 of file dolby_e.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( DBEDecodeContext s,
AVFrame frame 
)
static

Definition at line 1050 of file dolby_e.c.

Referenced by dolby_e_decode_frame(), ff_filter_frame(), and ff_filter_frame_framed().

◆ dolby_e_decode_frame()

static int dolby_e_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 1079 of file dolby_e.c.

◆ dolby_e_flush()

static av_cold void dolby_e_flush ( AVCodecContext avctx)
static

Definition at line 1133 of file dolby_e.c.

◆ dolby_e_close()

static av_cold int dolby_e_close ( AVCodecContext avctx)
static

Definition at line 1140 of file dolby_e.c.

◆ init_tables()

static av_cold void init_tables ( void  )
static

Definition at line 1153 of file dolby_e.c.

Referenced by dolby_e_init().

◆ dolby_e_init()

static av_cold int dolby_e_init ( AVCodecContext avctx)
static

Definition at line 1239 of file dolby_e.c.

Variable Documentation

◆ lfe_channel_tab

const int8_t lfe_channel_tab[MAX_PROG_CONF+1]
static
Initial value:
= {
5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5
}

Definition at line 84 of file dolby_e.c.

Referenced by parse_channel().

◆ ch_reorder_4

const uint8_t ch_reorder_4[4] = { 0, 2, 1, 3 }
static

Definition at line 89 of file dolby_e.c.

Referenced by filter_frame().

◆ ch_reorder_6

const uint8_t ch_reorder_6[6] = { 0, 2, 4, 1, 3, 5 }
static

Definition at line 90 of file dolby_e.c.

Referenced by filter_frame().

◆ ch_reorder_8

const uint8_t ch_reorder_8[8] = { 0, 2, 6, 4, 1, 3, 7, 5 }
static

Definition at line 91 of file dolby_e.c.

Referenced by filter_frame().

◆ ch_reorder_n

const uint8_t ch_reorder_n[8] = { 0, 2, 4, 6, 1, 3, 5, 7 }
static

Definition at line 92 of file dolby_e.c.

Referenced by filter_frame().

◆ nb_groups_tab

const uint8_t nb_groups_tab[4] = { 1, 8, 7, 1 }
static

Definition at line 95 of file dolby_e.c.

Referenced by parse_channel().

◆ nb_mstr_exp_tab

const uint8_t nb_mstr_exp_tab[4] = { 2, 2, 2, 1 }
static

Definition at line 97 of file dolby_e.c.

Referenced by parse_channel().

◆ nb_mantissa_38

const uint8_t nb_mantissa_38[38]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6,
7, 8, 9, 10, 11, 12,
}

Definition at line 99 of file dolby_e.c.

◆ nb_mantissa_44

const uint8_t nb_mantissa_44[44]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7,
8, 9, 10, 11, 12, 13, 15, 16, 18, 20, 22, 25,
}

Definition at line 105 of file dolby_e.c.

◆ nb_mantissa_50

const uint8_t nb_mantissa_50[50]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3,
3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 12, 13, 14, 16,
18, 19, 22, 24, 27, 29, 32, 36, 40, 44, 49, 54, 60, 66, 74, 82,
90, 100,
}

Definition at line 111 of file dolby_e.c.

◆ imdct_bits_tab

const uint8_t imdct_bits_tab[3] = { 8, 9, 11 }
static

Definition at line 118 of file dolby_e.c.

Referenced by dolby_e_init(), and imdct_calc().

◆ grp_tab_0

const DBEGroup grp_tab_0[1]
static
Initial value:
= {
{ 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
}

Definition at line 120 of file dolby_e.c.

◆ grp_tab_1

const DBEGroup grp_tab_1[8]
static
Initial value:
= {
{ 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
{ 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
{ 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
{ 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
{ 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
{ 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
{ 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 704, 0, 0 },
{ 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 1, 256, 832, 0, 0 },
}

Definition at line 124 of file dolby_e.c.

◆ grp_tab_2

const DBEGroup grp_tab_2[7]
static
Initial value:
= {
{ 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
{ 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
{ 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
{ 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
{ 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
{ 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
{ 44, { 19, 25 }, 228, 768, nb_mantissa_44, 1, 1, 448, 704, 960, 64 },
}

Definition at line 135 of file dolby_e.c.

◆ grp_tab_3

const DBEGroup grp_tab_3[1]
static
Initial value:
= {
{ 21, { 21 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
}

Definition at line 145 of file dolby_e.c.

◆ grp_tab_4

const DBEGroup grp_tab_4[1]
static
Initial value:
= {
{ 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
}

Definition at line 149 of file dolby_e.c.

◆ grp_tab_5

const DBEGroup grp_tab_5[8]
static
Initial value:
= {
{ 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 1, 256, 64, 0, 0 },
{ 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 192, 0, 0 },
{ 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
{ 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
{ 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
{ 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
{ 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
{ 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
}

Definition at line 153 of file dolby_e.c.

◆ grp_tab_6

const DBEGroup grp_tab_6[7]
static
Initial value:
= {
{ 44, { 19, 25 }, 0, 0, nb_mantissa_44, 1, 1, 448, 0, 3264, 0 },
{ 38, { 12, 26 }, 44, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
{ 38, { 12, 26 }, 82, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
{ 38, { 12, 26 }, 120, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
{ 38, { 12, 26 }, 158, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
{ 38, { 12, 26 }, 196, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
{ 38, { 12, 26 }, 234, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
}

Definition at line 164 of file dolby_e.c.

◆ grp_tab_7

const DBEGroup grp_tab_7[1]
static
Initial value:
= {
{ 21, { 21 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
}

Definition at line 174 of file dolby_e.c.

◆ frm_ofs_tab

const DBEGroup* const frm_ofs_tab[2][4]
static
Initial value:

Definition at line 178 of file dolby_e.c.

Referenced by parse_channel().

◆ mantissa_size1

const uint8_t mantissa_size1[16][4]
static
Initial value:
= {
{ 0, 0, 0, 0 }, { 2, 1, 1, 1 }, { 3, 2, 1, 1 }, { 4, 3, 2, 1 },
{ 5, 4, 3, 2 }, { 6, 5, 4, 3 }, { 7, 6, 5, 4 }, { 8, 7, 6, 5 },
{ 9, 8, 7, 6 }, { 10, 9, 8, 7 }, { 11, 10, 9, 8 }, { 12, 11, 10, 9 },
{ 13, 12, 11, 10 }, { 14, 13, 12, 11 }, { 15, 14, 13, 12 }, { 16, 15, 14, 13 },
}

Definition at line 183 of file dolby_e.c.

Referenced by parse_mantissas().

◆ mantissa_size2

const uint8_t mantissa_size2[16][4]
static
Initial value:
= {
{ 0, 0, 0, 0 }, { 2, 1, 2, 2 }, { 3, 2, 3, 3 }, { 4, 3, 4, 4 },
{ 5, 4, 5, 5 }, { 6, 5, 6, 6 }, { 7, 6, 7, 7 }, { 8, 7, 8, 8 },
{ 9, 8, 9, 9 }, { 10, 9, 10, 10 }, { 11, 10, 11, 11 }, { 12, 11, 12, 12 },
{ 13, 12, 13, 13 }, { 14, 13, 14, 14 }, { 15, 14, 15, 15 }, { 16, 15, 16, 16 },
}

Definition at line 190 of file dolby_e.c.

Referenced by parse_mantissas().

◆ start_window

const float start_window[192]
static

Definition at line 197 of file dolby_e.c.

Referenced by init_tables().

◆ short_window2

const float short_window2[192]
static

Definition at line 250 of file dolby_e.c.

Referenced by init_tables().

◆ short_window3

const float short_window3[64]
static
Initial value:
= {
0.00326887936450, 0.00550242900936, 0.00786846643791, 0.01045683453520,
0.01330402120132, 0.01643221072863, 0.01985798040609, 0.02359509464766,
0.02765559221954, 0.03205025893128, 0.03678884369614, 0.04188015679495,
0.04733210987781, 0.05315172583924, 0.05934513287609, 0.06591755045290,
0.07287327156378, 0.08021564389822, 0.08794705152307, 0.09606889811179,
0.10458159240070, 0.11348453632940, 0.12277611617809, 0.13245369691511,
0.14251361989876, 0.15295120402567, 0.16376075037904, 0.17493555039885,
0.18646789757072, 0.19834910260891, 0.21056951208995, 0.22311853047787,
0.23598464546683, 0.24915545655419, 0.26261770674500, 0.27635731727778,
0.29035942525136, 0.30460842402318, 0.31908800624032, 0.33378120935681,
0.34867046348260, 0.36373764140285, 0.37896411059909, 0.39433078709788,
0.40981819096657, 0.42540650327031, 0.44107562429959, 0.45680523287270,
0.47257484651351, 0.48836388230077, 0.50415171818214, 0.51991775454258,
0.53564147581496, 0.55130251191887, 0.56688069931047, 0.58235614142007,
0.59770926827271, 0.61292089506118, 0.62797227945823, 0.64284517745255,
0.65752189749349, 0.67198535273209, 0.68621911114984, 0.70020744337099,
}

Definition at line 303 of file dolby_e.c.

Referenced by init_tables().

◆ dc_code_tab

const uint8_t dc_code_tab[5] = { 0, 0, 0, 1, 1 }
static

Definition at line 322 of file dolby_e.c.

Referenced by bit_allocate().

◆ ht_code_tab

const uint8_t ht_code_tab[5] = { 0, 0, 1, 2, 2 }
static

Definition at line 324 of file dolby_e.c.

Referenced by bit_allocate().

◆ band_ofs_tab

const uint8_t band_ofs_tab[3][4]
static
Initial value:
= {
{ 12, 8, 4, 0 }, { 14, 10, 6, 0 }, { 12, 8, 4, 0 }
}

Definition at line 326 of file dolby_e.c.

Referenced by bit_allocate().

◆ band_low_tab

const uint8_t band_low_tab[3] = { 9, 17, 24 }
static

Definition at line 330 of file dolby_e.c.

Referenced by bit_allocate().

◆ fast_gain_tab

const uint16_t fast_gain_tab[8]
static
Initial value:
= {
128, 256, 384, 512, 640, 768, 896, 1024
}

Definition at line 332 of file dolby_e.c.

Referenced by bit_allocate().

◆ slow_decay_tab

const uint16_t slow_decay_tab[2][2] = { { 27, -1 }, { 32, 21 } }
static

Definition at line 336 of file dolby_e.c.

Referenced by bit_allocate().

◆ misc_decay_tab

const uint16_t misc_decay_tab[3][2][2]
static
Initial value:
= {
{ { 354, -1 }, { 425, 425 } },
{ { 266, -1 }, { 320, -1 } },
{ { 213, -1 }, { 256, -1 } }
}

Definition at line 338 of file dolby_e.c.

Referenced by bit_allocate().

◆ fast_decay_tab

const uint16_t fast_decay_tab[3][2][2][50]
static

Definition at line 344 of file dolby_e.c.

Referenced by bit_allocate().

◆ fast_gain_adj_tab

const uint16_t fast_gain_adj_tab[3][2][62]
static

Definition at line 416 of file dolby_e.c.

Referenced by bit_allocate().

◆ slow_gain_tab

const uint16_t slow_gain_tab[3][2][50]
static

Definition at line 462 of file dolby_e.c.

Referenced by bit_allocate().

◆ hearing_thresh_tab

const uint16_t hearing_thresh_tab[3][3][50]
static

Definition at line 500 of file dolby_e.c.

Referenced by bit_allocate().

◆ lwc_gain_tab

const int16_t lwc_gain_tab[11][7]
static
Initial value:
= {
{ -21, -197, -271, -466, 32767, 32767, 32767 },
{ -197, -29, -244, -271, -540, 32767, 32767 },
{ -271, -244, -29, -249, -271, -593, 32767 },
{ -466, -271, -249, -29, -251, -271, -632 },
{ -540, -271, -251, -29, -251, -271, -664 },
{ -593, -271, -251, -29, -252, -271, -690 },
{ -632, -271, -252, -29, -252, -271, -711 },
{ -664, -271, -252, -29, -252, -271, -730 },
{ -690, -271, -252, -29, -252, -271, -745 },
{ -711, -271, -252, -29, -253, -271, -759 },
{ -730, -271, -253, -29, -253, -271, -771 },
}

Definition at line 555 of file dolby_e.c.

Referenced by calc_lowcomp().

◆ lwc_adj_tab

const int16_t lwc_adj_tab[7]
static
Initial value:
= {
-192, -320, -448, -512, -448, -320, -192,
}

Definition at line 569 of file dolby_e.c.

Referenced by calc_lowcomp().

◆ log_add_tab

const uint8_t log_add_tab[212]
static
Initial value:
= {
64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50,
49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38,
37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28,
28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21,
20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15, 15,
15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11,
10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5,
5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0,
}

Definition at line 573 of file dolby_e.c.

Referenced by log_add().

◆ bap_tab

const uint8_t bap_tab[64]
static
Initial value:
= {
0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4,
4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15,
}

Definition at line 590 of file dolby_e.c.

Referenced by ac3_bit_alloc_calc_bap_c(), bit_allocate(), and decode_audio_block().

◆ mantissa_tab1

float mantissa_tab1[17][4]
static

Definition at line 597 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

◆ mantissa_tab2

float mantissa_tab2[17][4]
static

Definition at line 598 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

◆ mantissa_tab3

float mantissa_tab3[17][4]
static

Definition at line 599 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

◆ exponent_tab

float exponent_tab[50]
static

Definition at line 600 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

◆ gain_tab

float gain_tab[1024]
static

Definition at line 601 of file dolby_e.c.

Referenced by apply_gain(), and init_tables().

◆ window

float window[3712]
static

Definition at line 603 of file dolby_e.c.

Referenced by init_tables(), and transform().

◆ ff_dolby_e_decoder

const AVCodec ff_dolby_e_decoder
Initial value:

Definition at line 1260 of file dolby_e.c.

grp_tab_3
static const DBEGroup grp_tab_3[1]
Definition: dolby_e.c:145
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
dolby_e_close
static av_cold int dolby_e_close(AVCodecContext *avctx)
Definition: dolby_e.c:1140
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
dolby_e_init
static av_cold int dolby_e_init(AVCodecContext *avctx)
Definition: dolby_e.c:1239
grp_tab_0
static const DBEGroup grp_tab_0[1]
Definition: dolby_e.c:120
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
nb_mantissa_44
static const uint8_t nb_mantissa_44[44]
Definition: dolby_e.c:105
dolby_e_flush
static av_cold void dolby_e_flush(AVCodecContext *avctx)
Definition: dolby_e.c:1133
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_DOLBY_E
@ AV_CODEC_ID_DOLBY_E
Definition: codec_id.h:507
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:593
dolby_e_decode_frame
static int dolby_e_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dolby_e.c:1079
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:109
grp_tab_5
static const DBEGroup grp_tab_5[8]
Definition: dolby_e.c:153
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
DBEDecodeContext
Definition: dolby_e.c:72
grp_tab_1
static const DBEGroup grp_tab_1[8]
Definition: dolby_e.c:124
nb_mantissa_38
static const uint8_t nb_mantissa_38[38]
Definition: dolby_e.c:99
grp_tab_2
static const DBEGroup grp_tab_2[7]
Definition: dolby_e.c:135
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:50
grp_tab_4
static const DBEGroup grp_tab_4[1]
Definition: dolby_e.c:149
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
grp_tab_6
static const DBEGroup grp_tab_6[7]
Definition: dolby_e.c:164
grp_tab_7
static const DBEGroup grp_tab_7[1]
Definition: dolby_e.c:174
nb_mantissa_50
static const uint8_t nb_mantissa_50[50]
Definition: dolby_e.c:111