[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[136] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2010-01-29 18:38:14
|
Revision: 136 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=136&view=rev Author: nickols_k Date: 2010-01-29 18:37:49 +0000 (Fri, 29 Jan 2010) Log Message: ----------- slightly descrease size of executable Modified Paths: -------------- mplayerxp/configure mplayerxp/libvo/osd.c mplayerxp/libvo/vo_opengl.c mplayerxp/libvo/vo_x11.c mplayerxp/libvo/vo_xv.c mplayerxp/libvo/vo_xvidix.c mplayerxp/libvo/x11_common.c mplayerxp/libvo/x11_common.h mplayerxp/postproc/dsp_accel.h mplayerxp/pvector/pvector_inc.h Modified: mplayerxp/configure =================================================================== --- mplayerxp/configure 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/configure 2010-01-29 18:37:49 UTC (rev 136) @@ -870,19 +870,9 @@ ** *---------------------------------------------------------------------------*/ -#ifdef CAN_COMPILE_MMX -#define USE_MMX_IDCT 1 -#endif - /* libvo options */ -#define SCREEN_SIZE_X 1 -#define SCREEN_SIZE_Y 1 $def_fbdev_nocopy -#if defined(HAVE_X11) || defined(HAVE_XV) -#define X11_FULLSCREEN 1 -#endif - /* Defined to some form of __attribute__ ((...)) if the compiler supports a different, more efficient calling convention. */ #if defined ( __USE_FASTCALL ) && defined ( ARCH_X86 ) Modified: mplayerxp/libvo/osd.c =================================================================== --- mplayerxp/libvo/osd.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/osd.c 2010-01-29 18:37:49 UTC (rev 136) @@ -182,18 +182,18 @@ } else #endif -#ifdef __MMX__ -if(gCpuCaps.hasMMX) -{ - MSG_V("Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay\n"); - vo_draw_alpha_yv12_ptr=vo_draw_alpha_yv12_MMX; - vo_draw_alpha_yuy2_ptr=vo_draw_alpha_yuy2_MMX; - vo_draw_alpha_rgb24_ptr=vo_draw_alpha_rgb24_MMX; - vo_draw_alpha_rgb32_ptr=vo_draw_alpha_rgb32_MMX; -} -else +//#ifdef __MMX__ +//if(gCpuCaps.hasMMX) +//{ +// MSG_V("Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay\n"); +// vo_draw_alpha_yv12_ptr=vo_draw_alpha_yv12_MMX; +// vo_draw_alpha_yuy2_ptr=vo_draw_alpha_yuy2_MMX; +// vo_draw_alpha_rgb24_ptr=vo_draw_alpha_rgb24_MMX; +// vo_draw_alpha_rgb32_ptr=vo_draw_alpha_rgb32_MMX; +//} +//else +//#endif #endif -#endif { MSG_V("Using generic OnScreenDisplay\n"); vo_draw_alpha_yv12_ptr=vo_draw_alpha_yv12_c; Modified: mplayerxp/libvo/vo_opengl.c =================================================================== --- mplayerxp/libvo/vo_opengl.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/vo_opengl.c 2010-01-29 18:37:49 UTC (rev 136) @@ -182,16 +182,7 @@ aspect_save_screenres(vo_screenwidth,vo_screenheight); aspect(&d_width,&d_height,softzoom?A_ZOOM:A_NOZOOM); -#ifdef X11_FULLSCREEN - /* this code replaces X11_FULLSCREEN hack in mplayer.c - * aspect() is available through aspect.h for all vos. - * besides zooming should only be done with -zoom, - * but I leave the old -fs behaviour so users don't get - * irritated for now (and send lots o' mails ;) ::atmos - */ - - if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); -#endif + if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); vo_x11_calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; Modified: mplayerxp/libvo/vo_x11.c =================================================================== --- mplayerxp/libvo/vo_x11.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/vo_x11.c 2010-01-29 18:37:49 UTC (rev 136) @@ -160,15 +160,8 @@ softzoom=flags&VOFLAG_SWSCALE; aspect(&d_width,&d_height,A_NOZOOM); -#ifdef X11_FULLSCREEN - /* this code replaces X11_FULLSCREEN hack in mplayer.c - * aspect() is available through aspect.h for all vos. - * besides zooming should only be done with -zoom, - * but I leave the old -fs behaviour so users don't get - * irritated for now (and send lots o' mails ;) ::atmos - */ - if( fullscreen ) aspect(&d_width,&d_height,A_ZOOM); -#endif + if( fullscreen ) aspect(&d_width,&d_height,A_ZOOM); + vo_x11_calcpos(&hint,d_width,d_height,flags); hint.flags=PPosition | PSize; Modified: mplayerxp/libvo/vo_xv.c =================================================================== --- mplayerxp/libvo/vo_xv.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/vo_xv.c 2010-01-29 18:37:49 UTC (rev 136) @@ -334,17 +334,9 @@ aspect_save_screenres(vo_screenwidth,vo_screenheight); - aspect(&d_width,&d_height,softzoom?A_ZOOM:A_NOZOOM); -#ifdef X11_FULLSCREEN - /* this code replaces X11_FULLSCREEN hack in mplayer.c - * aspect() is available through aspect.h for all vos. - * besides zooming should only be done with -zoom, - * but I leave the old -fs behaviour so users don't get - * irritated for now (and send lots o' mails ;) ::atmos - */ + aspect(&d_width,&d_height,softzoom?A_ZOOM:A_NOZOOM); + if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); - if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); -#endif vo_x11_calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; Modified: mplayerxp/libvo/vo_xvidix.c =================================================================== --- mplayerxp/libvo/vo_xvidix.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/vo_xvidix.c 2010-01-29 18:37:49 UTC (rev 136) @@ -87,7 +87,6 @@ drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); /* following stuff copied from vo_xmga.c */ -#if X11_FULLSCREEN if (vo_fs) { drwX = (vo_screenwidth - (dwidth > vo_screenwidth ? vo_screenwidth : dwidth)) / 2; @@ -99,7 +98,6 @@ MSG_V( "[xvidix-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n", drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); } -#endif #ifdef HAVE_XINERAMA if (XineramaIsActive(mDisplay)) @@ -254,22 +252,21 @@ aspect(&d_width, &d_height,flags & VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); -#ifdef X11_FULLSCREEN if (vo_fs) /* fullscreen */ { - if (flags & VOFLAG_SWSCALE) - { - aspect(&d_width, &d_height, A_ZOOM); - } - else - { + if (flags & VOFLAG_SWSCALE) + { + aspect(&d_width, &d_height, A_ZOOM); + } + else + { d_width = vo_screenwidth; d_height = vo_screenheight; - } + } window_width = vo_screenwidth; window_height = vo_screenheight; } -#endif + dwidth = d_width; dheight = d_height; /* Make the window */ @@ -303,10 +300,7 @@ vo_x11_classhint(mDisplay, vo_window, "xvidix"); vo_x11_hidecursor(mDisplay, vo_window); -#ifdef X11_FULLSCREEN - if (vo_fs) /* fullscreen */ - vo_x11_decoration(mDisplay, vo_window, 0); -#endif + if (vo_fs) vo_x11_decoration(mDisplay, vo_window, 0); XGetNormalHints(mDisplay, vo_window, &hint); hint.x = window_x; Modified: mplayerxp/libvo/x11_common.c =================================================================== --- mplayerxp/libvo/x11_common.c 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/x11_common.c 2010-01-29 18:37:49 UTC (rev 136) @@ -4,7 +4,7 @@ #include "../mp_config.h" #include "../mplayer.h" -#ifdef X11_FULLSCREEN +#ifdef HAVE_X11 #include <string.h> #include <unistd.h> Modified: mplayerxp/libvo/x11_common.h =================================================================== --- mplayerxp/libvo/x11_common.h 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/libvo/x11_common.h 2010-01-29 18:37:49 UTC (rev 136) @@ -2,7 +2,7 @@ #ifndef X11_COMMON_H #define X11_COMMON_H -#ifdef X11_FULLSCREEN +#ifdef HAVE_X11 #include <X11/Xlib.h> #include <X11/Xutil.h> Modified: mplayerxp/postproc/dsp_accel.h =================================================================== --- mplayerxp/postproc/dsp_accel.h 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/postproc/dsp_accel.h 2010-01-29 18:37:49 UTC (rev 136) @@ -3,16 +3,20 @@ static void __FASTCALL__ PVECTOR_RENAME(int8_to_int16)(const int8_t* in_data, int16_t* out_data, unsigned len, int final) { +#ifdef HAVE_INT_PVECTOR + unsigned len_mm; +#endif unsigned i; i = 0; #ifdef HAVE_INT_PVECTOR + len_mm=len&(~(__IVEC_SIZE-1)); if(!IVEC_ALIGNED(out_data)) for(;i<len;i++) { ((uint16_t*)out_data)[i]=((uint16_t)((const uint8_t*)in_data)[i])<<8; if(IVEC_ALIGNED(out_data)) break; } - if((len-i)>=__IVEC_SIZE) - for(;i<len;i+=__IVEC_SIZE){ + if((len_mm-i)>=__IVEC_SIZE) + for(;i<len_mm;i+=__IVEC_SIZE){ __ivec ind,itmp[2]; if(IVEC_ALIGNED(in_data)) ind = _ivec_loada(&((const uint8_t *)in_data)[i]); @@ -36,16 +40,20 @@ static void __FASTCALL__ PVECTOR_RENAME(int16_to_int8)(const int16_t* in_data, int8_t* out_data, unsigned len, int final) { +#ifdef HAVE_INT_PVECTOR + unsigned len_mm; +#endif unsigned i; i = 0; #ifdef HAVE_INT_PVECTOR + len_mm=len&(~(__IVEC_SIZE-1)); if(!IVEC_ALIGNED(out_data)) for(;i<len;i++) { ((uint8_t*)out_data)[i]=(uint8_t)((((const uint16_t*)in_data)[i])>>8); if(IVEC_ALIGNED(out_data)) break; } - if((len-i)>=__IVEC_SIZE) - for(;i<len;i+=__IVEC_SIZE){ + if((len_mm-i)>=__IVEC_SIZE) + for(;i<len_mm;i+=__IVEC_SIZE){ __ivec outd,itmp[2]; if(IVEC_ALIGNED(in_data)) { itmp[0] = _ivec_loada(&((const uint16_t*)in_data)[i]); @@ -71,33 +79,32 @@ static void __FASTCALL__ PVECTOR_RENAME(int16_to_int32)(const int16_t* in_data, int32_t* out_data, unsigned len, int final) { #ifdef HAVE_INT_PVECTOR - unsigned len_mm,j; + unsigned len_mm; #endif unsigned i; i=0; #ifdef HAVE_INT_PVECTOR - j=0; len_mm=len&(~(__IVEC_SIZE-1)); if(!IVEC_ALIGNED(out_data)) - for(;i<len;i++,j+=2){ + for(;i<len;i++){ ((uint32_t*)out_data)[i]=((uint32_t)((const uint16_t*)in_data)[i])<<16; if(IVEC_ALIGNED(out_data)) break; } if((len_mm-i)>=__IVEC_SIZE) - for(;i<len_mm;i+=__IVEC_SIZE/2,j+=__IVEC_SIZE) + for(;i<len_mm;i+=__IVEC_SIZE) { __ivec ind,tmp[2]; if(IVEC_ALIGNED(in_data)) - ind = _ivec_loada(&((const uint8_t *)in_data)[j]); + ind = _ivec_loada(&((const uint8_t *)in_data)[i]); else - ind = _ivec_loadu(&((const uint8_t *)in_data)[j]); + ind = _ivec_loadu(&((const uint8_t *)in_data)[i]); tmp[0]= _ivec_scale_u32_from_u16(ind,&tmp[1]); if(final) { - _ivec_stream(&((uint8_t *)out_data)[j*2],tmp[0]); - _ivec_stream(&((uint8_t *)out_data)[j*2+__IVEC_SIZE],tmp[1]); + _ivec_stream(&((uint8_t *)out_data)[i*2],tmp[0]); + _ivec_stream(&((uint8_t *)out_data)[i*2+__IVEC_SIZE],tmp[1]); } else { - _ivec_storea(&((uint8_t *)out_data)[j*2],tmp[0]); - _ivec_storea(&((uint8_t *)out_data)[j*2+__IVEC_SIZE],tmp[1]); + _ivec_storea(&((uint8_t *)out_data)[i*2],tmp[0]); + _ivec_storea(&((uint8_t *)out_data)[i*2+__IVEC_SIZE],tmp[1]); } } if(final) _ivec_sfence(); @@ -110,33 +117,33 @@ static void __FASTCALL__ PVECTOR_RENAME(int32_to_int16)(const int32_t* in_data, int16_t* out_data, unsigned len, int final) { #ifdef HAVE_INT_PVECTOR - unsigned j; + unsigned len_mm; #endif unsigned i; i=0; #ifdef HAVE_INT_PVECTOR - j=0; + len_mm=len&(~(__IVEC_SIZE-1)); if(!IVEC_ALIGNED(out_data)) - for(;i<len;i++,j+=2){ + for(;i<len;i++){ ((uint16_t*)out_data)[i]=(uint16_t)((((const uint32_t*)in_data)[i])>>16); if(IVEC_ALIGNED(out_data)) break; } - if((len-i)>=__IVEC_SIZE) - for(;i<len;i+=__IVEC_SIZE/2,j+=__IVEC_SIZE) + if((len_mm-i)>=__IVEC_SIZE) + for(;i<len_mm;i+=__IVEC_SIZE) { __ivec ind[2],tmp; if(IVEC_ALIGNED(in_data)) { - ind[0]=_ivec_loada(&((const uint8_t *)in_data)[j*2]); - ind[1]=_ivec_loada(&((const uint8_t *)in_data)[j*2+__IVEC_SIZE]); + ind[0]=_ivec_loada(&((const uint8_t *)in_data)[i*2]); + ind[1]=_ivec_loada(&((const uint8_t *)in_data)[i*2+__IVEC_SIZE]); } else { - ind[0]=_ivec_loadu(&((const uint8_t *)in_data)[j*2]); - ind[1]=_ivec_loadu(&((const uint8_t *)in_data)[j*2+__IVEC_SIZE]); + ind[0]=_ivec_loadu(&((const uint8_t *)in_data)[i*2]); + ind[1]=_ivec_loadu(&((const uint8_t *)in_data)[i*2+__IVEC_SIZE]); } tmp = _ivec_scale_s16_from_s32(ind[0],ind[1]); if(final) - _ivec_stream(&((uint8_t *)out_data)[j],tmp); + _ivec_stream(&((uint8_t *)out_data)[i],tmp); else - _ivec_storea(&((uint8_t *)out_data)[j],tmp); + _ivec_storea(&((uint8_t *)out_data)[i],tmp); } if(final) _ivec_sfence(); _ivec_empty(); @@ -322,7 +329,7 @@ if(!F32VEC_ALIGNED(out)) for(;i<len;i++) { ftmp=((const float*)in)[i]; - SATURATE(ftmp,-1.0,+1.0); + SATURATE(ftmp,-0.999998,+0.999998); ((int32_t*)out)[i]=(int32_t)lrintf((INT_MAX-1)*ftmp); if(F32VEC_ALIGNED(out)) break; } @@ -347,7 +354,7 @@ #endif for(;i<len;i++) { ftmp=((const float*)in)[i]; - SATURATE(ftmp,-0.99,+0.99); + SATURATE(ftmp,-0.999998,+0.999998); ((int32_t*)out)[i]=(int32_t)lrintf((INT32_MAX-1)*ftmp); } } Modified: mplayerxp/pvector/pvector_inc.h =================================================================== --- mplayerxp/pvector/pvector_inc.h 2010-01-29 17:57:20 UTC (rev 135) +++ mplayerxp/pvector/pvector_inc.h 2010-01-29 18:37:49 UTC (rev 136) @@ -18,17 +18,18 @@ #include PVECTOR_ACCEL_H #if !defined( __x86_64__ ) || defined(PVECTOR_TESTING) -#if !defined( __i686__ ) || defined(PVECTOR_TESTING) +#if defined(COMPILE_FOR_OLD_PC) || defined(PVECTOR_TESTING) #ifdef __MMX__ #define OPTIMIZE_MMX #undef PVECTOR_RENAME #define PVECTOR_RENAME(a) a ## _MMX #include PVECTOR_ACCEL_H #endif -#endif // __i686__ +#endif // PVECTOR_TESTING #ifdef __3dNOW__ #define OPTIMIZE_3DNOW +#define OPTIMIZE_MMX2 #undef PVECTOR_RENAME #define PVECTOR_RENAME(a) a ## _3DNOW #include PVECTOR_ACCEL_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |