[FFmpeg-devel] [PATCH] move ff_mpeg1_decode_block_intra() to mpeg12.h

Diego Biurrun diego
Mon May 11 13:52:41 CEST 2009


On Mon, May 11, 2009 at 09:18:26AM +0200, Benoit Fouet wrote:
> 
> On 05/09/2009 03:26 PM, Diego Biurrun wrote:
> > $attached moves the inline function ff_mpeg1_decode_block_intra() to
> > mpeg12.h and makes it static.
> >
> > This removes a bunch of warnings of the type
> >
> > mpeg12.h:59: warning: inline function 'ff_mpeg1_decode_block_intra' declared but never defined
> > mpeg12.h:59: warning: inline function 'ff_mpeg1_decode_block_intra' declared but never defined
> >
> > IIRC extern inline functions cause C99 vs. gcc troubles.  The library
> > size decreases slightly with my patch applied:
> >
> > -rw-rw-r-- 1 diego diego 26905890 2009-05-09 15:23 libavcodec.vanilla/libavcodec.a
> > -rw-rw-r-- 1 diego diego 26897058 2009-05-09 15:16 libavcodec/libavcodec.a
> >
> > Is this an acceptable solution?
> 
> $ find . -name '*.[c,h]' -exec grep -Hn ff_mpeg1_decode_block_intra {} \;
> ./libavcodec/mpeg12.c:322:                if
> (ff_mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0)
> ./libavcodec/mpeg12.c:607:inline int
> ff_mpeg1_decode_block_intra(MpegEncContext *s,
> ./libavcodec/mpeg12.h:59:extern inline int
> ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n);
> ./libavcodec/eatqi.c:66:        ff_mpeg1_decode_block_intra(s, block[n], n);
> 
> I guess the last hit answers your question :)

I'm not following you, elaborate please.

> if you redefine the inline function as mpeg1_decode_block_intra(), just
> having something like that, should do it:
> 
> int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) {
>     return mpeg1_decode_block_intra(s, block, n);
> }

That would be good for...?

Diego



More information about the ffmpeg-devel mailing list