140 for (ty = 0; ty < ibuf->
ytiles; ty++) {
141 for (tx = 0; tx < ibuf->
xtiles; tx++) {
214 bool needs_free =
false;
331 unsigned int newsize, encodedsize;
339 printf(
"%s: error in parameters\n", __func__);
344 if (newsize < 10000) {
349 if (newbuffer ==
NULL) {
374 unsigned int x,
unsigned int y,
unsigned int channels,
size_t typesize,
const char *name)
382 size_t size = (size_t)
x * (
size_t)
y * (size_t)channels * typesize;
441 if (!(
rect || rectf)) {
495 struct ImBuf *ibuf,
unsigned int x,
unsigned int y,
unsigned char planes,
unsigned int flags)
497 memset(ibuf, 0,
sizeof(
ImBuf));
573 memcpy(ibuf2->
rect, ibuf1->
rect, ((
size_t)
x) *
y *
sizeof(
int));
582 memcpy(ibuf2->
zbuf, ibuf1->
zbuf, ((
size_t)
x) *
y *
sizeof(
int));
632 size_t size = 0, channel_size = 0;
637 channel_size +=
sizeof(char);
641 channel_size +=
sizeof(
float);
664 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.
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)
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_addrectfloatImBuf(ImBuf *ibuf)
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)
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)
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)
void *(* MEM_dupallocN)(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