[FFmpeg-devel] [PATCH] Coremake support - ffmpeg_nommx.patch (1/1) - ffmpeg-nommx.patch (1/1) - ff-ffttest-includes.patch (1/1)

Diego Biurrun diego
Sat Jun 9 20:33:01 CEST 2007


On Sat, Jun 09, 2007 at 02:23:33PM -0400, Ronald S. Bultje wrote:
> 
> On 6/9/07, Diego Biurrun <diego at biurrun.de> wrote:
> >
> >I would appreciate if you could send the remaining changes for
> >motion-test.c now.
> 
> 
> Oops, accidently forgot them, please find it attached. Works for me,
> although the time calculated to run the test always gives nan here, not sure
> why. Maybe my cpu is extremely fast? :-).

> --- motion-test.c	(revision 9254)
> +++ motion-test.c	(working copy)
> @@ -29,28 +29,11 @@
>  #include <sys/time.h>
>  #include <unistd.h>
>  
> +#include "avcodec.h"
>  #include "dsputil.h"

dsputil.h #includes avcodec.h, so this is unnecessary.

>  #include "i386/mmx.h"
>  
> -#undef exit
> -#undef printf

You'll likely keep insisting, but these are not for us..

> @@ -137,13 +120,16 @@
>  
>  int main(int argc, char **argv)
>  {
> -    int c;
> +    AVCodecContext *ctx;
> +    int n;
> +    DSPContext c, mmx;
> +    int flags[2] = { FF_MM_MMX, FF_MM_MMXEXT };
>  
>      for(;;) {
> -        c = getopt(argc, argv, "h");
> -        if (c == -1)
> +        n = getopt(argc, argv, "h");
> +        if (n == -1)
>              break;
> -        switch(c) {
> +        switch(n) {

I think this can be called cosmetics.  Why not use another variable name
for the DSPContext?  One character variable names are not the best idea
in the first place ...

> @@ -152,9 +138,24 @@
>  
> +            test_motion("mmx", mmx.pix_abs[x][0], c.pix_abs[x][0]);
> +            test_motion("mmx_x2", mmx.pix_abs[x][1], c.pix_abs[x][1]);
> +            test_motion("mmx_y2", mmx.pix_abs[x][2], c.pix_abs[x][2]);
> +            test_motion("mmx_xy2", mmx.pix_abs[x][3], c.pix_abs[x][3]);

This could be nicely aligned...

Diego




More information about the ffmpeg-devel mailing list