Branch: Tag:

1999-08-12

1999-08-12 14:01:33 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

moved MMX back to layers_oper

Rev: src/modules/Image/layer_oper.h:1.6
Rev: src/modules/Image/layers.c:1.36

16: Inside #if undefined(L_LOGIC)
   else if (alpha==1.0)    {    if (!la) /* no layer alpha => full opaque */ +  { + #ifdef L_MMX_OPER + #ifdef TRY_USE_MMX +  extern int try_use_mmx; +  if(try_use_mmx) +  { +  int num=sizeof(rgb_group) * len; +  unsigned char *source=(char *)s; +  unsigned char *dest=(char *)d; +  unsigned char *sourcel=(char *)l; +  +  while (num-->0 && (7&(int)dest)) +  { +  *dest=L_TRUNC(L_OPER(*source,*sourcel)); +  source++; +  sourcel++; +  dest++; +  } +  +  +  while(num > 16) +  { +  moveq_m2r(*source, mm0); +  moveq_m2r(source[8], mm1); +  L_MMX_OPER(*sourcel, mm0); +  L_MMX_OPER(sourcel[8], mm1); /* paddusb_m2r */ +  moveq_r2m(mm0,*dest); +  moveq_r2m(mm1,dest[8]); +  source+=16; +  sourcel+=16; +  dest+=16; +  } +  if (num > 8) +  { +  movq_m2r(*source, mm0); +  L_MMX_OPER(*sourcel, mm0); +  movq_r2m(mm0,*dest); +  source+=8; +  sourcel+=8; +  dest+=8; +  num-=8; +  } +  emms(); +  while (num-->0) +  { +  *dest=L_TRUNC(L_OPER(*source,*sourcel)); +  source++; +  sourcel++; +  dest++; +  } +  } +  else + #endif + #endif    while (len--)    {    d->r=L_TRUNC(L_OPER(s->r,l->r));
24: Inside #if undefined(L_LOGIC)
   *da=white;    l++; s++; sa++; da++; d++;    } +  }    else    while (len--)    {