1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

dca: Move all tables into dcadata.h

This commit is contained in:
Diego Biurrun 2014-09-22 18:05:40 +02:00
parent 8a213179af
commit 2a9c6fae92
2 changed files with 89 additions and 89 deletions

View File

@ -7663,4 +7663,93 @@ static const float dca_default_coeffs[10][6][2] = {
* where Ch(n) represents the subband samples in the (n)th audio channel.
*/
static const int8_t dca_lfe_index[] = {
1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3
};
static const int8_t dca_channel_reorder_lfe[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_lfe_xch[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_nolfe[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_nolfe_xch[][9] = {
{ 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 },
};
static const uint16_t dca_vlc_offs[] = {
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,
};
#endif /* AVCODEC_DCADATA_H */

View File

@ -125,86 +125,6 @@ static const uint64_t dca_core_channel_layout[] = {
AV_CH_SIDE_LEFT | AV_CH_BACK_CENTER | AV_CH_SIDE_RIGHT, ///< 8, CL + C + CR + L + R + SL + S + SR
};
static const int8_t dca_lfe_index[] = {
1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3
};
static const int8_t dca_channel_reorder_lfe[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_lfe_xch[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_nolfe[][9] = {
{ 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 },
};
static const int8_t dca_channel_reorder_nolfe_xch[][9] = {
{ 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 },
};
#define DCA_DOLBY 101 /* FIXME */
#define DCA_CHANNEL_BITS 6
@ -236,15 +156,6 @@ static av_always_inline int get_bitalloc(GetBitContext *gb, BitAlloc *ba,
ba->offset;
}
static const uint16_t dca_vlc_offs[] = {
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,
};
static av_cold void dca_init_vlcs(void)
{
static int vlcs_initialized = 0;