diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-25 05:12:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-25 05:12:34 +0300 |
commit | 030130942562bb7b84eeba53e0226abed5a63a4c (patch) | |
tree | 9b49208facf2801369c9d2d7b3e7af11fab36829 /vidix | |
parent | 562d86d95cbba67cb58358f6fc334553a467dee7 (diff) | |
parent | 15a80092161a1cd305f8005c780c744416a5252b (diff) | |
download | mpv-030130942562bb7b84eeba53e0226abed5a63a4c.tar.bz2 mpv-030130942562bb7b84eeba53e0226abed5a63a4c.tar.xz |
Merge svn changes up to 27824
Conflicts:
cfg-common-opts.h
libmpcodecs/dec_video.c
libmpcodecs/vd.c
libvo/x11_common.h
mplayer.c
stream/cache2.c
Diffstat (limited to 'vidix')
-rw-r--r-- | vidix/AsmMacros.h | 9 | ||||
-rw-r--r-- | vidix/dha.c | 2 | ||||
-rw-r--r-- | vidix/dha.h | 2 | ||||
-rw-r--r-- | vidix/nvidia_vid.c | 9 | ||||
-rw-r--r-- | vidix/pci.c | 3 | ||||
-rw-r--r-- | vidix/s3_regs.h | 2 | ||||
-rw-r--r-- | vidix/sysdep/AsmMacros_powerpc.h | 2 | ||||
-rw-r--r-- | vidix/sysdep/AsmMacros_sparc.h | 12 | ||||
-rw-r--r-- | vidix/sysdep/AsmMacros_x86.h | 16 | ||||
-rw-r--r-- | vidix/sysdep/libdha_win32.c | 5 | ||||
-rw-r--r-- | vidix/sysdep/pci_os2.c | 2 |
11 files changed, 26 insertions, 38 deletions
diff --git a/vidix/AsmMacros.h b/vidix/AsmMacros.h index f40929ade5..c202fd4cec 100644 --- a/vidix/AsmMacros.h +++ b/vidix/AsmMacros.h @@ -99,11 +99,6 @@ void outl(U16_t, U32_t); #else /* not _MINIX and _ACK */ -# if defined(__STDC__) && (__STDC__ == 1) -# ifndef NCR -# define asm __asm -# endif -# endif # ifdef SVR4 # include <sys/types.h> # ifndef __USLC__ @@ -115,8 +110,8 @@ void outl(U16_t, U32_t); #else # include "../common/scoasm.h" #endif -#define intr_disable() asm("cli") -#define intr_enable() asm("sti") +#define intr_disable() __asm__("cli") +#define intr_enable() __asm__("sti") #endif /* _MINIX and _ACK */ #endif /* __GNUC__ */ diff --git a/vidix/dha.c b/vidix/dha.c index 28dc8c8c09..638be29328 100644 --- a/vidix/dha.c +++ b/vidix/dha.c @@ -48,7 +48,7 @@ #endif #include <unistd.h> -#if defined(WIN32) +#if defined(__MINGW32__) || defined(__CYGWIN__) #include "sysdep/libdha_win32.c" #elif defined (__EMX__) #include "sysdep/libdha_os2.c" diff --git a/vidix/dha.h b/vidix/dha.h index eb2a269c46..501215172d 100644 --- a/vidix/dha.h +++ b/vidix/dha.h @@ -42,7 +42,7 @@ #define MAX_DEV_PER_VENDOR_CFG1 64 #define MAX_PCI_DEVICES_PER_BUS 32 -#define MAX_PCI_DEVICES 64 +#define MAX_PCI_DEVICES 256 #define PCI_MULTIFUNC_DEV 0x80 #define PCI_COMMAND_IO 0x1 /* Enable response to I/O space */ diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c index 30e30a9e38..4c86322932 100644 --- a/vidix/nvidia_vid.c +++ b/vidix/nvidia_vid.c @@ -372,7 +372,7 @@ static int nv_probe(int verbose, int force){ * PCI-Memory IO access macros. */ -#define MEM_BARRIER() __asm__ __volatile__ ("" : : : "memory") +#define MEM_BARRIER() __asm__ volatile ("" : : : "memory") #undef VID_WR08 #define VID_WR08(p,i,val) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]=(val); }) @@ -614,13 +614,14 @@ static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){ switch (info->depth) { case 15: key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)); -#ifndef WIN32 + +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x00008000; #endif break; case 16: // XXX unchecked key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)); -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x00008000; #endif break; @@ -629,7 +630,7 @@ static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){ break; case 32: key = chromakey; -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x80000000; #endif break; diff --git a/vidix/pci.c b/vidix/pci.c index 1006b14a80..64d2a6c8b3 100644 --- a/vidix/pci.c +++ b/vidix/pci.c @@ -439,9 +439,6 @@ struct pci_config_reg { }; #endif /* !defined(__powerpc__) */ -#define MAX_DEV_PER_VENDOR_CFG1 64 -#define MAX_PCI_DEVICES_PER_BUS 32 -#define MAX_PCI_DEVICES 64 #define NF ((void (*)())NULL), { 0.0, 0, 0, NULL } #define PCI_MULTIFUNC_DEV 0x80 #define PCI_ID_REG 0x00 diff --git a/vidix/s3_regs.h b/vidix/s3_regs.h index 0add1bea54..4fd0e427cf 100644 --- a/vidix/s3_regs.h +++ b/vidix/s3_regs.h @@ -196,7 +196,7 @@ do { \ #ifndef USE_RMW_CYCLES /* Can be used to inhibit READ-MODIFY-WRITE cycles. On by default. */ -#define MEM_BARRIER() __asm__ __volatile__ ("" : : : "memory") +#define MEM_BARRIER() __asm__ volatile ("" : : : "memory") #undef VID_WR08 #define VID_WR08(p,i,val) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]=(val); }) diff --git a/vidix/sysdep/AsmMacros_powerpc.h b/vidix/sysdep/AsmMacros_powerpc.h index 7120446afe..0ae2fd57d2 100644 --- a/vidix/sysdep/AsmMacros_powerpc.h +++ b/vidix/sysdep/AsmMacros_powerpc.h @@ -68,7 +68,7 @@ extern unsigned char *ioBase; static __inline__ volatile void eieio() { - __asm__ __volatile__ ("eieio"); + __asm__ volatile ("eieio"); } static __inline__ void outb(short port, unsigned char value) diff --git a/vidix/sysdep/AsmMacros_sparc.h b/vidix/sysdep/AsmMacros_sparc.h index 2358adea6f..8ffdde26e1 100644 --- a/vidix/sysdep/AsmMacros_sparc.h +++ b/vidix/sysdep/AsmMacros_sparc.h @@ -68,37 +68,37 @@ static __inline__ void outb(unsigned long port, char val) { - __asm__ __volatile__("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outw(unsigned long port, char val) { - __asm__ __volatile__("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outl(unsigned long port, char val) { - __asm__ __volatile__("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ unsigned int inb(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inw(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inl(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } diff --git a/vidix/sysdep/AsmMacros_x86.h b/vidix/sysdep/AsmMacros_x86.h index c0b1afc105..6bebeaa505 100644 --- a/vidix/sysdep/AsmMacros_x86.h +++ b/vidix/sysdep/AsmMacros_x86.h @@ -171,7 +171,7 @@ static __inline__ void outb(short port,char val) } else #endif - __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outb %0,%1" : :"a" (val), "d" (port)); return; } @@ -199,7 +199,7 @@ static __inline__ void outw(short port,short val) } else #endif - __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outw %0,%1" : :"a" (val), "d" (port)); return; } @@ -227,7 +227,7 @@ static __inline__ void outl(short port,unsigned int val) } else #endif - __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outl %0,%1" : :"a" (val), "d" (port)); return; } @@ -255,7 +255,7 @@ static __inline__ unsigned int inb(short port) } else #endif - __asm__ __volatile__("inb %1,%0" : + __asm__ volatile("inb %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -285,7 +285,7 @@ static __inline__ unsigned int inw(short port) } else #endif - __asm__ __volatile__("inw %1,%0" : + __asm__ volatile("inw %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -315,7 +315,7 @@ static __inline__ unsigned int inl(short port) } else #endif - __asm__ __volatile__("inl %1,%0" : + __asm__ volatile("inl %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -327,7 +327,7 @@ static __inline__ void intr_disable() if (svgahelper_initialized == 1) return; #endif - __asm__ __volatile__("cli"); + __asm__ volatile("cli"); } static __inline__ void intr_enable() @@ -336,7 +336,7 @@ static __inline__ void intr_enable() if (svgahelper_initialized == 1) return; #endif - __asm__ __volatile__("sti"); + __asm__ volatile("sti"); } #endif /* MPLAYER_ASMMACROS_X86_H */ diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c index ba3bacb5aa..4f6075194f 100644 --- a/vidix/sysdep/libdha_win32.c +++ b/vidix/sysdep/libdha_win32.c @@ -31,9 +31,6 @@ typedef struct MapDevRequest /*#include "winioctl.h"*/ #define FILE_DEVICE_UNKNOWN 0x00000022 #define METHOD_NEITHER 3 -#define FILE_ANY_ACCESS 0 -#define CTL_CODE( DeviceType, Function, Method, Access ) ( \ - ((DeviceType)<<16) | ((Access)<<14) | ((Function)<<2) | (Method) ) int IsWinNT(){ @@ -51,10 +48,8 @@ void *map_phys_mem(unsigned long base, unsigned long size) { if(!IsWinNT()){ HANDLE hDevice ; PVOID inBuf[1] ; /* buffer for struct pointer to VxD */ - DWORD RetInfo[2] ; /* buffer to receive data from VxD */ DWORD cbBytesReturned ; /* count of bytes returned from VxD */ MAPDEVREQUEST req ; /* map device request structure */ - DWORD *pNicstar, Status, Time ; int i ; char *endptr ; const PCHAR VxDName = "\\\\.\\MAPDEV.VXD" ; const PCHAR VxDNameAlreadyLoaded = "\\\\.\\MAPDEV" ; diff --git a/vidix/sysdep/pci_os2.c b/vidix/sysdep/pci_os2.c index 002494f682..5e19463820 100644 --- a/vidix/sysdep/pci_os2.c +++ b/vidix/sysdep/pci_os2.c @@ -62,7 +62,7 @@ static __inline__ int enable_os_io(void) /* Calling callgate with function 13 sets IOPL for the program */ - asm volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" + __asm__ volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" : /*no outputs */ : /*no inputs */ : "eax","ebx","ecx","edx","cc"); |