122 for (ty = 0; ty < ibuf->
ytiles; ty++) {
123 for (tx = 0; tx < ibuf->
xtiles; tx++) {
195 bool needs_free =
false;
312 unsigned int newsize, encodedsize;
320 printf(
"%s: error in parameters\n", __func__);
325 if (newsize < 10000) {
330 if (newbuffer ==
NULL) {
355 unsigned int x,
unsigned int y,
unsigned int channels,
size_t typesize,
const char *name)
363 size_t size = (size_t)
x * (
size_t)
y * (size_t)
channels * typesize;
416 unsigned int *
rect,
float *rectf,
unsigned int w,
unsigned int h,
unsigned int channels)
420 if (!(
rect || rectf)) {
455 if (!(
rect || rectf)) {
465 const size_t size =
sizeof(
float[4]) *
w * h;
517 struct ImBuf *ibuf,
unsigned int x,
unsigned int y,
unsigned char planes,
unsigned int flags)
519 memset(ibuf, 0,
sizeof(
ImBuf));
594 memcpy(ibuf2->
rect, ibuf1->
rect, ((
size_t)
x) *
y *
sizeof(
int));
603 memcpy(ibuf2->
zbuf, ibuf1->
zbuf, ((
size_t)
x) *
y *
sizeof(
int));
652 return (
size_t)ibuf->
x * (size_t)ibuf->
y;
658 size_t size = 0, channel_size = 0;
663 channel_size +=
sizeof(char);
667 channel_size +=
sizeof(
float);
690 static void imbuf_cache_destructor(
void *
data)
typedef float(TangentPoint)[2]
void BLI_kdtree_nd_() free(KDTree *tree)
pthread_spinlock_t SpinLock
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void BLI_spin_lock(SpinLock *spin)
void BLI_spin_end(SpinLock *spin)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Header file for allocimbuf.c.
Contains defines and structs used throughout the imbuf module.
#define IMB_MIPMAP_LEVELS
MEM_CacheLimiterC * new_MEM_CacheLimiter(MEM_CacheLimiter_Destruct_Func data_destructor, MEM_CacheLimiter_DataSize_Func data_size)
struct MEM_CacheLimiter_s MEM_CacheLimiterC
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
void imb_freerectImBuf(ImBuf *ibuf)
void IMB_freezbuffloatImBuf(ImBuf *ibuf)
bool addzbufImBuf(ImBuf *ibuf)
void imb_freerectfloatImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int flags)
size_t IMB_get_rect_len(const ImBuf *ibuf)
bool imb_addtilesImBuf(ImBuf *ibuf)
static SpinLock mmap_spin
void imb_mmap_unlock(void)
void imb_freetilesImBuf(ImBuf *ibuf)
void imb_freerectImbuf_all(ImBuf *ibuf)
void imb_refcounter_lock_init(void)
bool IMB_initImBuf(struct ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_freezbufImBuf(ImBuf *ibuf)
void imb_mmap_lock_exit(void)
struct ImBuf * IMB_allocFromBufferOwn(unsigned int *rect, float *rectf, unsigned int w, unsigned int h, unsigned int channels)
void * imb_alloc_pixels(unsigned int x, unsigned int y, unsigned int channels, size_t typesize, const char *name)
void imb_freemipmapImBuf(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
bool imb_enlargeencodedbufferImBuf(ImBuf *ibuf)
void IMB_freeImBuf(ImBuf *ibuf)
void IMB_refImBuf(ImBuf *ibuf)
static SpinLock refcounter_spin
static void freeencodedbufferImBuf(ImBuf *ibuf)
bool imb_addrectImBuf(ImBuf *ibuf)
void imb_refcounter_lock_exit(void)
size_t IMB_get_size_in_memory(ImBuf *ibuf)
bool imb_addencodedbufferImBuf(ImBuf *ibuf)
bool imb_addrectfloatImBuf(ImBuf *ibuf, const unsigned int channels)
struct ImBuf * IMB_allocFromBuffer(const unsigned int *rect, const float *rectf, unsigned int w, unsigned int h, unsigned int channels)
bool addzbuffloatImBuf(ImBuf *ibuf)
ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
void imb_mmap_lock_init(void)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void imb_tile_cache_tile_free(ImBuf *ibuf, int tx, int ty)
void colormanage_cache_free(ImBuf *ibuf)
void colormanage_imbuf_set_default_spaces(ImBuf *ibuf)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
unsigned __int64 uint64_t
struct IDProperty * metadata
struct MEM_CacheLimiterHandle_s * c_handle
struct ImBuf * mipmap[IMB_MIPMAP_LEVELS]
ImbFormatOptions foptions
unsigned char * encodedbuffer
unsigned int encodedbuffersize
unsigned int * display_buffer_flags
struct ColormanageCache * colormanage_cache