comparison libvo/vo_dga.c @ 1336:345165f41f1b

vo_dga doesn't compile on non-x86 architecture due to x86 asm usage.
author jkeil
date Mon, 16 Jul 2001 18:41:52 +0000
parents 9877eaacff9e
children d40f2b686846
comparison
equal deleted inserted replaced
1335:71c0f15c4712 1336:345165f41f1b
21 * BGR_32_24_888 21 * BGR_32_24_888
22 * 22 *
23 * - works only on x86 architectures 23 * - works only on x86 architectures
24 * 24 *
25 * $Log$ 25 * $Log$
26 * Revision 1.29 2001/07/16 18:41:52 jkeil
27 * vo_dga doesn't compile on non-x86 architecture due to x86 asm usage.
28 *
26 * Revision 1.28 2001/07/03 23:45:49 arpi 29 * Revision 1.28 2001/07/03 23:45:49 arpi
27 * extern vo_doublebuffering cleanup 30 * extern vo_doublebuffering cleanup
28 * 31 *
29 * Revision 1.27 2001/06/22 19:51:25 atmosfear 32 * Revision 1.27 2001/06/22 19:51:25 atmosfear
30 * Fixed pointer->integer cast warning. 33 * Fixed pointer->integer cast warning.
124 //#undef HAVE_DGA2 127 //#undef HAVE_DGA2
125 //#undef HAVE_XF86VM 128 //#undef HAVE_XF86VM
126 129
127 #include <stdio.h> 130 #include <stdio.h>
128 #include <stdlib.h> 131 #include <stdlib.h>
132 #include <stdarg.h>
129 #include <string.h> 133 #include <string.h>
130 134
131 #include "config.h" 135 #include "config.h"
132 #include "video_out.h" 136 #include "video_out.h"
133 #include "video_out_internal.h" 137 #include "video_out_internal.h"
334 #define VD_ERR 0 338 #define VD_ERR 0
335 #define VD_DBG 2 339 #define VD_DBG 2
336 #define VD_RES 1 340 #define VD_RES 1
337 341
338 void vd_printf( int level, const char *str, ...){ 342 void vd_printf( int level, const char *str, ...){
339 343 va_list ap;
344
340 #ifndef VO_DGA_DBG 345 #ifndef VO_DGA_DBG
341 // show resolution and DBG-messages only in verbose mode ... 346 // show resolution and DBG-messages only in verbose mode ...
342 if( !verbose && level)return; 347 if( !verbose && level)return;
343 #endif 348 #endif
344 vprintf( str, (&str)+1 ); 349
350 va_start(ap, str);
351 vprintf(str, ap);
352 va_end(ap);
345 } 353 }
346 354
347 //--------------------------------------------------------- 355 //---------------------------------------------------------
348 356
349 static void draw_alpha( int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride ){ 357 static void draw_alpha( int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride ){
428 d = (&((char *)vo_dga_base)[vo_dga_vp_offset + vo_dga_dbf_current * vo_dga_dbf_mem_offset]); 436 d = (&((char *)vo_dga_base)[vo_dga_vp_offset + vo_dga_dbf_current * vo_dga_dbf_mem_offset]);
429 437
430 switch(SRC_MODE.vdm_conversion_func){ 438 switch(SRC_MODE.vdm_conversion_func){
431 case VDM_CONV_NATIVE: 439 case VDM_CONV_NATIVE:
432 440
433 #ifdef HAVE_MMX 441 #if defined(HAVE_MMX) || !defined(ARCH_X86)
434 // use the code from fastmemcpy.h 442 // use the code from fastmemcpy.h on x86,
443 // or ordinary memcpy on non-x86 cpus.
435 if(vo_dga_vp_skip){ 444 if(vo_dga_vp_skip){
436 // use some stride ... 445 // use some stride ...
437 int i; 446 int i;
438 for(i=0; i< vo_dga_lines; i++){ 447 for(i=0; i< vo_dga_lines; i++){
439 memcpy(d, s, vo_dga_bytes_per_line); 448 memcpy(d, s, vo_dga_bytes_per_line);
443 } 452 }
444 }else{ 453 }else{
445 // no stride, cool + fast ... 454 // no stride, cool + fast ...
446 memcpy(d,s, vo_dga_bytes_per_line * vo_dga_lines); 455 memcpy(d,s, vo_dga_bytes_per_line * vo_dga_lines);
447 } 456 }
448 #else 457 #else /* ARCH_X86 and NO_MMX */
449 // use some homebrewn assembly code ... 458 // use some homebrewn assembly code ...
450 rep_movsl(d, s, lpl, vo_dga_vp_skip, numlines ); 459 rep_movsl(d, s, lpl, vo_dga_vp_skip, numlines );
451 #endif 460 #endif
452 461
453 // DBG-COde 462 // DBG-COde