# HG changeset patch # User aurel # Date 1177539171 0 # Node ID 60603c9c89d1682ecf7eb184348dcaf393cc36c9 # Parent 0e38c828bdae1761fa5b10c57b80a46b6fcbc0d5 move ac3 tables from a .h to a .c diff -r 0e38c828bdae -r 60603c9c89d1 Makefile --- a/Makefile Wed Apr 25 19:13:09 2007 +0000 +++ b/Makefile Wed Apr 25 22:12:51 2007 +0000 @@ -47,7 +47,7 @@ HEADERS = avcodec.h opt.h OBJS-$(CONFIG_AASC_DECODER) += aasc.o -OBJS-$(CONFIG_AC3_ENCODER) += ac3enc.o ac3.o +OBJS-$(CONFIG_AC3_ENCODER) += ac3enc.o ac3tab.o ac3.o OBJS-$(CONFIG_ALAC_DECODER) += alac.o OBJS-$(CONFIG_ASV1_DECODER) += asv1.o OBJS-$(CONFIG_ASV1_ENCODER) += asv1.o @@ -273,7 +273,7 @@ OBJS-$(CONFIG_AAC_PARSER) += parser.o -OBJS-$(CONFIG_AC3_PARSER) += parser.o ac3.o +OBJS-$(CONFIG_AC3_PARSER) += parser.o ac3tab.o OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs.o parser.o OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsubdec.o OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsubdec.o diff -r 0e38c828bdae -r 60603c9c89d1 ac3.c --- a/ac3.c Wed Apr 25 19:13:09 2007 +0000 +++ b/ac3.c Wed Apr 25 22:12:51 2007 +0000 @@ -26,9 +26,11 @@ #include "avcodec.h" #include "ac3.h" -#include "ac3tab.h" #include "bitstream.h" +static uint8_t bndtab[51]; +static uint8_t masktab[253]; + static inline int calc_lowcomp1(int a, int b0, int b1, int c) { if ((b0 + 256) == b1) { @@ -70,7 +72,7 @@ for(i=j;i> 1, 255); - v = FFMAX(v, psd[j]) + latab[adr]; + v = FFMAX(v, psd[j]) + ff_ac3_latab[adr]; j++; } bndpsd[k]=v; @@ -147,7 +149,7 @@ if (tmp > 0) { excite[bin] += tmp >> 2; } - mask[bin] = FFMAX(hth[bin >> s->halfratecod][s->fscod], excite[bin]); + mask[bin] = FFMAX(ff_ac3_hth[bin >> s->halfratecod][s->fscod], excite[bin]); } /* delta bit allocation */ @@ -185,10 +187,10 @@ j = masktab[start]; do { v = (FFMAX(mask[j] - snroffset - floor, 0) & 0x1FE0) + floor; - end1 = FFMIN(bndtab[j] + bndsz[j], end); + end1 = FFMIN(bndtab[j] + ff_ac3_bndsz[j], end); for (k = i; k < end1; k++) { address = av_clip((psd[i] - v) >> 5, 0, 63); - bap[i] = baptab[address]; + bap[i] = ff_ac3_baptab[address]; i++; } } while (end > bndtab[j++]); @@ -229,7 +231,7 @@ l = 0; for(i=0;i<50;i++) { bndtab[i] = l; - v = bndsz[i]; + v = ff_ac3_bndsz[i]; for(j=0;j