diff --git a/libavcodec/motion_test.c b/libavcodec/motion_test.c new file mode 100644 index 0000000000..2857eeaf9f --- /dev/null +++ b/libavcodec/motion_test.c @@ -0,0 +1,133 @@ +/* motion test. (c) 2001 Gerard Lantau. */ +#include +#include +#include +#include +#include +#include + +#include "dsputil.h" + +#include "i386/mmx.h" + +int pix_abs16x16_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_mmx1(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_x2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_x2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_x2_c(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_y2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_y2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_y2_c(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_xy2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_xy2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx, int h); +int pix_abs16x16_xy2_c(UINT8 *blk1, UINT8 *blk2, int lx, int h); + +typedef int motion_func(UINT8 *blk1, UINT8 *blk2, int lx, int h); + +#define WIDTH 64 +#define HEIGHT 64 + +UINT8 img1[WIDTH * HEIGHT]; +UINT8 img2[WIDTH * HEIGHT]; + +void fill_random(UINT8 *tab, int size) +{ + int i; + for(i=0;i