diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-27 17:14:13 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-27 17:14:13 +0000 |
commit | 7829f8bba4790bf1e04b45780e6741a4f6fb6e97 (patch) | |
tree | 80d59b9d48ac873b8b4d41ce8c7f93692a37e66a /libvo/vo_dga.c | |
parent | 6c4c98b7a159bdb49ad640c05abea8d695196f6f (diff) | |
download | mpv-7829f8bba4790bf1e04b45780e6741a4f6fb6e97.tar.bz2 mpv-7829f8bba4790bf1e04b45780e6741a4f6fb6e97.tar.xz |
revised query_format. added support for native/conversion detection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6207 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_dga.c')
-rw-r--r-- | libvo/vo_dga.c | 59 |
1 files changed, 27 insertions, 32 deletions
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c index 414a65c3d6..d5c2aec695 100644 --- a/libvo/vo_dga.c +++ b/libvo/vo_dga.c @@ -20,9 +20,10 @@ * BGR_24_24_888 * BGR_32_24_888 * - * - works only on x86 architectures - * * $Log$ + * Revision 1.45 2002/05/27 17:14:13 alex + * revised query_format. added support for native/conversion detection + * * Revision 1.44 2002/02/17 08:24:43 nick * I don't like such reports: '-vo dga:vidix or -vo x11:vidix works fine for me' * @@ -183,11 +184,12 @@ LIBVO_EXTERN( dga ) #include <X11/extensions/xf86vmode.h> #endif - #include "x11_common.h" #include "../postproc/rgb2rgb.h" #include "fastmemcpy.h" +#include "../mp_msg.h" + static vo_info_t vo_info = { #ifdef HAVE_DGA2 @@ -305,6 +307,18 @@ int vd_ModeValid( int mplayer_depth){ return 0; } +int vd_ModeSupportedMethod( int mplayer_depth){ + int i; + if(mplayer_depth == 0)return 0; + for(i=1; i<vo_dga_mode_num; i++){ + if(vo_dga_modes[i].vdm_mplayer_depth == mplayer_depth && + vo_dga_modes[i].vdm_supported != 0){ + return vo_dga_modes[i].vdm_conversion_func; + } + } + return 0; +} + char *vd_GetModeString(int index){ #define VO_DGA_MAX_STRING_LEN 100 @@ -390,7 +404,7 @@ void vd_printf( int level, const char *str, ...){ #endif va_start(ap, str); - vprintf(str, ap); + vprintf(mp_gettext(str), ap); va_end(ap); } @@ -428,30 +442,6 @@ static void draw_alpha( int x0,int y0, int w,int h, unsigned char* src, unsigned -// I had tried to work with mmx/3dnow copy code but -// there was not much speed gain and I didn't know -// how to save the FPU/mmx registers - so the copy -// code interferred with sound output ... -// removed the leftovers -// acki2 on 30/3/2001 - - -#define rep_movsl(dest, src, numwords, d_add, count) \ -__asm__ __volatile__( \ -" \ -1: \n\t\ - movl %%edx, %%ecx \n\t \ - cld\n\t \ - rep\n\t \ - movsl \n\t\ - add %%eax, %%edi \n\t\ - dec %%ebx \n\t\ - jnz 1b \n\t\ -" \ - : \ - : "a" (d_add), "b" (count), "S" (src), "D" (dest), \ - "d" (numwords) \ - : "memory" ) // quick & dirty - for debugging only @@ -610,7 +600,7 @@ static uint32_t query_format( uint32_t format ) } if( !vo_init() ){ vd_printf(VD_ERR, "vo_dga: vo_init() failed!\n"); - return 1; + return 0; } vo_dga_XServer_mode = vd_ValidateMode(vo_depthonscreen); @@ -669,11 +659,16 @@ static uint32_t query_format( uint32_t format ) } } - // TODO: respect bit for native/not native - if( format==IMGFMT_YV12 ) return 7; + if( format==IMGFMT_YV12 ) return VFCAP_CSP_SUPPORTED; if( (format&IMGFMT_BGR_MASK) == IMGFMT_BGR && - vd_ModeValid(format&0xff)) return 7; + vd_ModeValid(format&0xff)) + { + if (vd_ModeSupportedMethod(format&0xff) == VDM_CONV_NATIVE) + return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD; + else + return VFCAP_CSP_SUPPORTED|VFCAP_OSD; + } return 0; } |