[FFmpeg-devel] [PATCH] split mdec.c from mpeg12.c

Michael Niedermayer michaelni
Tue Aug 19 03:32:32 CEST 2008


On Tue, Aug 19, 2008 at 03:22:28AM +0200, Diego Biurrun wrote:
> On Tue, Aug 19, 2008 at 02:20:56AM +0200, Diego Biurrun wrote:
> > Here is a little refactoring patch that moves mdec.c to a proper
> > separate file that can be conditionally compiled instead of #including
> > it from mpeg12.c.
> > 
> > --- libavcodec/mpeg12.c	(revision 14829)
> > +++ libavcodec/mpeg12.c	(working copy)
> > @@ -152,7 +151,7 @@
> >  
> > -static void init_vlcs(void)
> > +void ff_init_vlcs(void)
> 
> Should this function be marked av_cold (in a separate patch)?  It is

yes


> only called from the mdec.c/mpeg12.c init functions, which are av_cold
> themselves.
> 
> > @@ -620,7 +619,7 @@
> >  
> > -static inline int decode_dc(GetBitContext *gb, int component)
> > +inline int ff_decode_dc(GetBitContext *gb, int component)
> 
> I am being told that non-static inline functions can be problematic.

yes


> There are two possible solutions:
> 
> - Move the function to a header file,

yes, but note this could end up rather messy and if it requires
100 things to be made global then i would prefer to keep
#including mdec.c


> - remove the inline keyword.

i do not like this


> 
> Aurelien did the latter when splitting off wmv2.c from msmpeg4.c.

Was this benchmarked?

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

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080819/db208b35/attachment.pgp>



More information about the ffmpeg-devel mailing list