[Ffmpeg-devel] [PATCH] Getting rid of inlining failure warnings

Michael Niedermayer michaelni
Thu Nov 9 17:36:48 CET 2006


Hi

On Thu, Nov 09, 2006 at 04:59:10PM +0100, Panagiotis Issaris wrote:
> Hi,
> 
> On Thu, 2006-11-09 at 16:32 +0100, Michael Niedermayer wrote:
> >[...]
> > > Regression tests succeed. As inlining already failed, removing the
> > > specifier should have no performance impact (at least on all compilers
> > > where the same inlining warnings would have appeared...)
> > 
> > the warnings often are specific to function X in Y and dont mean X is never
> > inlined
> Ouch! You are right, it is of course call specific... But, is there
> another way to get rid of these warnings? I guess by first verifying all
> the reasons for the warnings, addressing them as suggested below and
> then removing the -Winline flag?

yes, lots of work


> 
> > [...]
> > > @@ -4699,7 +4699,7 @@
> > >      d->qscale= s->qscale;
> > >  }
> > >  
> > > -static inline void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegEncContext *best, int type,
> > > +static void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegEncContext *best, int type,
> > >                             PutBitContext pb[2], PutBitContext pb2[2], PutBitContext tex_pb[2],
> > >                             int *dmin, int *next_block, int motion_x, int motion_y)
> > 
> > ok, this is called from too many spots
> Hmm. If it is called from very many different places wouldn't you expect
> the performance to decrease because of increased code-size (caches)? Or
> is it called many times from different spots in _different files_ so the
> actively run code size at one specific time will not increase? I guess
> benchmarking is the only way to find out, but I'm interested in your
> reasoning about this.

both, some calls will only be used for interlaced files, some only in 
b frames, some will be used alot in keyframes and maybe rarely
in non keyframes, its hard to estimate what effects inlining this would have
also iam not even sure how to test it as gcc will stop inlining a random set
of functions if this is force to be inlined :(

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list