diff options
author | foo86 <foobaz86@gmail.com> | 2016-04-27 10:20:20 -0700 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-05-01 00:13:41 -0300 |
commit | b286ff69c03e648453fd161f8ff1c4fcce396fa8 (patch) | |
tree | ef80a486b59f26689f20a13c8f177b4c2389b166 /libavcodec/dcaenc.h | |
parent | de28e73cce03b1de8b63683b70e4d0241161cca1 (diff) | |
download | ffmpeg-b286ff69c03e648453fd161f8ff1c4fcce396fa8.tar.gz |
avcodec/dcaenc: move channel reordering tables to dcaenc.h
DCA core decoder no longer uses fixed tables for channel reordering.
Move them into private encoder header (and drop ff_dca_ prefix).
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dcaenc.h')
-rw-r--r-- | libavcodec/dcaenc.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libavcodec/dcaenc.h b/libavcodec/dcaenc.h index bafc3c00d2..eccfb42321 100644 --- a/libavcodec/dcaenc.h +++ b/libavcodec/dcaenc.h @@ -103,4 +103,46 @@ static const int bit_consumption[27] = { 272, 288, 304, 320, 336, 352, 368, }; +static const int8_t lfe_index[16] = { + 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3 +}; + +static const int8_t channel_reorder_lfe[16][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 channel_reorder_nolfe[16][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 }, +}; + #endif /* AVCODEC_DCAENC_H */ |