[FFmpeg-devel] [PATCH] Coremake support - ffmpeg_nommx.patch (1/1)

Diego Biurrun diego
Tue May 22 00:33:21 CEST 2007


On Sun, May 20, 2007 at 02:05:44PM -0400, Ronald S. Bultje wrote:
> 
> Diego Biurrun <diego <at> biurrun.de> writes:
> > On Mon, May 14, 2007 at 05:38:44PM -0400, Ronald S. Bultje wrote:
> > > 
> > > first, sorry for the threading, if you know of a way to fix that in  
> > > digest mode, please let me know...
> > 
> > Not use digest mode?  Try gmane if the volume of ffmpeg-devel drowns
> > you.
> 
> Let's see how this works. I tried webinterface, didn't work (too much 
> quoted text, no attachments), then tried nntp: with xnntp, didn't work 
> (couldn't send emails, or well it said it did, but it never actually 
> did, I think - maybe you'll get this message 10 times eventually), so 
> now I'm trying MT_NewsWatcher. Maybe this works. Let me know if 
> threading is OK now.

Threading is OK now, thank you.

> > > --- ffmpeg.orig/libavcodec/imgresample.c 2007-03-22 01:00:47.000000000 -0400
> > > +++ ffmpeg/libavcodec/imgresample.c   2007-03-22 01:20:53.000000000 -0400
> > >  <at>  <at>  -28,8 +28,10  <at>  <at> 
> > >  #include "swscale.h"
> > >  #include "dsputil.h"
> > >  
> > > -#ifdef USE_FASTMEMCPY
> > > -#include "libvo/fastmemcpy.h"
> > > +#ifdef TEST
> > > +#undef printf
> > > +#undef fprintf
> > > +#define av_log(p,l,...) fprintf(stderr,__VA_ARGS__)
> > >  #endif
> > 
> > Removing the #include is pointless, the rest is probably OK.
> 
> So, I may remember this wrong, but I think the consensus a while ago 
> (there was a "discussion" on this way back) was that this didn't really 
> belong in ffmpeg, since it's mplayer-specific (see e.g "libvo/"). Other 
> similar mplayer-specific code (e.g. the fourcc hacks in wav/avi) has 
> also been removed in ffmpeg. In this case, mplayer could simply use 
> -include fastmemcpy.h (similar to how the linux kernel does this kind of 
> stuff) or change the sources if they want this. I've left it in for now, 
> feel free to remove it (a similar line is in swscale/rgb2rgb.c).

Are you confusing C with Makefile syntax?  I know '-include' from
Makefiles only ...

And yes, we possibly could remove the fastmemcpy #includes.

> > > --- ffmpeg.orig/libavcodec/allcodecs.c   2007-03-22 01:00:46.000000000 -0400
> > > +++ ffmpeg/libavcodec/allcodecs.c  2007-03-22 01:20:53.000000000 -0400
> > >  <at>  <at>  -96,7 +96,9  <at>  <at> 
> > >      REGISTER_ENCDEC (MJPEG, mjpeg);
> > >      REGISTER_DECODER(MJPEGB, mjpegb);
> > >      REGISTER_DECODER(MMVIDEO, mmvideo);
> > > +#ifdef HAVE_XVMC
> > >      REGISTER_DECODER(MPEG_XVMC, mpeg_xvmc);
> > > +#endif
> > 
> > We were glad to get rid of these.  It seems our configure does have a
> > feature or two more than yours after all ...
> 
> Probably. I'll be honest here, I'm not yet very interested in adding 
> support for this, since A) the patch will never be accepted upstream 
> anyway and B) it's a fair piece of work with no gain at all since I 
> don't use it. For those part (ext. libs etc.) where I need it, I 
> re-added the compile conditionals to make it compile. It's not hard to 
> add it, and the patch would probably still be smaller (don't forget that 
> the patch w/o compile conditionals was smaller than ffmpeg's system 
> without compile conditionals also), I just don't want to spend the time 
> unless I feel it'll be useful. Essentially, I'll add it if there's a 
> chance that it goes upstream. I don't think that'll happen. 
> Alternatively, if I see a reason to use it, I'll add it also (and then 
> the above part of the patch will disappear).

Your line count comparison is not fair since our build system is more
featureful than yours.  To compare evenly you have to trim ours down to
your feature set.  At least a third of configure would go away then...

> Anyway, on to the relevant part of the patch for you. Attached, or if 
> that doesn't work on 
> http://people.freedesktop.org/~rbultje/ffmpeg_nommx.patch (still 
> testing...), you'll find those parts of the patch that you referenced 
> that I should submit separately. The patch does a bunch of things. First 
> of all, the gains: it allows most of the tests to be compiled (by 
> default, w/o mmx and w/o gpl). The changes that I made:

Well, the tests compile and link for me, with the exception of
motion-test and fft-test ...

> --- ffmpeg.orig/tests/dsptest.c	2007-03-22 01:00:52.000000000 -0400
> +++ ffmpeg/tests/dsptest.c	2007-05-20 12:50:47.000000000 -0400
> @@ -20,18 +20,18 @@
>  #include "avcodec.h"
>  #include "dsputil.h"
>  #include "mpegvideo.h"
> -#include "mpeg12data.h"
> -#include "mpeg4data.h"
> -#include "../libavcodec/i386/cputest.c"
> -#include "../libavcodec/i386/dsputil_mmx.c"
> -
> -#include "../libavcodec/i386/fdct_mmx.c"
> -#include "../libavcodec/i386/idct_mmx.c"
> -#include "../libavcodec/i386/motion_est_mmx.c"
> -#include "../libavcodec/i386/simple_idct_mmx.c"
> -#include "../libavcodec/dsputil.c"
> -#include "../libavcodec/simple_idct.c"
> -#include "../libavcodec/jfdctfst.c"
> +//#include "mpeg12data.h"
> +//#include "mpeg4data.h"
> +#include "i386/cputest.c"
> +#include "i386/dsputil_mmx.c"
> +
> +#include "i386/fdct_mmx.c"
> +#include "i386/idct_mmx.c"
> +#include "i386/motion_est_mmx.c"
> +#include "i386/simple_idct_mmx.c"
> +#include "dsputil.c"
> +#include "simple_idct.c"
> +#include "jfdctfst.c"

This part is already committed, without the i386, which is unneeded.

> --- ffmpeg.orig/libavcodec/i386/h264dsp_mmx.c	2007-03-22 01:00:40.000000000 -0400
> +++ ffmpeg/libavcodec/i386/h264dsp_mmx.c	2007-05-20 12:13:28.000000000 -0400
> @@ -1374,7 +1374,7 @@
>  H264_MC(avg_, 4, mmx2)
>  H264_MC(avg_, 8, mmx2)
>  H264_MC(avg_, 16,mmx2)
> -
> +#undef H264_MC
>  
>  #define H264_CHROMA_OP(S,D)
>  #define H264_CHROMA_OP4(S,D,T)
> @@ -1514,4 +1514,4 @@
>  H264_WEIGHT( 4, 8)
>  H264_WEIGHT( 4, 4)
>  H264_WEIGHT( 4, 2)
> -
> +#undef H264_WEIGHT

What is this for?

> --- ffmpeg.orig/libswscale/cs_test.c	2007-03-22 01:00:59.000000000 -0400
> +++ ffmpeg/libswscale/cs_test.c	2007-03-22 09:03:57.000000000 -0400
> @@ -23,7 +23,9 @@
>  #include <unistd.h>
>  #include <stdlib.h>
>  #include <inttypes.h>
> +#ifdef HAVE_MALLOC_H
>  #include <malloc.h>
> +#endif
>  
>  #include "swscale.h"
>  #include "rgb2rgb.h"

This hunk is not against HEAD, the malloc.h #include is no longer there.

Diego




More information about the ffmpeg-devel mailing list