Blender V2.61 - r43446
|
#include <stddef.h>
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_allocimbuf.h"
#include "IMB_filetype.h"
#include "IMB_metadata.h"
#include "imbuf.h"
#include "MEM_guardedalloc.h"
#include "MEM_CacheLimiterC-Api.h"
Go to the source code of this file.
Functions | |
void | imb_freemipmapImBuf (ImBuf *ibuf) |
void | imb_freerectfloatImBuf (ImBuf *ibuf) |
void | imb_freerectImBuf (ImBuf *ibuf) |
void | imb_freetilesImBuf (ImBuf *ibuf) |
static void | freeencodedbufferImBuf (ImBuf *ibuf) |
void | IMB_freezbufImBuf (ImBuf *ibuf) |
void | IMB_freezbuffloatImBuf (ImBuf *ibuf) |
void | IMB_freeImBuf (ImBuf *ibuf) |
void | IMB_refImBuf (ImBuf *ibuf) |
ImBuf * | IMB_makeSingleUser (ImBuf *ibuf) |
short | addzbufImBuf (ImBuf *ibuf) |
short | addzbuffloatImBuf (ImBuf *ibuf) |
short | imb_addencodedbufferImBuf (ImBuf *ibuf) |
short | imb_enlargeencodedbufferImBuf (ImBuf *ibuf) |
short | imb_addrectfloatImBuf (ImBuf *ibuf) |
short | imb_addrectImBuf (ImBuf *ibuf) |
short | imb_addtilesImBuf (ImBuf *ibuf) |
ImBuf * | IMB_allocImBuf (unsigned int x, unsigned int y, uchar planes, unsigned int flags) |
ImBuf * | IMB_dupImBuf (ImBuf *ibuf1) |
Definition in file allocimbuf.c.
short addzbuffloatImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 206 of file allocimbuf.c.
References FALSE, ImBuf::flags, IB_zbuffloat, IMB_freezbuffloatImBuf(), ImBuf::mall, MEM_mapallocN(), NULL, size(), TRUE, ImBuf::x, ImBuf::y, and ImBuf::zbuf_float.
Referenced by IMB_allocImBuf(), imb_load_openexr(), and seq_render_scene_strip_impl().
short addzbufImBuf | ( | struct ImBuf * | ibuf | ) |
Definition at line 188 of file allocimbuf.c.
References FALSE, ImBuf::flags, IB_zbuf, IMB_freezbufImBuf(), ImBuf::mall, MEM_mapallocN(), NULL, size(), TRUE, ImBuf::x, ImBuf::y, and ImBuf::zbuf.
Referenced by imb_addrectImBuf(), and IMB_allocImBuf().
static void freeencodedbufferImBuf | ( | ImBuf * | ibuf | ) | [static] |
Definition at line 116 of file allocimbuf.c.
References ImBuf::encodedbuffer, ImBuf::encodedbuffersize, ImBuf::encodedsize, IB_mem, ImBuf::mall, MEM_freeN(), and NULL.
Referenced by imb_addencodedbufferImBuf(), imb_enlargeencodedbufferImBuf(), and IMB_freeImBuf().
short imb_addencodedbufferImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 225 of file allocimbuf.c.
References ImBuf::encodedbuffer, ImBuf::encodedbuffersize, ImBuf::encodedsize, FALSE, ImBuf::flags, freeencodedbufferImBuf(), IB_mem, ImBuf::mall, MEM_mallocN(), NULL, and TRUE.
Referenced by IMB_dupImBuf(), imb_save_openexr(), and imb_savepng().
short imb_addrectfloatImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 283 of file allocimbuf.c.
References ImBuf::channels, FALSE, ImBuf::flags, IB_rectfloat, imb_freerectfloatImBuf(), ImBuf::mall, MEM_mapallocN(), NULL, ImBuf::rect_float, size(), TRUE, ImBuf::x, and ImBuf::y.
Referenced by color_balance_byte_float(), IMB_allocImBuf(), IMB_float_from_rect(), IMB_float_from_rect_simple(), imb_load_openexr(), node_composit_exec_splitviewer(), and node_composit_exec_viewer().
short imb_addrectImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 306 of file allocimbuf.c.
References addzbufImBuf(), FALSE, ImBuf::flags, IB_rect, ImBuf::mall, MEM_freeN(), MEM_mapallocN(), NULL, ImBuf::planes, ImBuf::rect, size(), TRUE, ImBuf::x, and ImBuf::y.
Referenced by curvemapping_do_ibuf(), do_plugin_effect(), image_buffer_rect_update(), IMB_allocImBuf(), imb_cocoaLoadImage(), imb_load_dds(), imb_loadpng(), imb_onehalf_no_alloc(), IMB_partial_rect_from_float(), and IMB_rect_from_float().
short imb_addtilesImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 330 of file allocimbuf.c.
References FALSE, IB_tiles, ImBuf::mall, MEM_callocN(), NULL, ImBuf::tiles, ImBuf::xtiles, and ImBuf::ytiles.
Referenced by imb_loadtiff().
ImBuf* IMB_allocImBuf | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned char | d, | ||
unsigned int | flags | ||
) | [read] |
Definition at line 341 of file allocimbuf.c.
References addzbuffloatImBuf(), addzbufImBuf(), ImBuf::channels, FALSE, ImBuf::ftype, IB_rect, IB_rectfloat, IB_zbuf, IB_zbuffloat, imb_addrectfloatImBuf(), imb_addrectImBuf(), IMB_freeImBuf(), MEM_callocN(), NULL, ImBuf::planes, ImBuf::ppm, TGA, ImBuf::x, and ImBuf::y.
Referenced by add_ibuf_size(), allocImBuf(), anim_getnew(), avi_fetchibuf(), BKE_image_acquire_ibuf(), BL_MakeScreenShot(), brush_imbuf_new(), brush_painter_fixed_tex_partial_update(), de_interlace_ng(), de_interlace_st(), do_displace(), do_mapuv(), do_paintface_box_select(), do_paintvert_box_select(), dynamicPaint_outputSurfaceImage(), ED_view3d_draw_offscreen_imbuf(), envmap_split_ima(), exec(), filelist_from_library(), filelist_init_icons(), get_area_imbuf(), GHOST_SystemCocoa::handleDraggingEvent(), ibJpegImageFromCinfo(), icon_draw_rect(), image_get_ibuf_multilayer(), image_get_render_result(), image_load_sequence_multilayer(), image_undo_push_tile(), image_undo_restore(), imapaint_lift_clone(), imb_bmp_decode(), imb_cocoaLoadImage(), IMB_de_interlace(), IMB_double_fast_x(), IMB_double_fast_y(), IMB_dupImBuf(), IMB_half_x(), IMB_half_y(), IMB_interlace(), imb_jp2_decode(), imb_load_dds(), imb_load_dpx_cineon(), imb_load_openexr(), imb_loadhdr(), imb_loadiris(), imb_loadpng(), imb_loadtarga(), imb_loadtiff(), IMB_makemipmap(), IMB_onehalf(), imb_read_tiff_pixels(), IMB_remakemipmap(), IMB_thumb_create(), input_preprocess(), loadblend_thumb(), make_histogram_view_from_ibuf_byte(), make_histogram_view_from_ibuf_float(), make_sep_waveform_view_from_ibuf_byte(), make_sep_waveform_view_from_ibuf_float(), make_vectorscope_view_from_ibuf_byte(), make_vectorscope_view_from_ibuf_float(), make_waveform_view_from_ibuf_byte(), make_waveform_view_from_ibuf_float(), make_zebra_view_from_ibuf(), my_envmap_split_ima(), node_composit_exec_output_file(), node_composit_exec_rotate(), node_composit_exec_scale(), node_composit_transform(), ImageBuff::plot(), prepare_effect_imbufs(), RE_layer_load_from_file(), RE_WriteEnvmapResult(), render_envmap(), render_result_rect_to_ibuf(), save_jstjpeg(), scale_trackpreview_ibuf(), screen_opengl_render_anim_step(), screenshot_exec(), screenshot_startjob(), seq_render_effect_strip_impl(), seq_render_scene_strip_impl(), seq_render_strip(), seq_render_strip_stack(), stabilize_alloc_ibuf(), and view3d_read_backbuf().
Definition at line 387 of file allocimbuf.c.
References ImBuf::c_handle, ImBuf::channels, ImBuf::encodedbuffer, ImBuf::encodedbuffersize, ImBuf::encodedsize, FALSE, ImBuf::flags, IB_fields, IB_MIPMAP_LEVELS, IB_rect, IB_rectfloat, imb_addencodedbufferImBuf(), IMB_allocImBuf(), IMB_freeImBuf(), ImBuf::mall, ImBuf::metadata, ImBuf::mipmap, NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::refcounter, ImBuf::x, ImBuf::y, ImBuf::zbuf, and ImBuf::zbuf_float.
Referenced by BKE_tracking_distortion_exec(), copy_brush(), copy_from_ibuf_still(), copy_to_ibuf_still(), curvemapping_do_ibuf(), do_adjustment(), do_multicam(), do_plugin_effect(), dupImBuf(), envmap_split_ima(), icon_copy_rect(), IMB_half_x(), IMB_half_y(), IMB_makeSingleUser(), movieclip_build_proxy_ibuf(), put_postprocessed_frame_to_cache(), render_result_rect_to_ibuf(), screen_opengl_render_anim_step(), seq_render_effect_strip_impl(), and seq_render_strip().
short imb_enlargeencodedbufferImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 246 of file allocimbuf.c.
References ImBuf::encodedbuffer, ImBuf::encodedbuffersize, ImBuf::encodedsize, FALSE, ImBuf::flags, freeencodedbufferImBuf(), IB_mem, ImBuf::mall, MEM_mallocN(), NULL, and TRUE.
Referenced by WriteData().
void IMB_freeImBuf | ( | struct ImBuf * | ibuf | ) |
Definition at line 151 of file allocimbuf.c.
References freeencodedbufferImBuf(), imb_freerectfloatImBuf(), imb_freerectImBuf(), imb_freetilesImBuf(), IMB_freezbuffloatImBuf(), IMB_freezbufImBuf(), IMB_metadata_free(), MEM_freeN(), and ImBuf::refcounter.
Referenced by avi_fetchibuf(), BKE_free_envmapdata(), BKE_image_free_anim_ibufs(), BKE_movieclip_build_proxy_frame(), BKE_movieclip_get_size(), BKE_movieclip_get_stable_ibuf(), BKE_movieclip_has_frame(), BKE_movieclip_update_scopes(), BKE_tracking_free(), BKE_tracking_next(), BL_MakeScreenShot(), brush_painter_fixed_tex_partial_update(), brush_painter_free(), brush_painter_refresh_cache(), brush_painter_require_imbuf(), ImageBuff::clear(), clip_draw_grease_pencil(), clip_draw_main(), clip_free(), clip_main_area_draw(), copy_from_ibuf_still(), copy_to_ibuf_still(), curvemapping_do_ibuf(), de_interlace_ng(), de_interlace_st(), detect_features_exec(), do_adjustment(), do_displace(), do_mapuv(), do_multicam(), do_paintface_box_select(), do_paintvert_box_select(), do_plugin_effect(), do_render_seq(), do_write_image_or_movie(), draw_bgpic(), draw_image_seq(), dynamicPaint_outputSurfaceImage(), ED_space_clip_get_buffer(), ED_space_clip_get_stable_buffer(), EM_init_backbuf_border(), EM_init_backbuf_circle(), EM_mask_init_backbuf_border(), exec(), filelist_free(), filelist_free_icons(), filelist_init_icons(), free_brush(), free_buffers(), freeImBuf(), icon_copy_rect(), icon_draw_rect(), image_free_buffers(), image_load_image_file(), image_load_sequence_file(), image_remove_ibuf(), image_undo_restore(), imapaint_dirty_region(), imapaint_paint_op(), IMB_allocImBuf(), IMB_anim_absolute(), IMB_anim_previewframe(), IMB_de_interlace(), IMB_dupImBuf(), imb_freemipmapImBuf(), IMB_interlace(), imb_load_openexr(), imb_loadpng(), IMB_makemipmap(), IMB_makeSingleUser(), IMB_moviecache_destructor(), imb_read_tiff_pixels(), IMB_remakemipmap(), IMB_thumb_create(), IMB_thumb_manage(), index_rebuild_fallback(), init_iconfile_list(), init_internal_icons(), input_preprocess(), ImageBuff::load(), loadblend_thumb(), moviecache_valfree(), movieclip_build_proxy_ibuf(), movieclip_get_postprocessed_ibuf(), my_free_envmapdata(), node_composit_exec_output_file(), node_composit_exec_rotate(), node_composit_exec_scale(), node_composit_get_movieclip(), node_composit_transform(), openanim(), ImageBuff::plot(), project_paint_end(), put_postprocessed_frame_to_cache(), put_stabilized_frame_to_cache(), RE_layer_load_from_file(), RE_WriteEnvmapResult(), render_result_rect_to_ibuf(), sample_backbuf_area(), save_jstjpeg(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), screenshot_exec(), screenshot_startjob(), seq_proxy_build_frame(), seq_render_effect_strip_impl(), seq_render_strip(), seq_render_strip_stack(), stabilize_alloc_ibuf(), thumbnail_joblist_free(), ui_draw_but_TRACKPREVIEW(), ui_free_but(), view3d_read_backbuf(), view3d_sample_backbuf_rect(), WM_write_file(), GHOST_EventDragnDrop::~GHOST_EventDragnDrop(), and ImageBuff::~ImageBuff().
void imb_freemipmapImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 50 of file allocimbuf.c.
References IMB_freeImBuf(), ImBuf::mipmap, ImBuf::miptot, and NULL.
Referenced by finish_bake_internal(), finish_images(), imb_freerectfloatImBuf(), imb_freerectImBuf(), and IMB_makemipmap().
void imb_freerectfloatImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 64 of file allocimbuf.c.
References IB_rectfloat, imb_freemipmapImBuf(), ImBuf::mall, MEM_freeN(), NULL, and ImBuf::rect_float.
Referenced by do_plugin_effect(), get_undistorted_ibuf(), image_record_composite_apply(), imapaint_canvas_free(), imb_addrectfloatImBuf(), IMB_freeImBuf(), IMB_scalefastImBuf(), IMB_thumb_create(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), q_scale_linear_interpolation(), save_image_doit(), scaledownx(), scaledowny(), scaleupx(), and scaleupy().
void imb_freerectImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 80 of file allocimbuf.c.
References IB_rect, imb_freemipmapImBuf(), ImBuf::mall, MEM_freeN(), NULL, and ImBuf::rect.
Referenced by get_next_bake_face(), image_get_render_result(), IMB_freeImBuf(), IMB_scalefastImBuf(), input_preprocess(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), q_scale_linear_interpolation(), save_image_doit(), scaledownx(), scaledowny(), scaleupx(), scaleupy(), and seq_render_strip().
void imb_freetilesImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 93 of file allocimbuf.c.
References IB_tiles, imb_tile_cache_tile_free(), ImBuf::mall, MEM_freeN(), NULL, ImBuf::tiles, ImBuf::xtiles, and ImBuf::ytiles.
Referenced by IMB_freeImBuf().
void IMB_freezbuffloatImBuf | ( | ImBuf * | ibuf | ) |
Definition at line 140 of file allocimbuf.c.
References IB_zbuffloat, ImBuf::mall, MEM_freeN(), NULL, and ImBuf::zbuf_float.
Referenced by addzbuffloatImBuf(), IMB_freeImBuf(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), and save_image_doit().
void IMB_freezbufImBuf | ( | struct ImBuf * | ibuf | ) |
Definition at line 129 of file allocimbuf.c.
References IB_zbuf, ImBuf::mall, MEM_freeN(), NULL, and ImBuf::zbuf.
Referenced by addzbufImBuf(), IMB_freeImBuf(), save_image_doit(), and scalefast_Z_ImBuf().
Definition at line 175 of file allocimbuf.c.
References IMB_dupImBuf(), IMB_freeImBuf(), and ImBuf::refcounter.
Referenced by image_load_movie_file(), and input_preprocess().
void IMB_refImBuf | ( | struct ImBuf * | ibuf | ) |
Increase reference count to imbuf (to delete an imbuf you have to call freeImBuf as many times as it is referenced)
Definition at line 170 of file allocimbuf.c.
References ImBuf::refcounter.
Referenced by avi_fetchibuf(), get_postprocessed_cached_frame(), get_stable_cached_frame(), IMB_moviecache_get(), IMB_moviecache_put(), put_postprocessed_frame_to_cache(), put_stabilized_frame_to_cache(), and seq_render_effect_strip_impl().