[FFmpeg-devel] [PATCH] use smaller CRC tables for MLP if CONFIG_SMALL
Reimar Döffinger
Reimar.Doeffinger
Fri Oct 16 09:26:33 CEST 2009
Hello,
our CRC implementation can use ca. 1kB or ca. 4kB lookup tables.
This changes mlp.c to use the smaller one if CONFIG_SMALL is set.
Index: mlp.c
===================================================================
--- mlp.c (revision 20245)
+++ mlp.c (working copy)
@@ -42,9 +42,14 @@
};
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)
{
More information about the ffmpeg-devel
mailing list