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

Ivan Kalvachev ikalvachev
Wed Aug 20 00:28:21 CEST 2008


On 8/19/08, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, Aug 19, 2008 at 03:22:19PM +0200, Michael Niedermayer wrote:
>> On Tue, Aug 19, 2008 at 11:49:55AM +0200, Diego Biurrun wrote:
>> > On Tue, Aug 19, 2008 at 03:32:32AM +0200, Michael Niedermayer wrote:
>> > > 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)
>> > > > > @@ -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.
>> > > > 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
>> > 
>> > See attached patch, it is rather simple.  If you prefer I could split
>> > out the rename upon commit.
>> 
>> ok, (and i dont mind it being not split)
>
> Applying in a short moment.
>
>> > > > - remove the inline keyword.
>> > > > 
>> > > > Aurelien did the latter when splitting off wmv2.c from msmpeg4.c.
>> > > 
>> > > Was this benchmarked?
>> > 
>> > Yes, this was discussed with you back then.  I ran some benchmarks,
>> > as did Aurelien:
>> > 
>> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-November/037852.html
>> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-November/037881.html
>> 
>> ok, i remember now :)
>> 
>> sleep deprication seems to have a negative effect on my memory.
>
> You mean sleep depriVation, deprEcating sleep would be an interesting
> idea though :)

I don't like the function names.
ff_init_vlc() have very confusing meaning if seen in bunch of other symbols or in backtrace.
Please provide names that have some meaning outside of mpeg12.c file.




More information about the ffmpeg-devel mailing list