mirror of https://github.com/mpv-player/mpv
runtime cpu detection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3145 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3ee58151e2
commit
1b16261c7c
13
dec_video.c
13
dec_video.c
|
@ -50,6 +50,8 @@ extern int frameratecode2framerate[16];
|
||||||
|
|
||||||
#include "postproc/postprocess.h"
|
#include "postproc/postprocess.h"
|
||||||
|
|
||||||
|
#include "cpudetect.h"
|
||||||
|
|
||||||
extern picture_t *picture; // exported from libmpeg2/decode.c
|
extern picture_t *picture; // exported from libmpeg2/decode.c
|
||||||
|
|
||||||
int divx_quality=0;
|
int divx_quality=0;
|
||||||
|
@ -101,8 +103,6 @@ extern int tv_param_on;
|
||||||
extern tvi_handle_t *tv_handler;
|
extern tvi_handle_t *tv_handler;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mmx_defs.h"
|
|
||||||
|
|
||||||
void AVI_Decode_RLE8(char *image,char *delta,int tdsize,
|
void AVI_Decode_RLE8(char *image,char *delta,int tdsize,
|
||||||
unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel);
|
unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel);
|
||||||
|
|
||||||
|
@ -808,11 +808,14 @@ if(verbose>1){
|
||||||
} // switch
|
} // switch
|
||||||
//------------------------ frame decoded. --------------------
|
//------------------------ frame decoded. --------------------
|
||||||
|
|
||||||
#ifdef HAVE_MMX
|
|
||||||
// some codecs is broken, and doesn't restore MMX state :(
|
// some codecs is broken, and doesn't restore MMX state :(
|
||||||
// it happens usually with broken/damaged files.
|
// it happens usually with broken/damaged files.
|
||||||
__asm __volatile (EMMS:::"memory");
|
if(gCpuCaps.has3DNow){
|
||||||
#endif
|
__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;
|
t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue