aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-16 16:03:26 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2009-10-16 16:03:26 +0000
commit33815fa106853d031e633dd9df50d628da5592b2 (patch)
tree87441cb18e139db7663fdc4f767c58dec4431302 /libavcodec
parent45fc24a005c170b3fea1c028a49fdb6be61875bd (diff)
downloadffmpeg-33815fa106853d031e633dd9df50d628da5592b2.tar.gz
mlp: Use smaller CRC tables if CONFIG_SMALL.
Patch by Reimar. Originally committed as revision 20253 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mlp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/mlp.c b/libavcodec/mlp.c
index a290e465e5..87f7c77139 100644
--- a/libavcodec/mlp.c
+++ b/libavcodec/mlp.c
@@ -42,9 +42,14 @@ const uint8_t ff_mlp_huffman_tables[3][18][2] = {
};
static int crc_init = 0;
-static AVCRC crc_63[1024];
-static AVCRC crc_1D[1024];
-static AVCRC crc_2D[1024];
+#if CONFIG_SMALL
+#define CRC_TABLE_SIZE 257
+#else
+#define CRC_TABLE_SIZE 1024
+#endif
+static AVCRC crc_63[CRC_TABLE_SIZE];
+static AVCRC crc_1D[CRC_TABLE_SIZE];
+static AVCRC crc_2D[CRC_TABLE_SIZE];
av_cold void ff_mlp_init_crc(void)
{