Commit fe9d9f49 authored by kabi's avatar kabi

* yet a bit more extended

* fixed busy loop test bug on mmx-only machine


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@613 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3c7cb806
...@@ -37,12 +37,19 @@ audiogen: audiogen.c ...@@ -37,12 +37,19 @@ audiogen: audiogen.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \ DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
$(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
$(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
$(SRC_PATH)/libavcodec/i386/idct_mmx.c \
$(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
$(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
$(SRC_PATH)/libavcodec/dsputil.c \
$(SRC_PATH)/libavcodec/dsputil.h \
$(SRC_PATH)/libavcodec/simple_idct.c
dsptestpic: dsptest.c $(DSPDEPS) dsptestpic: dsptest.c $(DSPDEPS)
$(CC) -fPIC -DPIC -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< $(CC) -fPIC -DPIC -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm
dsptest: dsptest.c $(DSPDEPS) dsptest: dsptest.c $(DSPDEPS)
$(CC) -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< $(CC) -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavcodec/i386 -I$(SRC_PATH)/libavcodec/ -o $@ $< -lm
clean: clean:
rm -rf vsynth1 rm -rf vsynth1
......
...@@ -17,10 +17,22 @@ ...@@ -17,10 +17,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define TESTCPU_MAIN #define TESTCPU_MAIN
#include "avcodec.h"
#include "dsputil.h" #include "dsputil.h"
//#include "../libavcodec/dsputil.c" #include "mpegvideo.h"
#include "mpeg12data.h"
#include "mpeg4data.h"
#include "../libavcodec/i386/cputest.c" #include "../libavcodec/i386/cputest.c"
#include "../libavcodec/i386/dsputil_mmx.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"
#undef TESTCPU_MAIN #undef TESTCPU_MAIN
#define PAD 0x10000 #define PAD 0x10000
...@@ -62,6 +74,8 @@ static const struct pix_func { ...@@ -62,6 +74,8 @@ static const struct pix_func {
} pix_func[] = { } pix_func[] = {
PIX_FUNC_MMX(put_pixels), PIX_FUNC_MMX(put_pixels),
//PIX_FUNC_MMX(get_pixels),
//PIX_FUNC_MMX(put_pixels_clamped),
#if 1 #if 1
PIX_FUNC(put_pixels_x2), PIX_FUNC(put_pixels_x2),
PIX_FUNC(put_pixels_y2), PIX_FUNC(put_pixels_y2),
...@@ -75,6 +89,11 @@ static const struct pix_func { ...@@ -75,6 +89,11 @@ static const struct pix_func {
PIX_FUNC(avg_pixels_x2), PIX_FUNC(avg_pixels_x2),
PIX_FUNC(avg_pixels_y2), PIX_FUNC(avg_pixels_y2),
PIX_FUNC(avg_pixels_xy2), PIX_FUNC(avg_pixels_xy2),
PIX_FUNC_MMX(avg_no_rnd_pixels),
PIX_FUNC_MMX(avg_no_rnd_pixels_x2),
PIX_FUNC_MMX(avg_no_rnd_pixels_y2),
PIX_FUNC_MMX(avg_no_rnd_pixels_xy2),
#endif #endif
{ 0, 0 } { 0, 0 }
}; };
...@@ -104,9 +123,8 @@ static test_speed(int step) ...@@ -104,9 +123,8 @@ static test_speed(int step)
op_pixels_func func = pix->func; op_pixels_func func = pix->func;
char* im = bu; char* im = bu;
if (!(pix->mm_flags & mm_flags)) if (pix->mm_flags & mm_flags)
continue; {
printf("%30s... ", pix->name); printf("%30s... ", pix->name);
fflush(stdout); fflush(stdout);
ts = rdtsc(); ts = rdtsc();
...@@ -122,6 +140,7 @@ static test_speed(int step) ...@@ -122,6 +140,7 @@ static test_speed(int step)
sum += (te - ts) / 100000; sum += (te - ts) / 100000;
if (pix->mm_flags & PAD) if (pix->mm_flags & PAD)
puts(""); puts("");
}
pix++; pix++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment