From 86c33b29d2079583d6805887c6519825151f1b0c Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 21 May 2007 07:11:27 +0000 Subject: Rename motion_test.c to motion-test.c, which is the naming scheme used by all other test programs. As a positive sideeffect, this makes the build system try to actually create the executable file. Originally committed as revision 9086 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/motion-test.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 libavcodec/motion-test.c (limited to 'libavcodec/motion-test.c') diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c new file mode 100644 index 0000000000..ecdb62a4e1 --- /dev/null +++ b/libavcodec/motion-test.c @@ -0,0 +1,160 @@ +/* + * (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file motion_test.c + * motion test. + */ + +#include +#include +#include +#include +#include + +#include "dsputil.h" + +#include "i386/mmx.h" + +#undef exit +#undef printf + +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); + +typedef int motion_func(uint8_t *blk1, uint8_t *blk2, int lx); + +#define WIDTH 64 +#define HEIGHT 64 + +uint8_t img1[WIDTH * HEIGHT]; +uint8_t img2[WIDTH * HEIGHT]; + +void fill_random(uint8_t *tab, int size) +{ + int i; + for(i=0;i