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

Panagiotis Issaris takis.issaris
Sat Jul 28 12:47:25 CEST 2007


Hi,

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.

I can of course also commit this together with the previous patch so
there would never have been
the #ifdef in the first place. The reason I didn't do that is that I
prefer to have the #ifdef somewhere in svn history.
But that's just my personal opinion.

> ------------------------------------------------------------------------
> @@ -4055,6 +3747,9 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
>  #if defined(CONFIG_H264_ENCODER)
>      ff_h264dspenc_init(c,avctx);
>  #endif
> +#if defined(CONFIG_H264_DECODER)
> +    ff_h264dspdec_init(c,avctx);
> +#endif
>   
 dsputil.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

 dsputil.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

With friendly regards,
Takis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070728T124031-ffmpeg-remove_one_ifdef.diff
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070728/7134b9d1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pi-20070728T124130-ffmpeg-reindent_after_removal_of_ifdef.diff
Type: text/x-patch
Size: 469 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070728/7134b9d1/attachment-0001.bin>



More information about the ffmpeg-devel mailing list