Blender
V3.3
|
#include <stddef.h>
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_allocimbuf.h"
#include "IMB_colormanagement_intern.h"
#include "IMB_filetype.h"
#include "IMB_metadata.h"
#include "imbuf.h"
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
Go to the source code of this file.
Classes | |
struct | Stereo3DData |
Typedefs | |
typedef struct Stereo3DData | Stereo3DData |
Functions | |
static void | imb_stereo3d_write_doit (struct Stereo3DData *s3d_data, const struct Stereo3dFormat *s3d) |
static void | imb_stereo3d_read_doit (struct Stereo3DData *s3d_data, const struct Stereo3dFormat *s3d) |
Local Functions | |
static void | imb_stereo3d_write_anaglyph (const Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) |
static void | imb_stereo3d_write_interlace (const Stereo3DData *s3d, enum eStereo3dInterlaceType mode, const bool swap) |
static void | imb_stereo3d_write_sidebyside (const Stereo3DData *s3d, const bool crosseyed) |
static void | imb_stereo3d_write_topbottom (const Stereo3DData *s3d) |
Dimension Utils | |
void | IMB_stereo3d_write_dimensions (const char mode, const bool is_squeezed, const size_t width, const size_t height, size_t *r_width, size_t *r_height) |
void | IMB_stereo3d_read_dimensions (const char mode, const bool is_squeezed, const size_t width, const size_t height, size_t *r_width, size_t *r_height) |
Un/Squeeze Frame | |
static void | imb_stereo3d_squeeze_ImBuf (ImBuf *ibuf, const Stereo3dFormat *s3d, const size_t x, const size_t y) |
static void | imb_stereo3d_unsqueeze_ImBuf (ImBuf *ibuf, const Stereo3dFormat *s3d, const size_t x, const size_t y) |
static void | imb_stereo3d_squeeze_rectf (float *rectf, const Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) |
static void | imb_stereo3d_squeeze_rect (int *rect, const Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) |
Preparing To Call The Write Functions | |
static void | imb_stereo3d_data_init (Stereo3DData *s3d_data, const bool is_float, const size_t x, const size_t y, const size_t channels, int *rect_left, int *rect_right, int *rect_stereo, float *rectf_left, float *rectf_right, float *rectf_stereo) |
int * | IMB_stereo3d_from_rect (const ImageFormatData *im_format, const size_t x, const size_t y, const size_t channels, int *rect_left, int *rect_right) |
float * | IMB_stereo3d_from_rectf (const ImageFormatData *im_format, const size_t x, const size_t y, const size_t channels, float *rectf_left, float *rectf_right) |
ImBuf * | IMB_stereo3d_ImBuf (const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right) |
static void | imb_stereo3d_write_doit (Stereo3DData *s3d_data, const Stereo3dFormat *s3d) |
Reading Stereo ImBuf's | |
static void | imb_stereo3d_read_anaglyph (const Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) |
static void | imb_stereo3d_read_interlace (const Stereo3DData *s3d, enum eStereo3dInterlaceType mode, const bool swap) |
static void | imb_stereo3d_read_sidebyside (const Stereo3DData *s3d, const bool crosseyed) |
static void | imb_stereo3d_read_topbottom (const Stereo3DData *s3d) |
Preparing To Call The Read Functions | |
void | IMB_ImBufFromStereo3d (const Stereo3dFormat *s3d, ImBuf *ibuf_stereo3d, ImBuf **r_ibuf_left, ImBuf **r_ibuf_right) |
static void | imb_stereo3d_read_doit (Stereo3DData *s3d_data, const Stereo3dFormat *s3d) |
typedef struct Stereo3DData Stereo3DData |
void IMB_ImBufFromStereo3d | ( | const Stereo3dFormat * | s3d, |
ImBuf * | ibuf_stereo3d, | ||
ImBuf ** | r_ibuf_left, | ||
ImBuf ** | r_ibuf_right | ||
) |
Definition at line 1277 of file stereoimbuf.c.
References addzbuffloatImBuf(), addzbufImBuf(), ImBuf::channels, Stereo3dFormat::display_mode, Stereo3dFormat::flag, ImBuf::flags, height, IB_zbuf, IB_zbuffloat, imb_addrectfloatImBuf(), imb_addrectImBuf(), IMB_allocImBuf(), IMB_freeImBuf(), imb_stereo3d_data_init(), IMB_stereo3d_read_dimensions(), imb_stereo3d_read_doit(), imb_stereo3d_unsqueeze_ImBuf(), IMB_stereo3d_write_dimensions(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, S3D_SQUEEZED_FRAME, width, ImBuf::x, ImBuf::y, ImBuf::zbuf, and ImBuf::zbuf_float.
|
static |
Definition at line 674 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), Stereo3DData::is_float, Stereo3DData::left, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, x, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by IMB_ImBufFromStereo3d(), IMB_stereo3d_from_rect(), IMB_stereo3d_from_rectf(), and IMB_stereo3d_ImBuf().
int* IMB_stereo3d_from_rect | ( | const ImageFormatData * | im_format, |
const size_t | x, | ||
const size_t | y, | ||
const size_t | channels, | ||
int * | rect_left, | ||
int * | rect_right | ||
) |
Definition at line 698 of file stereoimbuf.c.
References channels(), ImageFormatData::depth, Stereo3dFormat::display_mode, height, imb_stereo3d_data_init(), imb_stereo3d_squeeze_rect(), IMB_stereo3d_write_dimensions(), imb_stereo3d_write_doit(), MEM_mallocN, NULL, ImageFormatData::stereo3d_format, width, x, and y.
float* IMB_stereo3d_from_rectf | ( | const ImageFormatData * | im_format, |
const size_t | x, | ||
const size_t | y, | ||
const size_t | channels, | ||
float * | rectf_left, | ||
float * | rectf_right | ||
) |
Definition at line 722 of file stereoimbuf.c.
References channels(), ImageFormatData::depth, Stereo3dFormat::display_mode, height, imb_stereo3d_data_init(), imb_stereo3d_squeeze_rectf(), IMB_stereo3d_write_dimensions(), imb_stereo3d_write_doit(), MEM_mallocN, NULL, ImageFormatData::stereo3d_format, width, x, and y.
ImBuf* IMB_stereo3d_ImBuf | ( | const ImageFormatData * | im_format, |
ImBuf * | ibuf_left, | ||
ImBuf * | ibuf_right | ||
) |
Definition at line 755 of file stereoimbuf.c.
References ImBuf::channels, ImageFormatData::depth, Stereo3dFormat::display_mode, ImBuf::flags, ImBuf::float_colorspace, height, imb_addrectfloatImBuf(), imb_addrectImBuf(), IMB_allocImBuf(), imb_stereo3d_data_init(), imb_stereo3d_squeeze_ImBuf(), IMB_stereo3d_write_dimensions(), imb_stereo3d_write_doit(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, ImageFormatData::stereo3d_format, width, ImBuf::x, and ImBuf::y.
|
static |
Definition at line 822 of file stereoimbuf.c.
References usdtokens::b(), Stereo3DData::channels, channels(), from, usdtokens::g(), height, Stereo3DData::is_float, Stereo3DData::left, r, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, x, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_read_doit().
void IMB_stereo3d_read_dimensions | ( | const char | mode, |
const bool | is_squeezed, | ||
const size_t | width, | ||
const size_t | height, | ||
size_t * | r_width, | ||
size_t * | r_height | ||
) |
Definition at line 535 of file stereoimbuf.c.
References height, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, and width.
Referenced by IMB_ImBufFromStereo3d().
|
static |
Definition at line 1363 of file stereoimbuf.c.
References Stereo3dFormat::anaglyph_type, Stereo3dFormat::display_mode, Stereo3dFormat::flag, imb_stereo3d_read_anaglyph(), imb_stereo3d_read_interlace(), imb_stereo3d_read_sidebyside(), imb_stereo3d_read_topbottom(), Stereo3dFormat::interlace_type, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_INTERLACE_SWAP, and S3D_SIDEBYSIDE_CROSSEYED.
|
static |
Referenced by IMB_ImBufFromStereo3d().
|
static |
Definition at line 920 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), copy_v3_v3(), copy_v3_v3_uchar(), copy_v4_v4(), copy_v4_v4_uchar(), from, height, Stereo3DData::is_float, Stereo3DData::left, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, S3D_INTERLACE_CHECKERBOARD, S3D_INTERLACE_COLUMN, S3D_INTERLACE_ROW, Stereo3DData::stereo, swap(), width, x, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_read_doit().
|
static |
Definition at line 1178 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), from, height, Stereo3DData::is_float, l, Stereo3DData::left, r, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_read_doit().
|
static |
Definition at line 1227 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), from, height, Stereo3DData::is_float, Stereo3DData::left, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_read_doit().
|
static |
Definition at line 569 of file stereoimbuf.c.
References Stereo3dFormat::display_mode, ELEM, Stereo3dFormat::flag, IMB_scaleImBuf_threaded(), S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_SQUEEZED_FRAME, x, and y.
Referenced by IMB_stereo3d_ImBuf().
|
static |
Definition at line 635 of file stereoimbuf.c.
References channels(), Stereo3dFormat::display_mode, ELEM, Stereo3dFormat::flag, height, IB_PROFILE_SRGB, IB_rect, IMB_allocImBuf(), IMB_buffer_byte_from_byte(), IMB_freeImBuf(), IMB_scaleImBuf_threaded(), IMB_stereo3d_write_dimensions(), ImBuf::rect, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_SQUEEZED_FRAME, width, x, and y.
Referenced by IMB_stereo3d_from_rect().
|
static |
Definition at line 601 of file stereoimbuf.c.
References channels(), Stereo3dFormat::display_mode, ELEM, Stereo3dFormat::flag, height, IB_PROFILE_LINEAR_RGB, IB_rectfloat, IMB_allocImBuf(), IMB_buffer_float_from_float(), IMB_freeImBuf(), IMB_scaleImBuf_threaded(), IMB_stereo3d_write_dimensions(), ImBuf::rect_float, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_SQUEEZED_FRAME, width, x, and y.
Referenced by IMB_stereo3d_from_rectf().
|
static |
Definition at line 585 of file stereoimbuf.c.
References Stereo3dFormat::display_mode, ELEM, Stereo3dFormat::flag, IMB_scaleImBuf_threaded(), S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_SQUEEZED_FRAME, x, and y.
Referenced by IMB_ImBufFromStereo3d().
|
static |
Definition at line 51 of file stereoimbuf.c.
References usdtokens::b(), Stereo3DData::channels, channels(), from, usdtokens::g(), height, Stereo3DData::is_float, Stereo3DData::left, MAX2, r, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, x, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_write_doit().
void IMB_stereo3d_write_dimensions | ( | char | mode, |
bool | is_squeezed, | ||
size_t | width, | ||
size_t | height, | ||
size_t * | r_width, | ||
size_t * | r_height | ||
) |
Definition at line 507 of file stereoimbuf.c.
References height, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, and width.
Referenced by BKE_scene_multiview_videos_dimensions_get(), IMB_ImBufFromStereo3d(), IMB_stereo3d_from_rect(), IMB_stereo3d_from_rectf(), IMB_stereo3d_ImBuf(), imb_stereo3d_squeeze_rect(), and imb_stereo3d_squeeze_rectf().
|
static |
Definition at line 795 of file stereoimbuf.c.
References Stereo3dFormat::anaglyph_type, Stereo3dFormat::display_mode, Stereo3dFormat::flag, imb_stereo3d_write_anaglyph(), imb_stereo3d_write_interlace(), imb_stereo3d_write_sidebyside(), imb_stereo3d_write_topbottom(), Stereo3dFormat::interlace_type, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, S3D_INTERLACE_SWAP, and S3D_SIDEBYSIDE_CROSSEYED.
|
static |
Referenced by IMB_stereo3d_from_rect(), IMB_stereo3d_from_rectf(), and IMB_stereo3d_ImBuf().
|
static |
Definition at line 149 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), copy_v3_v3(), copy_v3_v3_uchar(), copy_v4_v4(), copy_v4_v4_uchar(), from, height, Stereo3DData::is_float, Stereo3DData::left, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, S3D_INTERLACE_CHECKERBOARD, S3D_INTERLACE_COLUMN, S3D_INTERLACE_ROW, Stereo3DData::stereo, swap(), width, x, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_write_doit().
|
static |
Definition at line 407 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), from, height, Stereo3DData::is_float, l, Stereo3DData::left, r, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_write_doit().
|
static |
Definition at line 455 of file stereoimbuf.c.
References Stereo3DData::channels, channels(), from, height, Stereo3DData::is_float, Stereo3DData::left, Stereo3DData::rect, Stereo3DData::rectf, Stereo3DData::right, Stereo3DData::stereo, width, Stereo3DData::x, y, and Stereo3DData::y.
Referenced by imb_stereo3d_write_doit().