Hi, this patch merge all color that are transparent (alpha = 0) in ClosestColor. This allow to save precious color Index on ff cards. Matthieu
--- vdr-1.6.0/osd.c 2007-10-12 14:38:36.000000000 +0200 +++ vdr-1.6.0p/osd.c 2009-11-21 21:33:09.000000000 +0100 @@ -141,6 +141,8 @@ int B1 = (Color & 0x000000FF); for (int i = 0; i < numColors; i++) { int A2 = (color[i] & 0xFF000000) >> 24; + if (A2 == 0 && A1 == 0) + diff = 0; int R2 = (color[i] & 0x00FF0000) >> 16; int G2 = (color[i] & 0x0000FF00) >> 8; int B2 = (color[i] & 0x000000FF); @@ -149,6 +151,8 @@ d = diff; n = i; } + if (d == 0) + break; } return d <= MaxDiff ? n : -1; }
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr