FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
dcadata.c File Reference
#include <stdint.h>
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "dca.h"
#include "dcadata.h"

Go to the source code of this file.

Macros

#define SCALE(c)   ((c) / (256.0f * 32768.0f))
 

Variables

const uint32_t ff_dca_bit_rates [32]
 
const uint8_t ff_dca_channels [16]
 
const uint8_t ff_dca_bits_per_sample [7]
 
const int16_t ff_dca_adpcm_vb [4096][4]
 
const uint32_t ff_dca_scale_factor_quant6 [64]
 
const uint32_t ff_dca_scale_factor_quant7 [128]
 
const uint32_t ff_dca_lossy_quant [32]
 
const float ff_dca_lossy_quant_d [32]
 
const uint32_t ff_dca_lossless_quant [32]
 
const float ff_dca_lossless_quant_d [32]
 
const int8_t ff_dca_high_freq_vq [1024][32]
 
const float ff_dca_fir_32bands_perfect [512]
 
const float ff_dca_fir_32bands_nonperfect [512]
 
const float ff_dca_lfe_fir_64 [256]
 
const float ff_dca_lfe_fir_128 [256]
 
const uint16_t ff_dca_dmixtable [242]
 
const float ff_dca_default_coeffs [10][6][2]
 
const uint32_t ff_dca_map_xxch_to_native [28]
 
const int ff_dca_ext_audio_descr_mask [8]
 
const uint64_t ff_dca_core_channel_layout [16]
 
const int8_t ff_dca_lfe_index [16]
 
const int8_t ff_dca_channel_reorder_lfe [16][9]
 
const int8_t ff_dca_channel_reorder_lfe_xch [16][9]
 
const int8_t ff_dca_channel_reorder_nolfe [16][9]
 
const int8_t ff_dca_channel_reorder_nolfe_xch [16][9]
 
const uint16_t ff_dca_vlc_offs [63]
 

Macro Definition Documentation

#define SCALE (   c)    ((c) / (256.0f * 32768.0f))

Definition at line 7301 of file dcadata.c.

Referenced by avfilter_register_all().

Variable Documentation

const uint32_t ff_dca_bit_rates[32]
Initial value:
= {
32000, 56000, 64000, 96000, 112000, 128000,
192000, 224000, 256000, 320000, 384000,
448000, 512000, 576000, 640000, 768000,
896000, 1024000, 1152000, 1280000, 1344000,
1408000, 1411200, 1472000, 1536000, 1920000,
2048000, 3072000, 3840000, 1 , 2 , 3
}

Definition at line 33 of file dcadata.c.

Referenced by dca_parse_frame_header(), and encode_init().

const uint8_t ff_dca_channels[16]
Initial value:
= {
1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8
}

Definition at line 42 of file dcadata.c.

Referenced by dca_downmix(), and dca_subframe_footer().

const uint8_t ff_dca_bits_per_sample[7]
Initial value:
= {
16, 16, 20, 20, 0, 24, 24
}

Definition at line 46 of file dcadata.c.

const int16_t ff_dca_adpcm_vb[4096][4]

Definition at line 53 of file dcadata.c.

Referenced by dca_subsubframe().

const uint32_t ff_dca_scale_factor_quant6[64]
Initial value:
= {
1, 2, 2, 3, 3, 4, 6, 7,
10, 12, 16, 20, 26, 34, 44, 56,
72, 93, 120, 155, 200, 257, 331, 427,
550, 708, 912, 1175, 1514, 1950, 2512, 3236,
4169, 5370, 6918, 8913, 11482, 14791, 19055, 24547,
31623, 40738, 52481, 67608, 87096, 112202, 144544, 186209,
239883, 309030, 398107, 512861, 660693, 851138, 1096478, 1412538,
1819701, 2344229, 3019952, 3890451, 5011872, 6456542, 8317638, 0
}

Definition at line 4154 of file dcadata.c.

Referenced by dca_subframe_header(), and ff_dca_xbr_parse_frame().

const uint32_t ff_dca_scale_factor_quant7[128]
Initial value:
= {
1, 1, 2, 2, 2, 2, 3, 3,
3, 4, 4, 5, 6, 7, 7, 8,
10, 11, 12, 14, 16, 18, 20, 23,
26, 30, 34, 38, 44, 50, 56, 64,
72, 82, 93, 106, 120, 136, 155, 176,
200, 226, 257, 292, 331, 376, 427, 484,
550, 624, 708, 804, 912, 1035, 1175, 1334,
1514, 1718, 1950, 2213, 2512, 2851, 3236, 3673,
4169, 4732, 5370, 6095, 6918, 7852, 8913, 10116,
11482, 13032, 14791, 16788, 19055, 21627, 24547, 27861,
31623, 35892, 40738, 46238, 52481, 59566, 67608, 76736,
87096, 98855, 112202, 127350, 144544, 164059, 186209, 211349,
239883, 272270, 309030, 350752, 398107, 451856, 512861, 582103,
660693, 749894, 851138, 966051, 1096478, 1244515, 1412538, 1603245,
1819701, 2065380, 2344229, 2660725, 3019952, 3427678, 3890451, 4415704,
5011872, 5688529, 6456542, 7328245, 8317638, 0, 0, 0
}

Definition at line 4165 of file dcadata.c.

Referenced by dca_subframe_header(), and ff_dca_xbr_parse_frame().

const uint32_t ff_dca_lossy_quant[32]
Initial value:
= {
0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,
796918, 461373, 251658, 146801, 79692, 46137, 27263, 16777,
10486, 5872, 3355, 1887, 1258, 713, 336, 168,
84, 42, 21, 0, 0, 0, 0, 0
}

Definition at line 4185 of file dcadata.c.

const float ff_dca_lossy_quant_d[32]
Initial value:
= {
0, 1.6, 1.0, 0.8, 0.59, 0.50, 0.42, 0.34,
0.19, 0.11, 0.06, 0.035, 0.019, 0.011, 0.0065, 0.0040,
0.0025, 0.0014, 0.0008, 0.00045, 0.00030, 0.00017, 0.00008, 0.00004,
0.00002, 0.00001, 0.000005, 0, 0, 0, 0, 0
}

Definition at line 4192 of file dcadata.c.

Referenced by dca_subsubframe().

const uint32_t ff_dca_lossless_quant[32]
Initial value:
= {
0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,
262144, 131072, 65431, 33026, 16450, 8208, 4100, 2049,
1024, 512, 256, 128, 64, 32, 16, 8,
4, 2, 1, 0, 0, 0, 0, 0
}

Definition at line 4200 of file dcadata.c.

const float ff_dca_lossless_quant_d[32]
Initial value:
= {
0, 1.0, 0.5, 0.33, 0.25, 0.166, 0.125,
0.083, 0.0625, 0.03125, 0.0156, 7.874E-3, 3.922E-3, 1.957E-3,
9.775E-4, 4.885E-4, 2.442E-4, 1.221E-4, 6.104E-5, 3.052E-5, 1.526E-5,
7.629E-6, 3.815E-6, 1.907E-6, 9.537E-7, 4.768E-7, 2.384E-7, 0,
0, 0, 0, 0
}

Definition at line 4207 of file dcadata.c.

Referenced by dca_subsubframe(), and ff_dca_xbr_parse_frame().

const int8_t ff_dca_high_freq_vq[1024][32]

Definition at line 4217 of file dcadata.c.

Referenced by dca_subsubframe().

const float ff_dca_fir_32bands_perfect[512]

Definition at line 6270 of file dcadata.c.

Referenced by encode_init(), and qmf_32_subbands().

const float ff_dca_fir_32bands_nonperfect[512]

Definition at line 6785 of file dcadata.c.

Referenced by encode_init(), and qmf_32_subbands().

const float ff_dca_lfe_fir_64[256]

Definition at line 7302 of file dcadata.c.

Referenced by encode_init(), and lfe_interpolation_fir().

const float ff_dca_lfe_fir_128[256]

Definition at line 7433 of file dcadata.c.

Referenced by lfe_interpolation_fir().

const uint16_t ff_dca_dmixtable[242]

Definition at line 7513 of file dcadata.c.

Referenced by dca_dmix_code().

const float ff_dca_default_coeffs[10][6][2]
Initial value:
= {
{ { 0.707107, 0.707107 }, { 0.000000, 0.000000 }, },
{ { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, { 0.000000, 0.000000 }, },
{ { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, { 0.000000, 0.000000 }, },
{ { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, { 0.000000, 0.000000 }, },
{ { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, { 0.000000, 0.000000 }, },
{ { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.000000, 0.000000 }, },
{ { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.501187 }, { 0.000000, 0.000000 }, },
{ { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.501187 }, { 0.000000, 0.000000 }, },
{ { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.000000 }, { 0.000000, 0.501187 }, { 0.000000, 0.000000 }, },
{ { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.000000 }, { 0.000000, 0.501187 }, { 0.000000, 0.000000 }, },
}

Definition at line 7547 of file dcadata.c.

Referenced by dca_decode_frame().

const uint32_t ff_dca_map_xxch_to_native[28]
const int ff_dca_ext_audio_descr_mask[8]
Initial value:

Definition at line 7699 of file dcadata.c.

Referenced by dca_decode_frame().

const uint64_t ff_dca_core_channel_layout[16]

Definition at line 7719 of file dcadata.c.

Referenced by dca_decode_frame().

const int8_t ff_dca_lfe_index[16]
Initial value:
= {
1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3
}

Definition at line 7756 of file dcadata.c.

Referenced by dca_decode_frame(), and dca_downmix().

const int8_t ff_dca_channel_reorder_lfe[16][9]
Initial value:
= {
{ 0, -1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, -1, -1, -1, -1, -1 },
{ 0, 1, 3, 4, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, -1, -1, -1, -1 },
{ 3, 4, 0, 1, 5, 6, -1, -1, -1 },
{ 2, 0, 1, 4, 5, 6, -1, -1, -1 },
{ 0, 6, 4, 5, 2, 3, -1, -1, -1 },
{ 4, 2, 5, 0, 1, 6, 7, -1, -1 },
{ 5, 6, 0, 1, 7, 3, 8, 4, -1 },
{ 4, 2, 5, 0, 1, 6, 8, 7, -1 },
}

Definition at line 7760 of file dcadata.c.

Referenced by dca_decode_frame().

const int8_t ff_dca_channel_reorder_lfe_xch[16][9]
Initial value:
= {
{ 0, 2, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 3, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, -1, -1, -1, -1, -1 },
{ 0, 1, 3, 4, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, -1, -1, -1, -1 },
{ 0, 1, 4, 5, 3, -1, -1, -1, -1 },
{ 2, 0, 1, 5, 6, 4, -1, -1, -1 },
{ 3, 4, 0, 1, 6, 7, 5, -1, -1 },
{ 2, 0, 1, 4, 5, 6, 7, -1, -1 },
{ 0, 6, 4, 5, 2, 3, 7, -1, -1 },
{ 4, 2, 5, 0, 1, 7, 8, 6, -1 },
{ 5, 6, 0, 1, 8, 3, 9, 4, 7 },
{ 4, 2, 5, 0, 1, 6, 9, 8, 7 },
}

Definition at line 7779 of file dcadata.c.

Referenced by dca_decode_frame().

const int8_t ff_dca_channel_reorder_nolfe[16][9]
Initial value:
= {
{ 0, -1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, -1, -1, -1, -1, -1 },
{ 0, 1, 2, 3, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, 4, -1, -1, -1, -1 },
{ 2, 3, 0, 1, 4, 5, -1, -1, -1 },
{ 2, 0, 1, 3, 4, 5, -1, -1, -1 },
{ 0, 5, 3, 4, 1, 2, -1, -1, -1 },
{ 3, 2, 4, 0, 1, 5, 6, -1, -1 },
{ 4, 5, 0, 1, 6, 2, 7, 3, -1 },
{ 3, 2, 4, 0, 1, 5, 7, 6, -1 },
}

Definition at line 7798 of file dcadata.c.

Referenced by dca_decode_frame().

const int8_t ff_dca_channel_reorder_nolfe_xch[16][9]
Initial value:
= {
{ 0, 1, -1, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 0, 1, 2, -1, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, -1, -1, -1, -1, -1 },
{ 0, 1, 2, 3, -1, -1, -1, -1, -1 },
{ 2, 0, 1, 3, 4, -1, -1, -1, -1 },
{ 0, 1, 3, 4, 2, -1, -1, -1, -1 },
{ 2, 0, 1, 4, 5, 3, -1, -1, -1 },
{ 2, 3, 0, 1, 5, 6, 4, -1, -1 },
{ 2, 0, 1, 3, 4, 5, 6, -1, -1 },
{ 0, 5, 3, 4, 1, 2, 6, -1, -1 },
{ 3, 2, 4, 0, 1, 6, 7, 5, -1 },
{ 4, 5, 0, 1, 7, 2, 8, 3, 6 },
{ 3, 2, 4, 0, 1, 5, 8, 7, 6 },
}

Definition at line 7817 of file dcadata.c.

Referenced by dca_decode_frame().

const uint16_t ff_dca_vlc_offs[63]
Initial value:
= {
0, 512, 640, 768, 1282, 1794, 2436, 3080, 3770, 4454, 5364,
5372, 5380, 5388, 5392, 5396, 5412, 5420, 5428, 5460, 5492, 5508,
5572, 5604, 5668, 5796, 5860, 5892, 6412, 6668, 6796, 7308, 7564,
7820, 8076, 8620, 9132, 9388, 9910, 10166, 10680, 11196, 11726, 12240,
12752, 13298, 13810, 14326, 14840, 15500, 16022, 16540, 17158, 17678, 18264,
18796, 19352, 19926, 20468, 21472, 22398, 23014, 23622,
}

Definition at line 7836 of file dcadata.c.

Referenced by dca_init_vlcs().