[FFmpeg-devel] [PATCH] reduce duplicate data

Stefan Gehrer stefan.gehrer
Thu Jun 26 18:41:32 CEST 2008


Michael Niedermayer wrote:
> 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

commited that one change, the table now is in bitstream.c.

About the other two patches: I will post them again, as I did some
more changes, along with other small cleanups.

Stefan




More information about the ffmpeg-devel mailing list