diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
commit | a42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch) | |
tree | 81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/imbuf/intern/iris.c | |
parent | 7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff) | |
parent | a73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff) |
Merged changes in the trunk up to revision 50829.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/imbuf/intern/iris.c')
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 13b0fc1b55a..549a28a0453 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -42,6 +42,9 @@ #include "IMB_allocimbuf.h" #include "IMB_filetype.h" +#include "IMB_colormanagement.h" +#include "IMB_colormanagement_intern.h" + typedef struct { unsigned short imagic; /* stuff saved on disk . . */ unsigned short type; @@ -80,21 +83,21 @@ typedef struct { #define OFFSET_R 0 /* this is byte order dependent */ #define OFFSET_G 1 #define OFFSET_B 2 -#define OFFSET_A 3 +// #define OFFSET_A 3 #define CHANOFFSET(z) (3 - (z)) /* this is byte order dependent */ -#define TYPEMASK 0xff00 +// #define TYPEMASK 0xff00 #define BPPMASK 0x00ff -#define ITYPE_VERBATIM 0x0000 +// #define ITYPE_VERBATIM 0x0000 // UNUSED #define ITYPE_RLE 0x0100 #define ISRLE(type) (((type) & 0xff00) == ITYPE_RLE) -#define ISVERBATIM(type) (((type) & 0xff00) == ITYPE_VERBATIM) +// #define ISVERBATIM(type) (((type) & 0xff00) == ITYPE_VERBATIM) #define BPP(type) ((type) & BPPMASK) #define RLE(bpp) (ITYPE_RLE | (bpp)) -#define VERBATIM(bpp) (ITYPE_VERBATIM | (bpp)) -#define IBUFSIZE(pixels) ((pixels + (pixels >> 6)) << 2) -#define RLE_NOP 0x00 +// #define VERBATIM(bpp) (ITYPE_VERBATIM | (bpp)) // UNUSED +// #define IBUFSIZE(pixels) ((pixels + (pixels >> 6)) << 2) // UNUSED +// #define RLE_NOP 0x00 /* funcs */ static void readheader(FILE *inf, IMAGE *image); @@ -247,7 +250,7 @@ int imb_is_a_iris(unsigned char *mem) * */ -struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) +struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { unsigned int *base, *lptr = NULL; float *fbase, *fptr = NULL; @@ -265,6 +268,9 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) if (!imb_is_a_iris(mem)) return NULL; + /* OCIO_TODO: only tested with 1 byte per pixel, not sure how to test with other settings */ + colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); + /*printf("new iris\n");*/ file_data = mem; @@ -523,7 +529,6 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags) } ibuf->ftype = IMAGIC; - ibuf->profile = IB_PROFILE_SRGB; test_endian_zbuf(ibuf); |