diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-10 18:54:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-10 18:58:08 +0300 |
commit | a6ea38d345b77f740a553fdc053afead814c58f1 (patch) | |
tree | 2d0cfe2bbe758ea3c1e12b587698543aba18705d /source/blender/imbuf/intern | |
parent | 7f5e4a819c4cd30861e424a28a47e0c0a5d1837a (diff) |
Cleanup: remove unused interlace code after removal of fields.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 1 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 56 | ||||
-rw-r--r-- | source/blender/imbuf/intern/readimage.c | 1 | ||||
-rw-r--r-- | source/blender/imbuf/intern/stereoimbuf.c | 2 |
4 files changed, 0 insertions, 60 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 589955d2ab3..58554693aeb 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -521,7 +521,6 @@ ImBuf *IMB_dupImBuf(const ImBuf *ibuf1) x = ibuf1->x; y = ibuf1->y; - if (ibuf1->flags & IB_fields) y *= 2; ibuf2 = IMB_allocImBuf(x, y, ibuf1->planes, flags); if (ibuf2 == NULL) return NULL; diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 2b6fa573e63..e6635080163 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -45,62 +45,6 @@ #include "MEM_guardedalloc.h" -/**************************** Interlace/Deinterlace **************************/ - -void IMB_de_interlace(ImBuf *ibuf) -{ - ImBuf *tbuf1, *tbuf2; - - if (ibuf == NULL) 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); - tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); - - ibuf->x *= 2; - IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); - IMB_rectcpy(tbuf2, ibuf, 0, 0, tbuf2->x, 0, ibuf->x, ibuf->y); - - ibuf->x /= 2; - IMB_rectcpy(ibuf, tbuf1, 0, 0, 0, 0, tbuf1->x, tbuf1->y); - IMB_rectcpy(ibuf, tbuf2, 0, tbuf2->y, 0, 0, tbuf2->x, tbuf2->y); - - IMB_freeImBuf(tbuf1); - IMB_freeImBuf(tbuf2); - } - ibuf->y /= 2; -} - -void IMB_interlace(ImBuf *ibuf) -{ - ImBuf *tbuf1, *tbuf2; - - if (ibuf == NULL) return; - ibuf->flags &= ~IB_fields; - - ibuf->y *= 2; - - if (ibuf->rect) { - /* make copies */ - tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); - tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect); - - IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); - IMB_rectcpy(tbuf2, ibuf, 0, 0, 0, tbuf2->y, ibuf->x, ibuf->y); - - ibuf->x *= 2; - IMB_rectcpy(ibuf, tbuf1, 0, 0, 0, 0, tbuf1->x, tbuf1->y); - IMB_rectcpy(ibuf, tbuf2, tbuf2->x, 0, 0, 0, tbuf2->x, tbuf2->y); - ibuf->x /= 2; - - IMB_freeImBuf(tbuf1); - IMB_freeImBuf(tbuf2); - } -} - /************************* Floyd-Steinberg dithering *************************/ typedef struct DitherContext { diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index 0b4490a3beb..0cb1ab4b2c5 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -230,7 +230,6 @@ ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_S BLI_strncpy(ibuf->cachename, filepath_tx, sizeof(ibuf->cachename)); for (a = 1; a < ibuf->miptot; a++) BLI_strncpy(ibuf->mipmap[a - 1]->cachename, filepath_tx, sizeof(ibuf->cachename)); - if (flags & IB_fields) IMB_de_interlace(ibuf); } close(file); diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c index a4418443790..7c58815c216 100644 --- a/source/blender/imbuf/intern/stereoimbuf.c +++ b/source/blender/imbuf/intern/stereoimbuf.c @@ -722,7 +722,6 @@ ImBuf *IMB_stereo3d_ImBuf(ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *i ibuf_stereo->rect_colorspace = ibuf_left->rect_colorspace; ibuf_stereo->float_colorspace = ibuf_left->float_colorspace; - /* copy flags for IB_fields and other settings */ ibuf_stereo->flags = ibuf_left->flags; imb_stereo3d_data_initialize( @@ -1233,7 +1232,6 @@ void IMB_ImBufFromStereo3d( ibuf_left = IMB_allocImBuf(width, height, ibuf_stereo3d->planes, (is_float ? IB_rectfloat : IB_rect)); ibuf_right = IMB_allocImBuf(width, height, ibuf_stereo3d->planes, (is_float ? IB_rectfloat : IB_rect)); - /* copy flags for IB_fields and other settings */ ibuf_left->flags = ibuf_stereo3d->flags; ibuf_right->flags = ibuf_stereo3d->flags; |