summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec_data.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-08-03 21:42:43 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-08-03 21:42:43 +0000
commit602116df9b5a5f905b45baa99d4990443ee934c9 (patch)
treeb29a234860c1a6652b5724f71a458878281863e0 /libavcodec/ac3dec_data.c
parent021b8ae39bbd436282a6a428c1d5e65a30ef3d27 (diff)
downloadffmpeg-602116df9b5a5f905b45baa99d4990443ee934c9.tar.gz
Hardcode the table for ungrouping 3 values in 5 bits. It will be reused by
the E-AC-3 decoder. Originally committed as revision 14527 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec_data.c')
-rw-r--r--libavcodec/ac3dec_data.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/ac3dec_data.c b/libavcodec/ac3dec_data.c
index 86e61aa379..a04bbc0c53 100644
--- a/libavcodec/ac3dec_data.c
+++ b/libavcodec/ac3dec_data.c
@@ -27,6 +27,22 @@
#include "ac3dec_data.h"
#include "ac3.h"
+/**
+ * table used to ungroup 3 values stored in 5 bits.
+ * used by bap=1 mantissas and GAQ.
+ * ff_ac3_ungroup_3_in_5_bits_tab[i] = { i/9, (i%9)/3, (i%9)%3 }
+ */
+const uint8_t ff_ac3_ungroup_3_in_5_bits_tab[32][3] = {
+ { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 2 }, { 0, 1, 0 },
+ { 0, 1, 1 }, { 0, 1, 2 }, { 0, 2, 0 }, { 0, 2, 1 },
+ { 0, 2, 2 }, { 1, 0, 0 }, { 1, 0, 1 }, { 1, 0, 2 },
+ { 1, 1, 0 }, { 1, 1, 1 }, { 1, 1, 2 }, { 1, 2, 0 },
+ { 1, 2, 1 }, { 1, 2, 2 }, { 2, 0, 0 }, { 2, 0, 1 },
+ { 2, 0, 2 }, { 2, 1, 0 }, { 2, 1, 1 }, { 2, 1, 2 },
+ { 2, 2, 0 }, { 2, 2, 1 }, { 2, 2, 2 }, { 3, 0, 0 },
+ { 3, 0, 1 }, { 3, 0, 2 }, { 3, 1, 0 }, { 3, 1, 1 }
+};
+
const uint8_t ff_eac3_hebap_tab[64] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 8,
8, 8, 9, 9, 9, 10, 10, 10, 10, 11,