[FFmpeg-devel] [PATCH 3/3] two functions were declared inlinebut were referenced elsewhere

Michael Niedermayer michaelni at gmx.at
Thu Jun 14 02:09:13 CEST 2012

On Thu, Jun 14, 2012 at 01:16:16AM +0200, J. Bohl wrote:
> Hi,
> >iam a bit affraid this could cause a slowdown. did you check what
> effect this change has 
> >on compilers supporting the code currently ?
> No, sorry I am not able to quantify the impact of this change at this
> point. At least not with tangible numbers, with a quick transcoding run
> (Linux x86, gcc4.6) I didn't notice a (significant) difference.
> Maybe you like the attached revised patch better - having two functions,
> one that is attributed inline and one for external reference.
> >changing all MANGLE() to "m" will break compilation on several
> compilers
> Yeah, I understand this. And cluttering the code with #ifdef's would be
> a mess I suppose. OK, then can't help it.
> >isnt icc able to optimize this out with some command line switches ?
> >under linux ICC is able to do such elimination of calls ...
> >if it really doesnt work its maybe worth to report to intel if it hasnt
> been reported yet. Intel 
> >is likely interrested to improve ICCs dead code elimination.
> Good idea, I didn't think of that. I'll check this out. I seem to
> remember that it is a compatibility issue (compatibility with the
> Microsoft compiler).
> Regards,
> Juergen

>  motion_est.c          |   27 ++++++++++++++++++++-------
>  motion_est_template.c |    4 ++--
>  2 files changed, 22 insertions(+), 9 deletions(-)
> dd4877673d834fdafc7b9ca55debd9385da11625  0004-revised-patch-for-ff_get_mb_score-ff_epzs_motion_sea.patch
> From fedc50c96aa9d909bc2e93566c77643b82235455 Mon Sep 17 00:00:00 2001
> From: "J. Bohl" <jbohl at h-quer.de>
> Date: Thu, 14 Jun 2012 00:31:28 +0200
> Subject: [PATCH 4/4] revised patch for ff_get_mb_score &
>  ff_epzs_motion_search declared inline, but referenced
>  elsewhere

I think it would be better to have a
av_extern_inline and something like:

#ifndef av_extern_inline
# if whatever
#  define av_extern_inline
# else
#  define av_extern_inline inline
# endif

in libavutil/attributes.h

The semantics simply differ a bit between C99, and various compilers
In theory we could use extern inline but i doubt it would work with
all compilers.



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120614/742ee689/attachment.asc>

More information about the ffmpeg-devel mailing list