aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-06-08 21:09:02 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-06-08 21:09:02 +0000
commit227322b837e0546c2179729f35e87c7da364b410 (patch)
treeb4e7421afc57d03eaff7525f4edf18c861bc724c
parent7ed9a2ea5060668759473d0481ecd987913cd1f6 (diff)
downloadffmpeg-227322b837e0546c2179729f35e87c7da364b410.tar.gz
move rematrixing band table to ac3dec_data.c
Originally committed as revision 13716 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3dec.c11
-rw-r--r--libavcodec/ac3dec_data.c6
-rw-r--r--libavcodec/ac3dec_data.h2
3 files changed, 11 insertions, 8 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 627e38cecb..9bdfacdf42 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -39,16 +39,11 @@
#include "bitstream.h"
#include "dsputil.h"
#include "ac3dec.h"
+#include "ac3dec_data.h"
/** Maximum possible frame size when the specification limit is ignored */
#define AC3_MAX_FRAME_SIZE 21695
-/**
- * Table of bin locations for rematrixing bands
- * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions
- */
-static const uint8_t rematrix_band_tab[5] = { 13, 25, 37, 61, 253 };
-
/** table for grouping exponents */
static uint8_t exp_ungroup_tab[128][3];
@@ -579,8 +574,8 @@ static void do_rematrixing(AC3DecodeContext *s)
for(bnd=0; bnd<s->num_rematrixing_bands; bnd++) {
if(s->rematrixing_flags[bnd]) {
- bndend = FFMIN(end, rematrix_band_tab[bnd+1]);
- for(i=rematrix_band_tab[bnd]; i<bndend; i++) {
+ bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]);
+ for(i=ff_ac3_rematrix_band_tab[bnd]; i<bndend; i++) {
tmp0 = s->fixed_coeffs[1][i];
tmp1 = s->fixed_coeffs[2][i];
s->fixed_coeffs[1][i] = tmp0 + tmp1;
diff --git a/libavcodec/ac3dec_data.c b/libavcodec/ac3dec_data.c
index 0c498b0acc..ce361e48c6 100644
--- a/libavcodec/ac3dec_data.c
+++ b/libavcodec/ac3dec_data.c
@@ -1109,3 +1109,9 @@ const uint8_t ff_eac3_frm_expstr[32][6] = {
*/
const uint8_t ff_eac3_default_cpl_band_struct[18] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 };
+
+/**
+ * Table of bin locations for rematrixing bands
+ * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions
+ */
+const uint8_t ff_ac3_rematrix_band_tab[5] = { 13, 25, 37, 61, 253 };
diff --git a/libavcodec/ac3dec_data.h b/libavcodec/ac3dec_data.h
index 01d910d039..7cbb945269 100644
--- a/libavcodec/ac3dec_data.h
+++ b/libavcodec/ac3dec_data.h
@@ -34,4 +34,6 @@ extern const int16_t (*ff_eac3_vq_hebap[8])[6];
extern const uint8_t ff_eac3_frm_expstr[32][6];
extern const uint8_t ff_eac3_default_cpl_band_struct[18];
+extern const uint8_t ff_ac3_rematrix_band_tab[5];
+
#endif /* FFMPEG_AC3DEC_DATA_H */