Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/imbuf/CMakeLists.txt4
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h9
-rw-r--r--source/blender/imbuf/SConscript3
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c10
4 files changed, 19 insertions, 7 deletions
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 6404ae3de75..24f04098d0c 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -146,4 +146,8 @@ if(WITH_IMAGE_HDR)
add_definitions(-DWITH_HDR)
endif()
+if(WITH_LCMS)
+ add_definitions(-DWITH_LCMS)
+endif()
+
blender_add_lib(bf_imbuf "${SRC}" "${INC}")
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 81512adf065..52afe2ed854 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -84,11 +84,15 @@ typedef struct ImBuf {
/* pixels */
unsigned int *rect; /* pixel values stored here */
- unsigned int *crect; /* color corrected pixel values stored here */
float *rect_float; /* floating point Rect equivalent
Linear RGB color space - may need gamma correction to
sRGB when generating 8bit representations */
-
+
+#ifdef WITH_LCMS
+ unsigned int *crect; /* color corrected pixel values stored here */
+ char profile_filename[256]; /* to be implemented properly, specific filename for custom profiles */
+#endif
+
/* tiled pixel storage */
int tilex, tiley;
int xtiles, ytiles;
@@ -101,7 +105,6 @@ typedef struct ImBuf {
/* parameters used by conversion between byte and float */
float dither; /* random dither value, for conversion from float -> byte rect */
short profile; /* color space/profile preset that the byte rect buffer represents */
- char profile_filename[256]; /* to be implemented properly, specific filename for custom profiles */
/* mipmapping */
struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /* MipMap levels, a series of halved images */
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index ecb9a89c274..59b938c3373 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -48,4 +48,7 @@ if env['WITH_BF_QUICKTIME']:
incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
+if env['WITH_BF_LCMS']:
+ defs.append('WITH_LCMS')
+
env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [185,115] )
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index a8b9e21331d..efa37aa1196 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -84,17 +84,19 @@ void imb_freerectfloatImBuf(ImBuf *ibuf)
void imb_freerectImBuf(ImBuf *ibuf)
{
if(ibuf==NULL) return;
-
+
+#ifdef WITH_LCMS
if(ibuf->crect)
MEM_freeN(ibuf->crect);
+ ibuf->crect= NULL;
+#endif
if(ibuf->rect && (ibuf->mall & IB_rect))
MEM_freeN(ibuf->rect);
+ ibuf->rect= NULL;
imb_freemipmapImBuf(ibuf);
-
- ibuf->rect= NULL;
- ibuf->crect= NULL;
+
ibuf->mall &= ~IB_rect;
}