diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-01-03 22:53:04 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-01-03 22:53:04 +0300 |
commit | 3bbc65a5f418e7b9658ef791518e5b9872745d29 (patch) | |
tree | 262b35502d49731ce9f1021583a49cf9a297bd46 /source/blender/imbuf/intern/divers.c | |
parent | 40813b301aff7c1cb1c574f0f6570e05a5ca5eed (diff) |
This is a pretty lame commit but here it is:
I just fixed indentation (replaced spaces with tabs where needed) and removed
#include config.h stuff from the above files.
Kent
Diffstat (limited to 'source/blender/imbuf/intern/divers.c')
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 80 |
1 files changed, 38 insertions, 42 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 70958b08c21..3603128ce44 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -40,10 +40,6 @@ #include "IMB_imbuf.h" #include "IMB_divers.h" -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - void imb_checkncols(struct ImBuf *ibuf) { unsigned int i; @@ -114,55 +110,55 @@ void IMB_de_interlace(struct ImBuf *ibuf) void IMB_interlace(struct ImBuf *ibuf) { - struct ImBuf * tbuf1, * tbuf2; + struct ImBuf * tbuf1, * tbuf2; - if (ibuf == 0) return; - ibuf->flags &= ~IB_fields; + if (ibuf == 0) return; + ibuf->flags &= ~IB_fields; - ibuf->y *= 2; + ibuf->y *= 2; - 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); + 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); - IMB_rectop(tbuf1, ibuf, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, + IMB_rectop(tbuf1, ibuf, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, 0); - IMB_rectop(tbuf2, ibuf, 0, 0, 0, tbuf2->y, 32767, 32767, - IMB_rectcpy,0); + IMB_rectop(tbuf2, ibuf, 0, 0, 0, tbuf2->y, 32767, 32767, + IMB_rectcpy,0); - ibuf->x *= 2; - IMB_rectop(ibuf, tbuf1, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, + ibuf->x *= 2; + IMB_rectop(ibuf, tbuf1, 0, 0, 0, 0, 32767, 32767, IMB_rectcpy, 0); - IMB_rectop(ibuf, tbuf2, tbuf2->x, 0, 0, 0, 32767, 32767, - IMB_rectcpy,0); - ibuf->x /= 2; + IMB_rectop(ibuf, tbuf2, tbuf2->x, 0, 0, 0, 32767, 32767, + IMB_rectcpy,0); + ibuf->x /= 2; - IMB_freeImBuf(tbuf1); - IMB_freeImBuf(tbuf2); - } + IMB_freeImBuf(tbuf1); + IMB_freeImBuf(tbuf2); + } } void IMB_gamwarp(struct ImBuf *ibuf, double gamma) { - uchar gam[256]; - int i; - uchar *rect; - - if (ibuf == 0) return; - if (ibuf->rect == 0) return; - if (gamma == 1.0) return; - - gamma = 1.0 / gamma; - for (i = 255 ; i >= 0 ; i--) gam[i] = (255.0 * pow(i / 255.0 , - gamma)) + 0.5; - - rect = (uchar *) ibuf->rect; - for (i = ibuf->x * ibuf->y ; i>0 ; i--){ - rect ++; - *rect ++ = gam[*rect]; - *rect ++ = gam[*rect]; - *rect ++ = gam[*rect]; - } + uchar gam[256]; + int i; + uchar *rect; + + if (ibuf == 0) return; + if (ibuf->rect == 0) return; + if (gamma == 1.0) return; + + gamma = 1.0 / gamma; + for (i = 255 ; i >= 0 ; i--) gam[i] = (255.0 * pow(i / 255.0 , + gamma)) + 0.5; + + rect = (uchar *) ibuf->rect; + for (i = ibuf->x * ibuf->y ; i>0 ; i--){ + rect ++; + *rect ++ = gam[*rect]; + *rect ++ = gam[*rect]; + *rect ++ = gam[*rect]; + } } |