[FFmpeg-devel] [PATCH] Move H.264 DSP functions from dsputil.c to h264dsp.c

Panagiotis Issaris takis.issaris
Sat Jul 28 13:00:42 CEST 2007


Hi,

Panagiotis Issaris wrote:
> Panagiotis Issaris wrote:
>   
>> Panagiotis Issaris wrote:
>>   
>>     
>>>> Michael Niedermayer wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> Hi
>>>>>
>>>>> On Fri, Jul 27, 2007 at 06:04:18PM +0200, Panagiotis Issaris wrote:
>>>>> [...]    
>>>>>       
>>>>>         
>>>>>           
>>>>>> Ouch, I just noticed that with this patch I had accidentally moved lots
>>>>>> of the H.264 decoder DSP code in a file with a different header,
>>>>>> resulting in incorrect "Copyright by ..." lines.
>>>>>>
>>>>>> Is it okay to just merge the "Copyright by ..." lines? Or would it be
>>>>>> better to split the h264dsp.c file right away in a h264dspenc.c and
>>>>>> h264dspdec.c as Aurelien suggested?
>>>>>>     
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> IMHO split if possible
>>>>>
>>>>> [...]
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> I'd like to start with renaming h264dsp.c to h264dspenc.c. So that would be:
>>>> svn mv h264dsp.c h264dspenc.c and the attached patch. Okay to commit?
>>>>
>>>>  Makefile  |    2 -
>>>>  h264dsp.c |   81
>>>> --------------------------------------------------------------
>>>>  2 files changed, 1 insertion(+), 82 deletions(-) 
>>>>     
>>>>       
>>>>         
>>> The previous patch would then be followed by this one, which takes care of
>>> some renames after the previous pure rename patch.
>>>   
>>>     
>>>       
>> Next, the attached patch moves the H.264 decoder DSP functions out of dsputil into a separate file called h264dspdec.c.
>>
>> Tested with ./configure --enable-gpl and ./configure --enable-gpl --disable-decoder=h264
>>
>>  Makefile     |    2
>>  dsputil.c    |  321 -----------------------------------------------------
>>  h264dspdec.c |  355 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 360 insertions(+), 318 deletions(-)
>>   
>>     
>
> The two attached patches remove the #ifdef below and reindent afterwards
> in a separate patch.
>   

The attached patches moves four more calls of H.264 related functions
from dsputil.c to h264dspdec.c. The second
patch reindents after the first patch.

Move:
 dsputil.c    |    7 -------
 h264dspdec.c |    5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

Reindent:
 h264dspdec.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)



Without these patches:
./configure --enable-gpl
   text    data     bss     dec     hex filename
 329995       0    4484  334479   51a8f libavcodec/dsputil.o
4540053   45484 1023936 5609473  559801 ffmpeg

./configure --enable-gpl --disable-decoder=h264
   text    data     bss     dec     hex filename
 329931       0    4484  334415   51a4f libavcodec/dsputil.o
4539989   45484 1023904 5609377  5597a1 ffmpeg



With all the patches in this thread applied the impact is as follows:

./configure --enable-gpl
   text    data     bss     dec     hex filename
 303755       0    4484  308239   4b40f libavcodec/dsputil.o
4540126   45484 1023936 5609546  55984a ffmpeg

./configure --enable-gpl --disable-decoder=h264
   text    data     bss     dec     hex filename
 303707       0    4484  308191   4b3df libavcodec/dsputil.o
4513765   45484 1023904 5583153  553131 ffmpeg


So, disabling the H.264 decoder now saves 26361 bytes in the text segment,
while before these patches it would only save 64 bytes. If the H.264 encoder
is enabled the text segment is only incremented by 73 bytes when compared to
the state without these patches.



With friendly regards,
Takis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070728T124746-ffmpeg-move_more_h264_functions_to_h264dspdec.diff
Type: text/x-patch
Size: 1321 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070728/b59d17c4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070728T124959-ffmpeg-reindent.diff
Type: text/x-patch
Size: 838 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070728/b59d17c4/attachment-0001.bin>



More information about the ffmpeg-devel mailing list