diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-26 21:45:48 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-26 21:45:48 +0000 |
commit | 1b16261c7c435bd43a38132493dcd2cf16242f89 (patch) | |
tree | 273c23c251e824bad02c693ab04b0c79962e8594 | |
parent | 3ee58151e2418c902f9af5359abc276da6b41484 (diff) | |
download | mpv-1b16261c7c435bd43a38132493dcd2cf16242f89.tar.bz2 mpv-1b16261c7c435bd43a38132493dcd2cf16242f89.tar.xz |
runtime cpu detection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3145 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | dec_video.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dec_video.c b/dec_video.c index 378eb252cc..0e88cbd3c7 100644 --- a/dec_video.c +++ b/dec_video.c @@ -50,6 +50,8 @@ extern int frameratecode2framerate[16]; #include "postproc/postprocess.h" +#include "cpudetect.h" + extern picture_t *picture; // exported from libmpeg2/decode.c int divx_quality=0; @@ -101,8 +103,6 @@ extern int tv_param_on; extern tvi_handle_t *tv_handler; #endif -#include "mmx_defs.h" - void AVI_Decode_RLE8(char *image,char *delta,int tdsize, unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel); @@ -808,11 +808,14 @@ if(verbose>1){ } // switch //------------------------ frame decoded. -------------------- -#ifdef HAVE_MMX // some codecs is broken, and doesn't restore MMX state :( // it happens usually with broken/damaged files. - __asm __volatile (EMMS:::"memory"); -#endif +if(gCpuCaps.has3DNow){ + __asm __volatile ("femms\n\t":::"memory"); +} +else if(gCpuCaps.hasMMX){ + __asm __volatile ("emms\n\t":::"memory"); +} t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; |