[FFmpeg-devel] [RFC] move wmv2.c to its own file

Denis Fortin fortin
Sat Jun 9 14:53:43 CEST 2007

Michael Niedermayer a ?crit :
> Hi
> On Thu, Jun 07, 2007 at 09:33:23PM +0200, Denis Fortin wrote:
>>>>> Attached is a patch which moves code_012 to ff_code012 (and nothing 
>>>>> else). It's just a reminder for Diego's patch and i don't expect to see 
>>>>> mine applied.
>>>>> Denis
>>>> Here's another patch to export two other functions i used in vc1 encoder 
>>>> (no more needed for the moment).
>>>> Denis
>>>> Index: libavcodec/msmpeg4.c
>>>> ===================================================================
>>>> --- libavcodec/msmpeg4.c	(r??vision 9235)
>>>> +++ libavcodec/msmpeg4.c	(copie de travail)
>>>> @@ -61,7 +61,7 @@
>>>>  static uint32_t v2_dc_lum_table[512][2];
>>>>  static uint32_t v2_dc_chroma_table[512][2];
>>>> -static inline void msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
>>>> +inline void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
>>> its extern inline IIRC and gcc does not support it IIRC
>> I'm not sure to understand what you meant:
>> should i remove the inline ?
> ISO C:
> If all of the
> file scope declarations for a function in a translation unit include the inline function
> specifer without extern, then the definition in that translation unit is an inline
> definition. An inline definition does not provide an external definition for the function,
> -> you cannot use a inline void ff_msmpeg4_encode_block() from another
> source/object file
> it works with gcc only because gcc does not implement inline correctly
> in gcc "inline" is some sort of randomly ignoreable keyword
> also simply removing inline would require some benchmarks ...

I tried compiling with and without inline (version gcc 4.0.4 20060904):

ed519eaca0e75617f6f0bf6f93395f5b94a2d62a  ffmpeg_inline
ed519eaca0e75617f6f0bf6f93395f5b94a2d62a  ffmpeg_noinline

FWIW benchmarks (1500 frames) :
inline :
bench: utime=17.829s
bench: utime=17.681s
bench: utime=18.637s
bench: utime=17.709s
bench: utime=17.961s
bench: utime=18.021s
bench: utime=17.989s
bench: utime=21.597s
bench: utime=18.349s
bench: utime=17.973s

noinline :
bench: utime=17.845s
bench: utime=17.813s
bench: utime=17.797s
bench: utime=17.881s
bench: utime=17.661s
bench: utime=17.909s
bench: utime=17.801s
bench: utime=17.801s
bench: utime=18.221s
bench: utime=17.845s

I guess in this case inline keyword is ignored.


More information about the ffmpeg-devel mailing list