[Mplayer-cvslog] CVS: main/vidix/drivers nvidia_vid.c,1.14,1.15
Sascha Sommer CVS
faust3 at mplayerhq.hu
Fri Oct 17 13:27:11 CEST 2003
Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv11745/vidix/drivers
Modified Files:
nvidia_vid.c
Log Message:
double buffering fix for cards > NV04 && windows colorkeying fix
Index: nvidia_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/nvidia_vid.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- nvidia_vid.c 17 Oct 2003 09:18:47 -0000 1.14
+++ nvidia_vid.c 17 Oct 2003 11:26:36 -0000 1.15
@@ -416,16 +416,25 @@
b = chromakey & 0x000000FF;
switch (info->depth) {
case 15:
- key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)) | 0x00008000;
+ key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3));
+#ifndef WIN32
+ key = key | 0x00008000;
+#endif
break;
case 16: // XXX unchecked
- key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)) | 0x00008000;
+ key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3));
+#ifndef WIN32
+ key = key | 0x00008000;
+#endif
break;
- case 24: // XXX unchecked, maybe swap order of masking
+ case 24: // XXX unchecked, maybe swap order of masking - FIXME Can the card be in 24 bit mode anyway?
key = (chromakey & 0x00FFFFFF) | 0x00800000;
break;
case 32:
- key = chromakey | 0x80000000;
+ key = chromakey;
+#ifndef WIN32
+ key = key | 0x80000000;
+#endif
break;
}
//printf("[nvidia_vid] depth=%d %08X \n", info->depth, chromakey);
@@ -515,17 +524,17 @@
case NV_ARCH_30:
/* NV_PVIDEO_BASE */
- VID_WR32 (info->chip.PVIDEO, 0x900 + 0, base);
+ VID_WR32 (info->chip.PVIDEO, 0x900 + 0, base + offset);
//VID_WR32 (info->chip.PVIDEO, 0x900 + 4, base);
/* NV_PVIDEO_LIMIT */
- VID_WR32 (info->chip.PVIDEO, 0x908 + 0, base + size - 1);
+ VID_WR32 (info->chip.PVIDEO, 0x908 + 0, base + offset + size - 1);
//VID_WR32 (info->chip.PVIDEO, 0x908 + 4, base + size - 1);
/* extra code for NV20 && NV30 architectures */
if (info->chip.arch == NV_ARCH_20 || info->chip.arch == NV_ARCH_30) {
- VID_WR32 (info->chip.PVIDEO, 0x800 + 0, base);
+ VID_WR32 (info->chip.PVIDEO, 0x800 + 0, base + offset);
//VID_WR32 (info->chip.PVIDEO, 0x800 + 4, base);
- VID_WR32 (info->chip.PVIDEO, 0x808 + 0, base + size - 1);
+ VID_WR32 (info->chip.PVIDEO, 0x808 + 0, base + offset + size - 1);
//VID_WR32 (info->chip.PVIDEO, 0x808 + 4, base + size - 1);
}
@@ -537,7 +546,7 @@
//VID_WR32 (info->chip.PVIDEO, 0x918 + 4, 0x00001000);
/* NV_PVIDEO_OFFSET */
- VID_WR32 (info->chip.PVIDEO, 0x920 + 0, offset + 0);
+ VID_WR32 (info->chip.PVIDEO, 0x920 + 0, 0x0);
//VID_WR32 (info->chip.PVIDEO, 0x920 + 4, offset + pitch);
/* NV_PVIDEO_SIZE_IN */
VID_WR32 (info->chip.PVIDEO, 0x928 + 0, ((info->height) << 16) | info->width);
More information about the MPlayer-cvslog
mailing list