These patches implement Sop_lut8_Kto_Dacc() and Sop_lut8_SKto_Dacc().
--
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
--- DirectFB/src/gfx/generic/generic.c 2003-02-16 15:29:18.000000000 +0200
+++ DirectFB/src/gfx/generic/generic.c 2003-03-19 04:40:17.000000000 +0200
@@ -1602,6 +1602,30 @@
#endif
+static void Sop_lut8_Kto_Dacc()
+{
+ int w = Dlength;
+ Accumulator *D = Dacc;
+ __u8 *S = (__u8*)Sop;
+
+ DFBColor *entries = Slut->entries;
+
+ while (w--) {
+ __u8 s = *S++;
+
+ if (s != (__u8)Skey) {
+ D->a = entries[s].a;
+ D->r = entries[s].r;
+ D->g = entries[s].g;
+ D->b = entries[s].b;
+ }
+ else
+ D->a = 0xF000;
+
+ D++;
+ }
+}
+
static GFunc Sop_PFI_Kto_Dacc[DFB_NUM_PIXELFORMATS] = {
Sop_argb1555_Kto_Dacc,
Sop_rgb16_Kto_Dacc,
@@ -1618,7 +1642,7 @@
NULL,
NULL,
NULL,
- NULL
+ Sop_lut8_Kto_Dacc
};
/********************************* Sacc_to_Aop_PFI ****************************/
--- DirectFB/src/gfx/generic/generic.c 2003-02-16 15:29:18.000000000 +0200
+++ DirectFB/src/gfx/generic/generic.c 2003-03-19 04:37:19.000000000 +0200
@@ -1149,6 +1149,34 @@
}
}
+static void Sop_lut8_SKto_Dacc()
+{
+ int w = Dlength;
+ int i = 0;
+
+ Accumulator *D = Dacc;
+ __u8 *S = (__u8*)Sop;
+
+ DFBColor *entries = Slut->entries;
+
+ while (w--) {
+ __u8 s = S[i>>16];
+
+ if (s != Skey) {
+ D->a = entries[s].a;
+ D->r = entries[s].r;
+ D->g = entries[s].g;
+ D->b = entries[s].b;
+ }
+ else
+ D->a = 0xF000;
+
+ i += SperD;
+
+ D++;
+ }
+}
+
static GFunc Sop_PFI_SKto_Dacc[DFB_NUM_PIXELFORMATS] = {
Sop_argb1555_SKto_Dacc,
Sop_rgb16_SKto_Dacc,
@@ -1161,7 +1189,7 @@
NULL,
NULL,
NULL,
- NULL
+ Sop_lut8_SKto_Dacc
};
/********************************* Sop_PFI_to_Dacc ****************************/