diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-14 22:40:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-14 22:40:35 +0100 |
commit | d2223ec2bd36aae6a48c90bec3ebe4d0dc2eb421 (patch) | |
tree | a622de19247e24df3ecf9147bd0070733c2d258b | |
parent | 6c44dd6c6ee60aaa706cb4b58db79a8857cda648 (diff) | |
parent | 2a9c6fae927964b5dd0b5d3d9292f5621bd21664 (diff) | |
download | ffmpeg-d2223ec2bd36aae6a48c90bec3ebe4d0dc2eb421.tar.gz |
Merge commit '2a9c6fae927964b5dd0b5d3d9292f5621bd21664'
* commit '2a9c6fae927964b5dd0b5d3d9292f5621bd21664':
dca: Move all tables into dcadata.h
Conflicts:
libavcodec/dcadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/dcadata.h | 89 | ||||
-rw-r--r-- | libavcodec/dcadec.c | 89 |
2 files changed, 89 insertions, 89 deletions
diff --git a/libavcodec/dcadata.h b/libavcodec/dcadata.h index 582f14d532..979b6dffbd 100644 --- a/libavcodec/dcadata.h +++ b/libavcodec/dcadata.h @@ -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 */ diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 28ab7b81c7..2df6178bb0 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -187,86 +187,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 @@ -300,15 +220,6 @@ static av_always_inline int get_bitalloc(GetBitContext *gb, BitAlloc *ba, static float dca_dmix_code(unsigned code); -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; |