[FFmpeg-devel] [PATCH] reduce duplicate data

Michael Niedermayer michaelni
Wed Jun 25 17:30:00 CEST 2008


On Wed, Jun 25, 2008 at 05:23:18PM +0200, Stefan Gehrer wrote:
> Three new patches to reduce duplicate data:
>
> mpegaudiotab.diff:
>
> remove alloc_table_0 as it is a duplicate of alloc_table_1,
> only 12 bytes shorter
>
> ff_log2run.diff
>
> move ff_log2_run from jpegls to utils and reuse it in ffv1
>
> h261cleanup.diff
>
> h261dec.c and h261enc.c both included h261data.h thus duplicating
> all data in it. The patch moves the include to h261.c instead and
> makes tables non-static if necessary.
>
> Stefan

> Index: libavcodec/utils.c
> ===================================================================
> --- libavcodec/utils.c	(revision 13964)
> +++ libavcodec/utils.c	(working copy)
> @@ -57,6 +57,13 @@
>  0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF,
>  };
>  
> +const uint8_t ff_log2_run[32]={
> + 0, 0, 0, 0, 1, 1, 1, 1,
> + 2, 2, 2, 2, 3, 3, 3, 3,
> + 4, 4, 5, 5, 6, 6, 7, 7,
> + 8, 9,10,11,12,13,14,15
> +};
> +

bitstream.c seems a better place than utils.c

except that patch ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080625/18ab25e0/attachment.pgp>



More information about the ffmpeg-devel mailing list