diff options
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 1 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 20 | ||||
-rw-r--r-- | source/blender/imbuf/intern/util.c | 3 |
4 files changed, 28 insertions, 4 deletions
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 16bc7854617..c9a8f62a197 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -38,7 +38,6 @@ set(INC ../makesdna ../../../intern/memutil ../../../intern/guardedalloc - ../../../intern/ffmpeg ) set(INC_SYS @@ -119,7 +118,7 @@ if(WITH_IMAGE_TIFF) endif() if(WITH_IMAGE_OPENJPEG) - list(APPEND INC_SYS ${OPENJPEG_INC}) + list(APPEND INC_SYS ${OPENJPEG_INCLUDE_DIRS}) add_definitions(-DWITH_OPENJPEG) endif() @@ -130,12 +129,13 @@ endif() if(WITH_CODEC_QUICKTIME) list(APPEND INC ../quicktime) - list(APPEND INC_SYS ${QUICKTIME_INC}) + list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS}) add_definitions(-DWITH_QUICKTIME) endif() if(WITH_CODEC_FFMPEG) - list(APPEND INC_SYS ${FFMPEG_INC}) + list(APPEND INC ../../../intern/ffmpeg) + list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS}) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index e9592fdc164..ff01e3a8a1e 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -338,6 +338,7 @@ void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */ /* note, check that the conversion exists, only some are supported */ void IMB_convert_profile(struct ImBuf *ibuf, int profile); float *IMB_float_profile_ensure(struct ImBuf *ibuf, int profile, int *alloc); +void IMB_color_to_bw(struct ImBuf *ibuf); /** * Change the ordering of the color bytes pointed to by rect from diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 90ee2692cf0..7fc7669601d 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -490,3 +490,23 @@ float *IMB_float_profile_ensure(struct ImBuf *ibuf, int profile, int *alloc) return fbuf; } } + + +/* no profile conversion */ +void IMB_color_to_bw(struct ImBuf *ibuf) +{ + float *rctf= ibuf->rect_float; + unsigned char *rct= (unsigned char *)ibuf->rect; + int i; + if(rctf) { + for (i = ibuf->x * ibuf->y; i > 0; i--, rctf+=4) { + rctf[0]= rctf[1]= rctf[2]= rgb_to_grayscale(rctf); + } + } + + if(rct) { + for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) { + rct[0]= rct[1]= rct[2]= rgb_to_grayscale_byte(rct); + } + } +} diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 6e5e87d7e5c..fe85f63e109 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -142,6 +142,9 @@ const char *imb_ext_audio[] = { ".flac", ".wma", ".eac3", + ".aif", + ".aiff", + ".m4a", NULL}; static int IMB_ispic_name(const char *name) |