From c69f57147882e75900aac77a89f2181bccc6e665 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 8 Jan 2013 13:32:48 +0000 Subject: Remove unused IMB function which wasn't ported to new color management Also marked some TODOs as actually solved. --- source/blender/imbuf/intern/divers.c | 47 ------------------------------------ 1 file changed, 47 deletions(-) (limited to 'source/blender/imbuf/intern/divers.c') diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index f0d8b7cac72..84339b51721 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -659,53 +659,6 @@ void IMB_float_from_rect(ImBuf *ibuf) BLI_unlock_thread(LOCK_COLORMANAGE); } -/* use when you need to get a buffer with a certain profile - * if the return */ - -/* OCIO_TODO: used only by Cineon/DPX exporter which is still broken, so can not guarantee - * this function is working properly - */ -float *IMB_float_profile_ensure(ImBuf *ibuf, int profile, int *alloc) -{ - int profile_from = IB_PROFILE_LINEAR_RGB; - int profile_to; - - /* determine profile */ - if (profile == IB_PROFILE_NONE) - profile_to = IB_PROFILE_LINEAR_RGB; - else - profile_to = IB_PROFILE_SRGB; - - if (profile_from == profile_to) { - /* simple case, just allocate the buffer and return */ - *alloc = 0; - - if (ibuf->rect_float == NULL) - IMB_float_from_rect(ibuf); - - return ibuf->rect_float; - } - else { - /* conversion is needed, first check */ - float *fbuf = MEM_mallocN(ibuf->x * ibuf->y * sizeof(float) * 4, "IMB_float_profile_ensure"); - *alloc = 1; - - if (ibuf->rect_float == NULL) { - IMB_buffer_float_from_byte(fbuf, (uchar *)ibuf->rect, - profile_to, profile_from, FALSE, - ibuf->x, ibuf->y, ibuf->x, ibuf->x); - IMB_premultiply_rect_float(ibuf->rect_float, ibuf->planes, ibuf->x, ibuf->y); - } - else { - IMB_buffer_float_from_float(fbuf, ibuf->rect_float, - 4, profile_to, profile_from, TRUE, - ibuf->x, ibuf->y, ibuf->x, ibuf->x); - } - - return fbuf; - } -} - /**************************** Color to Grayscale *****************************/ /* no profile conversion */ -- cgit v1.2.3