[FFmpeg-devel] [PATCH] use smaller CRC tables for MLP if CONFIG_SMALL

Ramiro Polla ramiro.polla
Fri Oct 16 18:04:38 CEST 2009


On Fri, Oct 16, 2009 at 4:26 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> 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)
> ?{

Applied, thanks...



More information about the ffmpeg-devel mailing list