Logo Search packages:      
Sourcecode: blender version File versions

void IMB_de_interlace ( struct ImBuf ibuf  ) 

Attention:
Defined in divers.c

Definition at line 88 of file divers.c.

References ImBuf::flags, IB_rect, IMB_allocImBuf(), IMB_de_interlace(), IMB_freeImBuf(), IMB_rectcpy(), IMB_rectop(), ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by IMB_de_interlace(), and IMB_loadiffname().

{
      struct ImBuf * tbuf1, * tbuf2;
      
      if (ibuf == 0) return;
      if (ibuf->flags & IB_fields) return;
      ibuf->flags |= IB_fields;
      
      if (ibuf->rect) {
            /* make copies */
            tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
            tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
            
            ibuf->x *= 2;     
            IMB_rectop(tbuf1, ibuf, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, 0);
            IMB_rectop(tbuf2, ibuf, 0, 0, tbuf2->x, 0, 32767, 32767, IMB_rectcpy, 0);
      
            ibuf->x /= 2;
            IMB_rectop(ibuf, tbuf1, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, 0);
            IMB_rectop(ibuf, tbuf2, 0, tbuf2->y, 0, 0, 32767, 32767, IMB_rectcpy, 0);
            
            IMB_freeImBuf(tbuf1);
            IMB_freeImBuf(tbuf2);
      }
      ibuf->y /= 2;
}


Generated by  Doxygen 1.6.0   Back to index