FFmpeg
Data Structures | Macros | Functions | Variables
dolby_e.c File Reference
#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]
 
AVCodec ff_dolby_e_decoder
 

Macro Definition Documentation

#define MAX_SEGMENTS   2

Definition at line 32 of file dolby_e.c.

#define MAX_GROUPS   8

Definition at line 34 of file dolby_e.c.

Referenced by parse_bit_alloc().

#define MAX_EXPONENTS   304

Definition at line 35 of file dolby_e.c.

#define MAX_MANTISSAS   1024

Definition at line 36 of file dolby_e.c.

#define MAX_MSTR_EXP   2

Definition at line 38 of file dolby_e.c.

Referenced by unbias_exponents().

#define MAX_BIAS_EXP   50

Definition at line 39 of file dolby_e.c.

Referenced by bit_allocate(), and unbias_exponents().

Function Documentation

static int skip_input ( DBEContext s,
int  nb_words 
)
static

Definition at line 604 of file dolby_e.c.

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

static int parse_key ( DBEContext s)
static

Definition at line 616 of file dolby_e.c.

Referenced by amf_tag_skip(), ff_amf_get_field_value(), and parse_audio().

static int parse_metadata_ext ( DBEDecodeContext s1)
static

Definition at line 628 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

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

Definition at line 636 of file dolby_e.c.

Referenced by parse_exponents().

static int parse_exponents ( DBEContext s,
DBEChannel c 
)
static

Definition at line 653 of file dolby_e.c.

Referenced by encode_block(), and parse_channel().

static int log_add ( int  a,
int  b 
)
inlinestatic

Definition at line 672 of file dolby_e.c.

Referenced by bit_allocate(), and calc_lowcomp().

static void calc_lowcomp ( int msk_val)
static

Definition at line 678 of file dolby_e.c.

Referenced by 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 711 of file dolby_e.c.

Referenced by parse_bit_alloc().

static int parse_bit_alloc ( DBEDecodeContext s1,
DBEChannel c 
)
static

Definition at line 760 of file dolby_e.c.

Referenced by parse_channel().

static int parse_indices ( DBEContext s,
DBEChannel c 
)
static

Definition at line 807 of file dolby_e.c.

Referenced by parse_channel().

static int parse_mantissas ( DBEContext s,
DBEChannel c 
)
static

Definition at line 838 of file dolby_e.c.

Referenced by parse_channel().

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

Definition at line 894 of file dolby_e.c.

Referenced by parse_audio().

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

Definition at line 945 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

static int parse_meter ( DBEDecodeContext s1)
static

Definition at line 973 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

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

Definition at line 981 of file dolby_e.c.

Referenced by transform().

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

Definition at line 1007 of file dolby_e.c.

Referenced by filter_frame().

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

Definition at line 1032 of file dolby_e.c.

Referenced by filter_frame().

static int filter_frame ( DBEDecodeContext s,
AVFrame frame 
)
static
static int dolby_e_decode_frame ( AVCodecContext avctx,
void data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 1078 of file dolby_e.c.

static av_cold void dolby_e_flush ( AVCodecContext avctx)
static

Definition at line 1132 of file dolby_e.c.

static av_cold int dolby_e_close ( AVCodecContext avctx)
static

Definition at line 1139 of file dolby_e.c.

static av_cold void init_tables ( void  )
static

Definition at line 1152 of file dolby_e.c.

Referenced by dolby_e_init().

static av_cold int dolby_e_init ( AVCodecContext avctx)
static

Definition at line 1238 of file dolby_e.c.

Variable Documentation

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 83 of file dolby_e.c.

Referenced by parse_channel().

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

Definition at line 88 of file dolby_e.c.

Referenced by filter_frame().

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

Definition at line 89 of file dolby_e.c.

Referenced by filter_frame().

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

Definition at line 90 of file dolby_e.c.

Referenced by filter_frame().

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

Definition at line 91 of file dolby_e.c.

Referenced by filter_frame().

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

Definition at line 94 of file dolby_e.c.

Referenced by parse_channel().

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

Definition at line 96 of file dolby_e.c.

Referenced by parse_channel().

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 98 of file dolby_e.c.

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 104 of file dolby_e.c.

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 110 of file dolby_e.c.

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

Definition at line 117 of file dolby_e.c.

Referenced by dolby_e_init(), and imdct_calc().

const DBEGroup grp_tab_0[1]
static
Initial value:
= {
{ 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
}
static const uint8_t nb_mantissa_50[50]
Definition: dolby_e.c:110

Definition at line 119 of file dolby_e.c.

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 },
}
static const uint8_t nb_mantissa_38[38]
Definition: dolby_e.c:98

Definition at line 123 of file dolby_e.c.

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 },
}
static const uint8_t nb_mantissa_44[44]
Definition: dolby_e.c:104
static const uint8_t nb_mantissa_38[38]
Definition: dolby_e.c:98

Definition at line 134 of file dolby_e.c.

const DBEGroup grp_tab_3[1]
static
Initial value:
= {
{ 21, { 21 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
}
static const uint8_t nb_mantissa_50[50]
Definition: dolby_e.c:110

Definition at line 144 of file dolby_e.c.

const DBEGroup grp_tab_4[1]
static
Initial value:
= {
{ 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
}
static const uint8_t nb_mantissa_50[50]
Definition: dolby_e.c:110

Definition at line 148 of file dolby_e.c.

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 },
}
static const uint8_t nb_mantissa_38[38]
Definition: dolby_e.c:98

Definition at line 152 of file dolby_e.c.

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 },
}
static const uint8_t nb_mantissa_44[44]
Definition: dolby_e.c:104
static const uint8_t nb_mantissa_38[38]
Definition: dolby_e.c:98

Definition at line 163 of file dolby_e.c.

const DBEGroup grp_tab_7[1]
static
Initial value:
= {
{ 21, { 21 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
}
static const uint8_t nb_mantissa_50[50]
Definition: dolby_e.c:110

Definition at line 173 of file dolby_e.c.

const DBEGroup* const frm_ofs_tab[2][4]
static
Initial value:
= {
}
static const DBEGroup grp_tab_1[8]
Definition: dolby_e.c:123
static const DBEGroup grp_tab_6[7]
Definition: dolby_e.c:163
static const DBEGroup grp_tab_5[8]
Definition: dolby_e.c:152
static const DBEGroup grp_tab_2[7]
Definition: dolby_e.c:134
static const DBEGroup grp_tab_4[1]
Definition: dolby_e.c:148
static const DBEGroup grp_tab_3[1]
Definition: dolby_e.c:144
static const DBEGroup grp_tab_7[1]
Definition: dolby_e.c:173
static const DBEGroup grp_tab_0[1]
Definition: dolby_e.c:119

Definition at line 177 of file dolby_e.c.

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 182 of file dolby_e.c.

Referenced by parse_mantissas().

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 189 of file dolby_e.c.

Referenced by parse_mantissas().

const float start_window[192]
static

Definition at line 196 of file dolby_e.c.

Referenced by init_tables().

const float short_window2[192]
static

Definition at line 249 of file dolby_e.c.

Referenced by init_tables().

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 302 of file dolby_e.c.

Referenced by init_tables().

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

Definition at line 321 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 323 of file dolby_e.c.

Referenced by bit_allocate().

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 325 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 329 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 331 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 335 of file dolby_e.c.

Referenced by bit_allocate().

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 337 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 343 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 415 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 461 of file dolby_e.c.

Referenced by bit_allocate().

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

Definition at line 499 of file dolby_e.c.

Referenced by bit_allocate().

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 554 of file dolby_e.c.

Referenced by calc_lowcomp().

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

Definition at line 568 of file dolby_e.c.

Referenced by calc_lowcomp().

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 572 of file dolby_e.c.

Referenced by log_add().

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 589 of file dolby_e.c.

Referenced by bit_allocate(), and decode_audio_block().

float mantissa_tab1[17][4]
static

Definition at line 596 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

float mantissa_tab2[17][4]
static

Definition at line 597 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

float mantissa_tab3[17][4]
static

Definition at line 598 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

float exponent_tab[50]
static

Definition at line 599 of file dolby_e.c.

Referenced by init_tables(), and parse_mantissas().

float gain_tab[1024]
static

Definition at line 600 of file dolby_e.c.

Referenced by apply_gain(), and init_tables().

float window[3712]
static

Definition at line 602 of file dolby_e.c.

Referenced by init_tables(), and transform().

AVCodec ff_dolby_e_decoder
Initial value:
= {
.name = "dolby_e",
.long_name = NULL_IF_CONFIG_SMALL("Dolby E"),
.priv_data_size = sizeof(DBEDecodeContext),
.close = dolby_e_close,
}
#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:49
float, planar
Definition: samplefmt.h:69
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:104
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
#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:41
static int dolby_e_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dolby_e.c:1078
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
static av_cold int dolby_e_init(AVCodecContext *avctx)
Definition: dolby_e.c:1238
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static av_cold void dolby_e_flush(AVCodecContext *avctx)
Definition: dolby_e.c:1132
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:941
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators...
Definition: codec.h:52
static av_cold int dolby_e_close(AVCodecContext *avctx)
Definition: dolby_e.c:1139

Definition at line 1259 of file dolby_e.c.