Mercurial > mplayer.hg
changeset 11118:344052fdfc4a
Fix colorkey for xvidix, tested on Riva128 4MB X@15/16/24bpp (aka 15/15/32 in nvidia_vid)
This is very cool, using mplayer -vo xvidix -ao oss -framedrop -dr movie.avi I can play
640x272 DivX 1MBps on PII 233, 64MB, i440LX, Riva128 4MB AGP, FreeBSD 5.0, XFree 4.2.0,
with little framedrop,
author | atmos4 |
---|---|
date | Tue, 14 Oct 2003 21:29:25 +0000 |
parents | 9a6fbdb320a4 |
children | 2ff29f50f35c |
files | vidix/drivers/nvidia_vid.c |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/vidix/drivers/nvidia_vid.c Tue Oct 14 21:03:37 2003 +0000 +++ b/vidix/drivers/nvidia_vid.c Tue Oct 14 21:29:25 2003 +0000 @@ -415,18 +415,19 @@ b = chromakey & 0x000000FF; switch (info->depth) { case 15: - key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)); + key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)) | 0x00008000; break; - case 16: - key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)); + case 16: // XXX unchecked + key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)) | 0x00008000; break; - case 24: - key = chromakey & 0x00FFFFFF; + case 24: // XXX unchecked, maybe swap order of masking + key = (chromakey & 0x00FFFFFF) | 0x00800000; break; case 32: - key = chromakey; + key = chromakey | 0x80000000; break; } + //printf("[nvidia_vid] depth=%d %08X \n", info->depth, chromakey); if(!info->use_colorkey)return; switch (info->chip.arch) { case NV_ARCH_10: