Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_double_fast_y ( struct ImBuf ibuf1  )  [read]

Attention:
defined in scaling.c

Definition at line 172 of file scaling.c.

References ImBuf::depth, IMB_allocImBuf(), IMB_double_fast_y(), ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by IMB_double_fast_y(), and IMB_double_y().

{
      struct ImBuf *ibuf2;
      int *p1, *dest1, *dest2;
      short x,y;

      if (ibuf1==0) return (0);
      if (ibuf1->rect == 0) return (0);

      ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth,1,0);
      if (ibuf2==0) return (0);

      p1 = (int *) ibuf1->rect;
      dest1=(int *) ibuf2->rect;

      for(y = ibuf1->y ; y>0 ; y--){
            dest2 = dest1 + ibuf2->x;
            for(x = ibuf2->x ; x>0 ; x--) *dest1++ = *dest2++ = *p1++;
            dest1 = dest2;
      }

      return (ibuf2);
}


Generated by  Doxygen 1.6.0   Back to index