diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
commit | 27b3ea622f8bd313a8e2827dfec752bf2125566c (patch) | |
tree | f212e49d224ce8e1cfc3b17a64ae524711494391 /source/blender/imbuf/intern/cineon/cineon_dpx.c | |
parent | 372dff8d1dc7e24d4b2cd37de245588ecfce8bfa (diff) | |
parent | de80e687689032cb85179a1f7e89750573631d5d (diff) |
Merge remote-tracking branch 'origin/master' into cycles_camera_nodescycles_camera_nodes
Note: the branch currently crashes in blender_camera_nodes.cpp:
BL::NodeTree b_ntree = b_data.node_groups[nodes_tree_name];
The crash was introduced in:
cb7cf523e5c000609f32a382e2c0fcc57f635a42
Conflicts:
intern/cycles/SConscript
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/camera.cpp
intern/cycles/render/camera.h
Diffstat (limited to 'source/blender/imbuf/intern/cineon/cineon_dpx.c')
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 56ce46bf92e..3e2206dc013 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -49,8 +49,9 @@ #include "MEM_guardedalloc.h" -static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, size_t size, int use_cineon, int flags, - char colorspace[IM_MAX_SPACE]) +static struct ImBuf *imb_load_dpx_cineon( + const unsigned char *mem, size_t size, int use_cineon, int flags, + char colorspace[IM_MAX_SPACE]) { ImBuf *ibuf; LogImageFile *image; @@ -85,7 +86,7 @@ static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, size_t size, int us } logImageClose(image); - ibuf->ftype = use_cineon ? CINEON : DPX; + ibuf->ftype = use_cineon ? IMB_FTYPE_CINEON : IMB_FTYPE_DPX; if (flags & IB_alphamode_detect) ibuf->flags |= IB_alphamode_premul; @@ -114,17 +115,17 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon return 0; } - if (ibuf->ftype & CINEON_10BIT) + if (ibuf->foptions.flag & CINEON_10BIT) bitspersample = 10; - else if (ibuf->ftype & CINEON_12BIT) + else if (ibuf->foptions.flag & CINEON_12BIT) bitspersample = 12; - else if (ibuf->ftype & CINEON_16BIT) + else if (ibuf->foptions.flag & CINEON_16BIT) bitspersample = 16; else bitspersample = 8; logImage = logImageCreate(filename, use_cineon, ibuf->x, ibuf->y, bitspersample, (depth == 4), - (ibuf->ftype & CINEON_LOG), -1, -1, -1, "Blender"); + (ibuf->foptions.flag & CINEON_LOG), -1, -1, -1, "Blender"); if (logImage == NULL) { printf("DPX/Cineon: error creating file.\n"); @@ -181,12 +182,12 @@ int imb_save_cineon(struct ImBuf *buf, const char *myfile, int flags) return imb_save_dpx_cineon(buf, myfile, 1, flags); } -int imb_is_cineon(unsigned char *buf) +int imb_is_cineon(const unsigned char *buf) { return logImageIsCineon(buf); } -ImBuf *imb_load_cineon(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +ImBuf *imb_load_cineon(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { if (imb_is_cineon(mem)) return imb_load_dpx_cineon(mem, size, 1, flags, colorspace); @@ -198,12 +199,12 @@ int imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags) return imb_save_dpx_cineon(buf, myfile, 0, flags); } -int imb_is_dpx(unsigned char *buf) +int imb_is_dpx(const unsigned char *buf) { return logImageIsDpx(buf); } -ImBuf *imb_load_dpx(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +ImBuf *imb_load_dpx(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { if (imb_is_dpx(mem)) return imb_load_dpx_cineon(mem, size, 0, flags, colorspace); |