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/blenkernel | |
parent | 7f5e4a819c4cd30861e424a28a47e0c0a5d1837a (diff) |
Cleanup: remove unused interlace code after removal of fields.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 70 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/writeavi.c | 2 |
3 files changed, 0 insertions, 74 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 060ed4536a4..a41d9582add 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -114,8 +114,6 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const struc struct anim *openanim(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]); struct anim *openanim_noload(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]); -void BKE_image_de_interlace(struct Image *ima, int odd); - void BKE_image_make_local(struct Main *bmain, struct Image *ima, const bool lib_local); void BKE_image_tag_time(struct Image *ima); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index b6aeebd81a5..bf27d6021b6 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -186,76 +186,6 @@ void BKE_images_exit(void) BLI_spin_end(&image_spin); } -/* ******** IMAGE PROCESSING ************* */ - -static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */ -{ - struct 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 >> 1), (unsigned char)32, (int)IB_rect); - tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)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; -} - -static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */ -{ - struct 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 >> 1), (unsigned char)32, IB_rect); - tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)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, tbuf2, 0, 0, 0, 0, tbuf2->x, tbuf2->y); - IMB_rectcpy(ibuf, tbuf1, 0, tbuf2->y, 0, 0, tbuf1->x, tbuf1->y); - - IMB_freeImBuf(tbuf1); - IMB_freeImBuf(tbuf2); - } - ibuf->y /= 2; -} - -void BKE_image_de_interlace(Image *ima, int odd) -{ - ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); - if (ibuf) { - if (odd) - de_interlace_st(ibuf); - else - de_interlace_ng(ibuf); - } - BKE_image_release_ibuf(ima, ibuf, NULL); -} - /* ***************** ALLOC & FREE, DATA MANAGING *************** */ static void image_free_cached_frames(Image *image) diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index 994592ec307..1db239b3c6f 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -197,8 +197,6 @@ static int start_avi(void *context_v, Scene *UNUSED(scene), RenderData *rd, int avi->interlace = 0; avi->odd_fields = 0; -/* avi->interlace = rd->mode & R_FIELDS; */ -/* avi->odd_fields = (rd->mode & R_ODDFIELD) ? 1 : 0; */ printf("Created avi: %s\n", name); return 1; |