[Bf-blender-cvs] [d428079] multiview: expose IMB_stereo_dimensions
Dalai Felinto
noreply at git.blender.org
Wed Aug 13 12:15:59 CEST 2014
Commit: d428079782c48c6f5fafdb97be48fd0b54573b3f
Author: Dalai Felinto
Date: Tue Aug 12 18:23:39 2014 +0200
Branches: multiview
https://developer.blender.org/rBd428079782c48c6f5fafdb97be48fd0b54573b3f
expose IMB_stereo_dimensions
===================================================================
M source/blender/imbuf/IMB_imbuf.h
M source/blender/imbuf/intern/stereoimbuf.c
===================================================================
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 4eaac4c..a6d45ed 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -562,6 +562,7 @@ const char *IMB_ffmpeg_last_error(void);
*
* \attention Defined in stereoimbuf.c
*/
+void IMB_stereo_dimensions(const char mode, const size_t width, const size_t height, size_t *r_width, size_t *r_height);
struct ImBuf *IMB_stereoImBuf(struct ImageFormatData *im_format, struct ImBuf *left, struct ImBuf *right);
#endif
diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c
index 4ffb7e6..0f11e19 100644
--- a/source/blender/imbuf/intern/stereoimbuf.c
+++ b/source/blender/imbuf/intern/stereoimbuf.c
@@ -349,7 +349,7 @@ static void imb_stereo_topbottom(ImBuf *left, ImBuf *right, bool is_float, ImBuf
}
}
-static void imb_stereo_dimensions(enum eStereoDisplayMode mode, ImBuf *ibuf, size_t *width, size_t *height)
+void IMB_stereo_dimensions(const char mode, const size_t width, const size_t height, size_t *r_width, size_t *r_height)
{
switch (mode) {
case S3D_DISPLAY_BLURAY:
@@ -359,27 +359,32 @@ static void imb_stereo_dimensions(enum eStereoDisplayMode mode, ImBuf *ibuf, siz
}
case S3D_DISPLAY_SIDEBYSIDE:
{
- *width = ibuf->x * 2;
- *height = ibuf->y;
+ *r_width = width * 2;
+ *r_height = height;
break;
}
case S3D_DISPLAY_TOPBOTTOM:
{
- *width = ibuf->x;
- *height = ibuf->y * 2;
+ *r_width = width;
+ *r_height = height * 2;
break;
}
case S3D_DISPLAY_ANAGLYPH:
case S3D_DISPLAY_INTERLACE:
default:
{
- *width = ibuf->x;
- *height = ibuf->y;
+ *r_width = width;
+ *r_height = height;
break;
}
}
}
+static void imb_stereo_dimensions(const enum eStereoDisplayMode mode, ImBuf *ibuf, size_t *r_width, size_t *r_height)
+{
+ IMB_stereo_dimensions(mode, ibuf->x, ibuf->y, r_width, r_height);
+}
+
/* left/right are always float */
ImBuf *IMB_stereoImBuf(ImageFormatData *im_format, ImBuf *left, ImBuf *right)
{
More information about the Bf-blender-cvs
mailing list