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

Diego Biurrun diego
Sat Jun 9 19:58:45 CEST 2007


On Mon, May 21, 2007 at 09:40:19AM -0400, Ronald S. Bultje wrote:
> 
> For reference, new patch attached. If you like it, I'll split it in 
> whatever way you prefer and submit parts.
> 
> --- ffmpeg.orig/libavcodec/motion_test.c	2007-03-22 01:00:50.000000000 -0400
> +++ ffmpeg/libavcodec/motion_test.c	2007-05-21 09:06:35.000000000 -0400
> @@ -31,24 +31,24 @@
>  
> -int pix_abs16x16_mmx(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_mmx1(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_c(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_x2_mmx(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_x2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_x2_c(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_y2_mmx(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_y2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_y2_c(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_xy2_mmx(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_xy2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx);
> -int pix_abs16x16_xy2_c(uint8_t *blk1, uint8_t *blk2, int lx);
> +int pix_abs16x16_mmx(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_mmx1(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_c(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_x2_mmx(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_x2_mmx1(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_x2_c(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_y2_mmx(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_y2_mmx1(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_y2_c(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_xy2_mmx(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_xy2_mmx1(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);
> +int pix_abs16x16_xy2_c(void *v, uint8_t *blk1, uint8_t *blk2, int lx, int h);

I think all of this is unnecessary, you can just remove the
declarations, since ...

> @@ -151,9 +155,25 @@
>  
> -    test_motion("mmx", pix_abs16x16_mmx, pix_abs16x16_c);
> -    test_motion("mmx_x2", pix_abs16x16_x2_mmx, pix_abs16x16_x2_c);
> -    test_motion("mmx_y2", pix_abs16x16_y2_mmx, pix_abs16x16_y2_c);
> -    test_motion("mmx_xy2", pix_abs16x16_xy2_mmx, pix_abs16x16_xy2_c);
> +#ifdef HAVE_MMX
> +    ctx = avcodec_alloc_context();
> +    mm_flags = 0;
> +    dsputil_init(&c, ctx);
> +    mm_flags = MM_MMX;
> +    dsputil_init(&mmx, ctx);
> +
> +    test_motion("mmx/16",     mmx.pix_abs[0][0], c.pix_abs[0][0]);
> +    test_motion("mmx_x2/16",  mmx.pix_abs[0][1], c.pix_abs[0][1]);
> +    test_motion("mmx_y2/16",  mmx.pix_abs[0][2], c.pix_abs[0][2]);
> +    test_motion("mmx_xy2/16", mmx.pix_abs[0][3], c.pix_abs[0][3]);
> +
> +    test_motion("mmx/8",      mmx.pix_abs[1][0], c.pix_abs[1][0]);
> +    test_motion("mmx_x2/8",   mmx.pix_abs[1][1], c.pix_abs[1][1]);
> +    test_motion("mmx_y2/8",   mmx.pix_abs[1][2], c.pix_abs[1][2]);
> +    test_motion("mmx_xy2/8",  mmx.pix_abs[1][3], c.pix_abs[1][3]);
> +
> +    av_free(ctx);
> +#endif

... you nuke all occurrences here.

Diego




More information about the ffmpeg-devel mailing list