Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/common


Modified Files:
        evas_convert_yuv.c evas_tiler.c 


Log Message:


linux ppc altivec patches - and some tiler speedusp while i was hunting a 
non-bug

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_convert_yuv.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_convert_yuv.c  13 Oct 2005 02:38:31 -0000      1.12
+++ evas_convert_yuv.c  30 Oct 2005 03:03:53 -0000      1.13
@@ -6,6 +6,12 @@
 
 #if defined HAVE_ALTIVEC_H
 # include <altivec.h>
+#ifdef CONFIG_DARWIN
+#define AVV(x...) (x)
+#else
+#define AVV(x...) {x}
+#endif
+
 #endif
 
 #ifdef BUILD_CONVERT_YUV
@@ -66,37 +72,33 @@
 
 #ifdef BUILD_ALTIVEC
 #ifdef __VEC__
-const vector unsigned short res     = (vector unsigned short)(RES);
-const vector signed short crv       = (vector signed short)(RZ(CRV));
-const vector signed short cbu       = (vector signed short)(RZ(CBU));
-const vector signed short cgu       = (vector signed short)(RZ(CGU));
-const vector signed short cgv       = (vector signed short)(RZ(CGV));
-const vector signed short ymul      = (vector signed short)(RZ(YMUL));
-const vector signed short c128      = (vector signed short)(128);
-const vector signed short c32       = (vector signed short)(RZ(OFF));
-const vector signed short c16       = (vector signed short)(16);
-const vector unsigned char zero     = (vector unsigned char)(0);
-const vector signed short maxchar   = (vector signed short)(255);
-const vector unsigned char pickrg1  = (vector unsigned char)
-                                               (0, 0x1, 0x11, 0,
-                                                0, 0x3, 0x13, 0,
-                                                0, 0x5, 0x15, 0,
-                                                0, 0x7, 0x17, 0);
-const vector unsigned char pickrg2  = (vector unsigned char)
-                                               (0, 0x9, 0x19, 0,
-                                                0, 0xb, 0x1b, 0,
-                                                0, 0xd, 0x1d, 0,
-                                                0, 0xf, 0x1f, 0);
-const vector unsigned char pickrgb1 = (vector unsigned char)
-                                               (0x3, 0x1, 0x2, 0x11,
-                                                0x7, 0x5, 0x6, 0x13,
-                                                0xb, 0x9, 0xa, 0x15,
-                                                0xf, 0xd, 0xe, 0x17);
-const vector unsigned char pickrgb2 = (vector unsigned char)
-                                               (0x3, 0x1, 0x2, 0x19,
-                                                0x7, 0x5, 0x6, 0x1b,
-                                                0xb, 0x9, 0xa, 0x1d,
-                                                0xf, 0xd, 0xe, 0x1f);
+const vector unsigned short res     = AVV(RES);
+const vector signed short crv       = AVV(RZ(CRV));
+const vector signed short cbu       = AVV(RZ(CBU));
+const vector signed short cgu       = AVV(RZ(CGU));
+const vector signed short cgv       = AVV(RZ(CGV));
+const vector signed short ymul      = AVV(RZ(YMUL));
+const vector signed short c128      = AVV(128);
+const vector signed short c32       = AVV(RZ(OFF));
+const vector signed short c16       = AVV(16);
+const vector unsigned char zero     = AVV(0);
+const vector signed short maxchar   = AVV(255);
+const vector unsigned char pickrg1  = AVV(0, 0x1, 0x11, 0,
+                                         0, 0x3, 0x13, 0,
+                                         0, 0x5, 0x15, 0,
+                                         0, 0x7, 0x17, 0);
+const vector unsigned char pickrg2  = AVV(0, 0x9, 0x19, 0,
+                                         0, 0xb, 0x1b, 0,
+                                         0, 0xd, 0x1d, 0,
+                                         0, 0xf, 0x1f, 0);
+const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11,
+                                         0x7, 0x5, 0x6, 0x13,
+                                         0xb, 0x9, 0xa, 0x15,
+                                         0xf, 0xd, 0xe, 0x17);
+const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19,
+                                         0x7, 0x5, 0x6, 0x1b,
+                                         0xb, 0x9, 0xa, 0x1d,
+                                         0xf, 0xd, 0xe, 0x1f);
 #endif
 #endif
 
@@ -546,7 +548,7 @@
    dp1 = rgb;
    dp2 = rgb + (w * 4);
 
-   alpha = vec_mergeh((vector unsigned char)(255), zero);
+   alpha = vec_mergeh((vector unsigned char)AVV(255), zero);
    alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha,
                                            (vector unsigned short)zero);
 
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_tiler.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_tiler.c        22 May 2005 02:49:49 -0000      1.4
+++ evas_tiler.c        30 Oct 2005 03:03:53 -0000      1.5
@@ -23,8 +23,8 @@
    tb = calloc(1, sizeof(Tilebuf));
    if (!tb) return NULL;
 
-   tb->tile_size.w = 16;
-   tb->tile_size.h = 16;
+   tb->tile_size.w = 8;
+   tb->tile_size.h = 8;
    tb->outbuf_w = w;
    tb->outbuf_h = h;
 
@@ -57,79 +57,6 @@
    if (th) *th = tb->tile_size.h;
 }
 
-/* new update tile types:
- *
- * redraw        R  = redraw everything in the tile
- * blit          B  = blit area by dx or dy != 0
- * blit alpha    BA = area blit by dx or dy != 0 with alpha mask
- * no blit       N  = no redraw, no blit (dx & dy == 0)
- * no blit alpha NA = no blit, but alpha channel there
- * edge          E  = edge of blit or no blit tile area that rect only
- *                    partially fills
- *
- * existing tile types can be:
- *
- * R, B, N, E
- *
- * for delta rects:
- *
- *   +-----+
- * dx| New |
- * +-|     |
- * | +-----+
- * | Old | dy
- * +-----+
- *
- */
-
-/* redraw rect logic
- *
- * existing rect |    logic
- * R            ----> R
- * B            -+--> R in old input rect
- *               +--> R in new input rect
- * N            ----> R
- * E            ----> R
- *
- */
-
-/* motion vector logic
- *
- * apply: B
- * R            -+--> new input rect: B
- *               +--> old input rect: B, from = 1
- * B            -+--> new input rect: B
- *               +--> old input rect: if blits == then from = 0
- *               +--> old input rect: if blits != then R in old,new rect + dxdy
- * N
- * E
- *
- * apply: BA
- * R
- * B
- * N
- * E
- *
- * apply: N
- * R
- * B
- * N
- * E
- *
- * apply: NA
- * R
- * B
- * N
- * E
- *
- * apply: E
- * R
- * B
- * N
- * E
- *
- */
-
 int
 evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
 {
@@ -156,10 +83,10 @@
             for (xx = tx1; xx <= tx2; xx++)
               {
                  tbt->redraw = 1;
-                 num++;
                  tbt++;
               }
          }
+       num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
      }
    return num;
 #endif
@@ -194,10 +121,10 @@
             for (xx = tx1; xx <= tx2; xx++)
               {
                  tbt->redraw = 0;
-                 num++;
                  tbt++;
               }
          }
+       num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
      }
    return num;
 #endif
@@ -213,8 +140,6 @@
    num = evas_common_tilebuf_add_redraw(tb, x, y, w, h);
    num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h);
    return num;
-   /* FIXME: unused */
-   alpha = 0;
 }
 
 void




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to