mirror of
https://github.com/mpv-player/mpv
synced 2024-12-11 17:37:23 +00:00
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, git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11119 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
cf31c8d514
commit
dd1dae5c38
@ -415,18 +415,19 @@ static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user