[Bf-blender-cvs] [ba3b79e] temp_imbuf_types_refactor: Cleanup - rename.
Antony Riakiotakis
noreply at git.blender.org
Mon Jul 13 13:29:05 CEST 2015
Commit: ba3b79e91d616ae11209db9d503fa31e6ade8cbf
Author: Antony Riakiotakis
Date: Mon Jul 13 13:24:29 2015 +0200
Branches: temp_imbuf_types_refactor
https://developer.blender.org/rBba3b79e91d616ae11209db9d503fa31e6ade8cbf
Cleanup - rename.
===================================================================
M source/blender/blenkernel/intern/dynamicpaint.c
M source/blender/blenkernel/intern/image.c
M source/blender/blenkernel/intern/movieclip.c
M source/blender/blenkernel/intern/sequencer.c
M source/blender/freestyle/intern/stroke/Canvas.cpp
M source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
M source/blender/gpu/intern/gpu_draw.c
M source/blender/imbuf/IMB_imbuf_types.h
M source/blender/imbuf/intern/allocimbuf.c
M source/blender/imbuf/intern/bmp.c
M source/blender/imbuf/intern/cineon/cineon_dpx.c
M source/blender/imbuf/intern/dds/dds_api.cpp
M source/blender/imbuf/intern/filetype.c
M source/blender/imbuf/intern/iris.c
M source/blender/imbuf/intern/jp2.c
M source/blender/imbuf/intern/jpeg.c
M source/blender/imbuf/intern/oiio/openimageio_api.cpp
M source/blender/imbuf/intern/openexr/openexr_api.cpp
M source/blender/imbuf/intern/png.c
M source/blender/imbuf/intern/radiance_hdr.c
M source/blender/imbuf/intern/targa.c
M source/blender/imbuf/intern/thumbs.c
M source/blender/imbuf/intern/tiff.c
M source/blender/imbuf/intern/util.c
M source/gameengine/Ketsji/BL_Texture.cpp
===================================================================
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a3ec2dd..c6a04c7 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -2785,12 +2785,12 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
}
/* Set output format, png in case exr isn't supported */
- ibuf->ftype = IB_FTYPE_PNG;
+ ibuf->ftype = IMB_FTYPE_PNG;
ibuf->foptions.quality = 15;
#ifdef WITH_OPENEXR
if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */
- ibuf->ftype = IB_FTYPE_OPENEXR;
+ ibuf->ftype = IMB_FTYPE_OPENEXR;
ibuf->foptions.flag |= OPENEXR_COMPRESS;
}
#endif
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 06d4dff..bd9b789 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -916,7 +916,7 @@ static void image_memorypack_multiview(Image *ima)
for (i = 0, iv = ima->views.first; iv; iv = iv->next, i++) {
ImBuf *ibuf = image_get_cached_ibuf_for_index_frame(ima, i, 0);
- ibuf->ftype = IB_FTYPE_PNG;
+ ibuf->ftype = IMB_FTYPE_PNG;
ibuf->planes = R_IMF_PLANES_RGBA;
/* if the image was a R_IMF_VIEWS_STEREO_3D we force _L, _R suffices */
@@ -976,7 +976,7 @@ void BKE_image_memorypack(Image *ima)
image_free_packedfiles(ima);
- ibuf->ftype = IB_FTYPE_PNG;
+ ibuf->ftype = IMB_FTYPE_PNG;
ibuf->planes = R_IMF_PLANES_RGBA;
IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_mem);
@@ -1211,46 +1211,46 @@ void BKE_image_all_free_anim_ibufs(int cfra)
int BKE_image_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options)
{
if (imtype == R_IMF_IMTYPE_TARGA)
- return IB_FTYPE_TGA;
+ return IMB_FTYPE_TGA;
else if (imtype == R_IMF_IMTYPE_RAWTGA) {
r_options->flag = RAWTGA;
- return IB_FTYPE_TGA;
+ return IMB_FTYPE_TGA;
}
else if (imtype == R_IMF_IMTYPE_IRIS)
- return IB_FTYPE_IMAGIC;
+ return IMB_FTYPE_IMAGIC;
#ifdef WITH_HDR
else if (imtype == R_IMF_IMTYPE_RADHDR)
- return IB_FTYPE_RADHDR;
+ return IMB_FTYPE_RADHDR;
#endif
else if (imtype == R_IMF_IMTYPE_PNG) {
r_options->quality = 15;
- return IB_FTYPE_PNG;
+ return IMB_FTYPE_PNG;
}
#ifdef WITH_DDS
else if (imtype == R_IMF_IMTYPE_DDS)
- return IB_FTYPE_DDS;
+ return IMB_FTYPE_DDS;
#endif
else if (imtype == R_IMF_IMTYPE_BMP)
- return IB_FTYPE_BMP;
+ return IMB_FTYPE_BMP;
#ifdef WITH_TIFF
else if (imtype == R_IMF_IMTYPE_TIFF)
- return IB_FTYPE_TIF;
+ return IMB_FTYPE_TIF;
#endif
else if (imtype == R_IMF_IMTYPE_OPENEXR || imtype == R_IMF_IMTYPE_MULTILAYER)
- return IB_FTYPE_OPENEXR;
+ return IMB_FTYPE_OPENEXR;
#ifdef WITH_CINEON
else if (imtype == R_IMF_IMTYPE_CINEON)
- return IB_FTYPE_CINEON;
+ return IMB_FTYPE_CINEON;
else if (imtype == R_IMF_IMTYPE_DPX)
- return IB_FTYPE_DPX;
+ return IMB_FTYPE_DPX;
#endif
#ifdef WITH_OPENJPEG
else if (imtype == R_IMF_IMTYPE_JP2)
- return IB_FTYPE_JP2;
+ return IMB_FTYPE_JP2;
#endif
else {
r_options->quality = 90;
- return IB_FTYPE_JPG;
+ return IMB_FTYPE_JPG;
}
}
@@ -1258,40 +1258,40 @@ char BKE_image_ftype_to_imtype(const int ftype, const ImbFormatOptions *options)
{
if (ftype == 0)
return R_IMF_IMTYPE_TARGA;
- else if (ftype == IB_FTYPE_IMAGIC)
+ else if (ftype == IMB_FTYPE_IMAGIC)
return R_IMF_IMTYPE_IRIS;
#ifdef WITH_HDR
- else if (ftype == IB_FTYPE_RADHDR)
+ else if (ftype == IMB_FTYPE_RADHDR)
return R_IMF_IMTYPE_RADHDR;
#endif
- else if (ftype == IB_FTYPE_PNG)
+ else if (ftype == IMB_FTYPE_PNG)
return R_IMF_IMTYPE_PNG;
#ifdef WITH_DDS
- else if (ftype == IB_FTYPE_DDS)
+ else if (ftype == IMB_FTYPE_DDS)
return R_IMF_IMTYPE_DDS;
#endif
- else if (ftype == IB_FTYPE_BMP)
+ else if (ftype == IMB_FTYPE_BMP)
return R_IMF_IMTYPE_BMP;
#ifdef WITH_TIFF
- else if (ftype == IB_FTYPE_TIF)
+ else if (ftype == IMB_FTYPE_TIF)
return R_IMF_IMTYPE_TIFF;
#endif
- else if (ftype == IB_FTYPE_OPENEXR)
+ else if (ftype == IMB_FTYPE_OPENEXR)
return R_IMF_IMTYPE_OPENEXR;
#ifdef WITH_CINEON
- else if (ftype == IB_FTYPE_CINEON)
+ else if (ftype == IMB_FTYPE_CINEON)
return R_IMF_IMTYPE_CINEON;
- else if (ftype == IB_FTYPE_DPX)
+ else if (ftype == IMB_FTYPE_DPX)
return R_IMF_IMTYPE_DPX;
#endif
- else if (ftype == IB_FTYPE_TGA) {
+ else if (ftype == IMB_FTYPE_TGA) {
if (options && (options->flag & RAWTGA))
return R_IMF_IMTYPE_RAWTGA;
else
return R_IMF_IMTYPE_TARGA;
}
#ifdef WITH_OPENJPEG
- else if (ftype == IB_FTYPE_JP2)
+ else if (ftype == IMB_FTYPE_JP2)
return R_IMF_IMTYPE_JP2;
#endif
else
@@ -1606,15 +1606,15 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
/* file type */
- if (ftype == IB_FTYPE_IMAGIC)
+ if (ftype == IMB_FTYPE_IMAGIC)
im_format->imtype = R_IMF_IMTYPE_IRIS;
#ifdef WITH_HDR
- else if (ftype == IB_FTYPE_RADHDR)
+ else if (ftype == IMB_FTYPE_RADHDR)
im_format->imtype = R_IMF_IMTYPE_RADHDR;
#endif
- else if (ftype == IB_FTYPE_PNG) {
+ else if (ftype == IMB_FTYPE_PNG) {
im_format->imtype = R_IMF_IMTYPE_PNG;
if (custom_flags & PNG_16BIT)
@@ -1624,15 +1624,15 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
}
#ifdef WITH_DDS
- else if (ftype == IB_FTYPE_DDS)
+ else if (ftype == IMB_FTYPE_DDS)
im_format->imtype = R_IMF_IMTYPE_DDS;
#endif
- else if (ftype == IB_FTYPE_BMP)
+ else if (ftype == IMB_FTYPE_BMP)
im_format->imtype = R_IMF_IMTYPE_BMP;
#ifdef WITH_TIFF
- else if (ftype == IB_FTYPE_TIF) {
+ else if (ftype == IMB_FTYPE_TIF) {
im_format->imtype = R_IMF_IMTYPE_TIFF;
if (custom_flags & TIF_16BIT)
im_format->depth = R_IMF_CHAN_DEPTH_16;
@@ -1640,7 +1640,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
#endif
#ifdef WITH_OPENEXR
- else if (ftype == IB_FTYPE_OPENEXR) {
+ else if (ftype == IMB_FTYPE_OPENEXR) {
im_format->imtype = R_IMF_IMTYPE_OPENEXR;
if (custom_flags & OPENEXR_HALF)
im_format->depth = R_IMF_CHAN_DEPTH_16;
@@ -1652,20 +1652,20 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
#endif
#ifdef WITH_CINEON
- else if (ftype == IB_FTYPE_CINEON)
+ else if (ftype == IMB_FTYPE_CINEON)
im_format->imtype = R_IMF_IMTYPE_CINEON;
- else if (ftype == IB_FTYPE_DPX)
+ else if (ftype == IMB_FTYPE_DPX)
im_format->imtype = R_IMF_IMTYPE_DPX;
#endif
- else if (ftype == IB_FTYPE_TGA) {
+ else if (ftype == IMB_FTYPE_TGA) {
if (custom_flags & RAWTGA)
im_format->imtype = R_IMF_IMTYPE_RAWTGA;
else
im_format->imtype = R_IMF_IMTYPE_TARGA;
}
#ifdef WITH_OPENJPEG
- else if (ftype == IB_FTYPE_JP2) {
+ else if (ftype == IMB_FTYPE_JP2) {
im_format->imtype = R_IMF_IMTYPE_JP2;
im_format->quality = quality;
@@ -2172,15 +2172,15 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
char quality = imf->quality;
if (imtype == R_IMF_IMTYPE_IRIS) {
- ibuf->ftype = IB_FTYPE_IMAGIC;
+ ibuf->ftype = IMB_FTYPE_IMAGIC;
}
#ifdef WITH_HDR
else if (imtype == R_IMF_IMTYPE_RADHDR) {
- ibuf->ftype = IB_FTYPE_RADHDR;
+ ibuf->ftype = IMB_FTYPE_RADHDR;
}
#endif
else if (ELEM(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) {
- ibuf->ftype = IB_FTYPE_PNG;
+ ibuf->ftype = IMB_FTYPE_PNG;
if (imtype == R_IMF_IMTYPE_PNG) {
if (imf->depth == R_IMF_CHAN_DEPTH_16)
@@ -2192,15 +2192,15 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
}
#ifdef WITH_DDS
else if (imtype == R_IMF_IMTYPE_DDS) {
- ibuf->ftype = IB_FTYPE_DDS;
+ ibuf->ftype = IMB_FTYPE_DDS;
}
#endif
else if (imtype == R_IMF_IMTYPE_BMP) {
- ibuf->ftype = IB_FTYPE_BMP;
+ ibuf->ftype = IMB_FTYPE_BMP;
}
#ifdef WITH_TIFF
else if (imtype == R_IMF_IMTYPE_TIFF) {
- ibuf->ftype = IB_FTYPE_TIF;
+ ibuf->ftype = IMB_FTYPE_TIF;
if (imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->foptions.flag |= TIF_16BIT;
@@ -2208,7 +2208,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
#endif
#ifdef WITH_OPENEXR
else if (ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
- ibuf->ftype = IB_FTYPE_OPENEXR;
+ ibuf->ftype = IMB_FTYPE_OPENEXR;
if (imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->foptions.flag |= OPENEXR_HALF;
ibuf->foptions.flag |= (imf->exr_codec & OPENEXR_COMPRESS);
@@ -2220,7 +2220,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
#endif
#ifdef WITH_CINEON
else if (imtype == R_IMF_IMTYPE_CINEON) {
- ibuf->ftype = IB_FTYPE_CINEON;
+ ibuf->ftype = IMB_FTYPE_CINEON;
if (imf->cineon_flag & R_IMF_CINEON_FLAG_LOG) {
ibuf->foptions.flag |= CINEON_LOG;
}
@@ -2235,7 +2235,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
}
}
else if (imtype == R_IMF_IMTYPE_DPX) {
- ibuf->ftype = IB_FTYPE_DPX;
+ ibuf->ftype = IMB_FTYPE_DPX;
if (imf->cineon_flag & R_IMF_CINEON_FLAG_LOG) {
ibuf->foptions.flag |= CINEON_LOG;
}
@@ -2251,16 +2251,16 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
}
#endif
else if (imtype == R_IMF_IMTYPE_TARGA) {
- ibuf->ftype = IB_FTYPE_TGA;
+ ibuf->ftype = IMB_FTYPE_TGA;
}
else if (imtype == R_IMF_IMTYPE_RAWTGA) {
- ibuf->ftype = IB_FTYPE_TGA;
+ ibuf->ftype = IMB_FTYPE_TGA;
ibuf->foptions.flag = RAWTGA;
}
#ifdef WITH_OPENJPEG
else if (imtype == R_IMF_IMTYPE_JP2) {
if (quality < 10) quality = 90;
- ibuf->ftype = IB_FTYPE_JP2;
+ ibuf->ftype = IMB_FTYPE_JP2;
ibuf->foptions.quality = quality;
if (imf->depth == R_IMF_CHAN_DEPTH_16) {
@@ -2291,7 +2291,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, ImageFormatData *imf)
else {
/* R_IMF_IMTYPE_JPEG90, etc. default we save jpegs */
if (quality < 10) quality = 90;
- ibuf->ftype = IB_FTYPE_JPG;
+ ibuf->ftype = IMB_FTYPE_JPG;
ibuf->foptions.quality = quality;
}
}
@@ -3154,7 +3154,7 @@ static ImBuf *load_sequence_single(Image *ima, ImageUser *iuser, int frame, cons
if (ibuf) {
#ifdef WITH_OPENEXR
/* handle multilayer case, don't assign ibuf. will be handled in BKE_image_acquire_ibuf */
- if (ibuf->ftype == IB_FTYPE_OPENEXR && ibuf->userdata) {
+ if (ibuf-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list