diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_colortools.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/SConscript | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 58 | ||||
-rw-r--r-- | source/blender/editors/space_image/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/editors/space_image/SConscript | 3 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 29 | ||||
-rw-r--r-- | source/blender/imbuf/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 5 | ||||
-rw-r--r-- | source/blender/imbuf/SConscript | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/SConscript | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/SConscript | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
15 files changed, 0 insertions, 142 deletions
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index b3709853a8c..744ed9dba9c 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -78,7 +78,6 @@ void curvemapping_premultiply(struct CurveMapping *cumap, int restore); int curvemapping_RGBA_does_something(struct CurveMapping *cumap); void curvemapping_initialize(struct CurveMapping *cumap); void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size); -void colorcorrection_do_ibuf(struct ImBuf *ibuf, const char *profile); void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management); void scopes_free(struct Scopes *scopes); diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index b7976c404ae..2831636361f 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -277,11 +277,6 @@ if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() -if(WITH_LCMS) - list(APPEND INC ${LCMS_INCLUDE_DIR}) - add_definitions(-DWITH_LCMS) -endif() - if(WITH_PYTHON) list(APPEND INC ../python ${PYTHON_INCLUDE_DIRS}) add_definitions(-DWITH_PYTHON) diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index dc327abd3ad..ea19b51c044 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -78,10 +78,6 @@ if env['OURPLATFORM'] == 'darwin': if env['BF_NO_ELBEEM']: defs.append('DISABLE_ELBEEM') -if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] - if env['WITH_BF_LZO']: incs += ' #/extern/lzo/minilzo' defs.append('WITH_LZO') diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 1d7481b365a..9a6c2cc7e31 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -37,10 +37,6 @@ #include <stdlib.h> #include <float.h> -#ifdef WITH_LCMS -#include <lcms.h> -#endif - #include "MEM_guardedalloc.h" #include "DNA_color_types.h" @@ -789,60 +785,6 @@ void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float *vecout, const } -#ifdef WITH_LCMS -/* basic error handler, if we dont do this blender will exit */ -static int ErrorReportingFunction(int ErrorCode, const char *ErrorText) -{ - fprintf(stderr, "%s:%d\n", ErrorText, ErrorCode); - return 1; -} -#endif - -void colorcorrection_do_ibuf(ImBuf *ibuf, const char *profile) -{ -#ifdef WITH_LCMS - if (ibuf->crect == NULL) - { - cmsHPROFILE proofingProfile; - - /* TODO, move to initialization area of code */ - //cmsSetLogErrorHandler(ErrorReportingFunction); - cmsSetErrorHandler(ErrorReportingFunction); - - /* will return NULL if the file isn't fount */ - proofingProfile = cmsOpenProfileFromFile(profile, "r"); - - cmsErrorAction(LCMS_ERROR_SHOW); - - if(proofingProfile) { - cmsHPROFILE imageProfile; - cmsHTRANSFORM hTransform; - - ibuf->crect = MEM_mallocN(ibuf->x*ibuf->y*sizeof(int), "imbuf crect"); - - imageProfile = cmsCreate_sRGBProfile(); - - - hTransform = cmsCreateProofingTransform(imageProfile, TYPE_RGBA_8, imageProfile, TYPE_RGBA_8, - proofingProfile, - INTENT_ABSOLUTE_COLORIMETRIC, - INTENT_ABSOLUTE_COLORIMETRIC, - cmsFLAGS_SOFTPROOFING); - - cmsDoTransform(hTransform, ibuf->rect, ibuf->crect, ibuf->x * ibuf->y); - - cmsDeleteTransform(hTransform); - cmsCloseProfile(imageProfile); - cmsCloseProfile(proofingProfile); - } - } -#else - /* unused */ - (void)ibuf; - (void)profile; -#endif -} - /* only used for image editor curves */ void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf) { diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index 8e73b1b7d96..286f1f3178b 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -59,9 +59,4 @@ if(WITH_IMAGE_CINEON) add_definitions(-DWITH_CINEON) endif() -if(WITH_LCMS) - set(INC ${INC} ${LCMS_INCLUDE_DIR}) - add_definitions(-DWITH_LCMS) -endif() - blender_add_lib(bf_editor_space_image "${SRC}" "${INC}") diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript index e84afcdaab1..27696e35701 100644 --- a/source/blender/editors/space_image/SConscript +++ b/source/blender/editors/space_image/SConscript @@ -9,9 +9,6 @@ incs += ' ../../render/extern/include ../../makesrna ../../blenloader' defs = [] -if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') if env['WITH_BF_OPENJPEG']: diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 4cdac361bf3..112359726ea 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -58,10 +58,6 @@ #include "BKE_image.h" #include "BKE_paint.h" -#ifdef WITH_LCMS -#include "BKE_colortools.h" -#endif - #include "BIF_gl.h" #include "BIF_glutil.h" @@ -452,20 +448,6 @@ static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, fl // glColorMask(1, 1, 1, 1); } -#ifdef WITH_LCMS -static int sima_draw_colorcorrected_pixels(float x1, float y1, ImBuf *ibuf) -{ - colorcorrection_do_ibuf(ibuf, "MONOSCNR.ICM"); /* path is hardcoded here, find some place better */ - - if(ibuf->crect) { - glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->crect); - return 1; - } - - return 0; -} -#endif - static void sima_draw_zbuf_pixels(float x1, float y1, int rectx, int recty, int *recti) { /* zbuffer values are signed, so we need to shift color range */ @@ -544,17 +526,6 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image else if(ibuf->channels==1) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->rect_float); } -#ifdef WITH_LCMS - else if(sima->flag & SI_COLOR_CORRECTION) { - image_verify_buffer_float(ima, ibuf, color_manage); - - if(sima_draw_colorcorrected_pixels(x, y, ibuf)==0) { - unsigned char col1[3]= {100, 0, 100}, col2[3]= {160, 0, 160}; /* pink says 'warning' in blender land */ - sima_draw_alpha_backdrop(x, y, ibuf->x, ibuf->y, zoomx, zoomy, col1, col2); - } - - } -#endif else { if(sima->flag & SI_USE_ALPHA) { unsigned char col1[3]= {100, 100, 100}, col2[3]= {160, 160, 160}; diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 24f04098d0c..6404ae3de75 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -146,8 +146,4 @@ 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 5717a92db54..f5e2bf71468 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -88,11 +88,6 @@ typedef struct ImBuf { 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 - /* resolution - pixels per meter */ double ppm[2]; diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index 59b938c3373..ecb9a89c274 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -48,7 +48,4 @@ 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 91583f02a49..59772771f3b 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -85,12 +85,6 @@ 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; diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 86ba81aae58..b706db5e64c 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -42,10 +42,6 @@ if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') incs += ' ../quicktime' -if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] - if env['WITH_BF_GAMEENGINE']: defs.append('WITH_GAMEENGINE') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 350ca9f6bae..79edb91b972 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -175,11 +175,6 @@ if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() -if(WITH_LCMS) - list(APPEND INC ${LCMS_INCLUDE_DIR}) - add_definitions(-DWITH_LCMS) -endif() - if(NOT WITH_MOD_FLUID) add_definitions(-DDISABLE_ELBEEM) endif() diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index c48b479da16..421c3a60691 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -65,9 +65,6 @@ if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') incs += ' ../../quicktime' -if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - if env['WITH_BF_GAMEENGINE']: defs.append('WITH_GAMEENGINE') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d8ae0f3e96f..a9bcabf36df 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -76,9 +76,6 @@ static EnumPropertyItem draw_channels_items[] = { {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"}, {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)"}, -#ifdef WITH_LCMS - {SI_COLOR_CORRECTION, "COLOR_CORRECTED", ICON_IMAGE_ALPHA, "Color Corrected", "Display color corrected image"}, -#endif {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem transform_orientation_items[] = { @@ -498,10 +495,6 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, P RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ZBUF); } -#ifdef WITH_LCMS - RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_COLOR_CORRECTION); -#endif - RNA_enum_item_end(&item, &totitem); *free= 1; |