[FFmpeg-devel] [PATCH] Refactor OBJS handling in libavcodec/Makefile

Diego Biurrun diego
Thu Jul 9 11:17:26 CEST 2009


On Thu, Jul 09, 2009 at 01:18:13AM +0100, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > We currently duplicate a lot in the OBJS lines in libavcodec/Makefile.
> > Here is an attempt to refactor this somewhat by grouping common OBJS
> > into variables.
> >
> > I'm sure this could be improved further.  Currently the grouping is
> > somewhat arbitrary.  Better suggestions are welcome.
> >
> > --- libavcodec/Makefile	(revision 19378)
> > +++ libavcodec/Makefile	(working copy)
> > @@ -5,6 +5,16 @@
> >  
> > +MPEG_OBJS     = motion_est.o ratecontrol.o mpeg12data.o mpegvideo.o
> > +MPEG_DEC_OBJS = mpeg12data.o mpegvideo.o error_resilience.o
> > +MPEG_ENC_OBJS = mpegvideo_enc.o $(MPEG_OBJS)
> > +MPEG_ENC_ERROR_OBJS = error_resilience.o $(MPEG_ENC_OBJS)
> > +
> > +H263_OBJS     = h263.o $(MPEG_DEC_OBJS)
> > +H264_OBJS     = h264idct.o h264pred.o cabac.o mpegvideo.o error_resilience.o
> > +VC1_OBJS      = vc1.o vc1data.o msmpeg4data.o h263dec.o h263.o intrax8.o error_resilience.o mpegvideo.o msmpeg4.o
> > +VC1_DSP_OBJS  = vc1dsp.o intrax8dsp.o $(VC1_OBJS)
> 
> How did you arrive at this list?  Did you analyse inter-object
> dependencies or just guess?

I looked at places where long lists of OBJS where duplicated and
eliminated those.

Notice that an alternative would be to have some decoders depend on
others.  For example, the vc1_vdpau decoder could be made to depend on
the vc1 decoder in configure.  Then it would not need to duplicate the
OBJS list.  However, this is not currently possible in configure.

Diego



More information about the ffmpeg-devel mailing list