forked from enlightenment/efl
linux ppc altivec patches - and some tiler speedusp while i was hunting a non-bug
SVN revision: 18122
This commit is contained in:
parent
cc996d8804
commit
34a58f38e0
|
@ -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,34 +72,30 @@ const int _cgv = RZ(CGV); /* 0.813 */
|
|||
|
||||
#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,
|
||||
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 = (vector unsigned char)
|
||||
(0, 0x9, 0x19, 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 = (vector unsigned char)
|
||||
(0x3, 0x1, 0x2, 0x11,
|
||||
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 = (vector unsigned char)
|
||||
(0x3, 0x1, 0x2, 0x19,
|
||||
const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19,
|
||||
0x7, 0x5, 0x6, 0x1b,
|
||||
0xb, 0x9, 0xa, 0x1d,
|
||||
0xf, 0xd, 0xe, 0x1f);
|
||||
|
@ -546,7 +548,7 @@ _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h)
|
|||
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);
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ evas_common_tilebuf_new(int w, int h)
|
|||
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 @@ evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th)
|
|||
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 @@ evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
|
|||
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 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
|
|||
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 @@ evas_common_tilebuf_add_motion_vector(Tilebuf *tb, int x, int y, int w, int h, i
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue