Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | MOVIECLIP_CACHE_SKIP (1 << 0) |
#define | MOVIECLIP_DISABLE_RED (1 << 0) |
#define | MOVIECLIP_DISABLE_GREEN (1 << 1) |
#define | MOVIECLIP_DISABLE_BLUE (1 << 2) |
#define | MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3) |
#define MOVIECLIP_CACHE_SKIP (1 << 0) |
Caching flags.
Definition at line 136 of file BKE_movieclip.h.
#define MOVIECLIP_DISABLE_BLUE (1 << 2) |
Definition at line 141 of file BKE_movieclip.h.
#define MOVIECLIP_DISABLE_GREEN (1 << 1) |
Definition at line 140 of file BKE_movieclip.h.
#define MOVIECLIP_DISABLE_RED (1 << 0) |
Post-processing flags.
Definition at line 139 of file BKE_movieclip.h.
#define MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3) |
Definition at line 142 of file BKE_movieclip.h.
struct ImBuf* BKE_movieclip_anim_ibuf_for_frame_no_lock | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user | ||
) |
Read image buffer from the given movie clip without acquiring the LOCK_MOVIECLIP lock. Used by a prefetch job which takes care of creating a local copy of the clip.
Definition at line 1931 of file movieclip.c.
References MovieClip::flag, MovieClipUser::framenr, MCLIP_SRC_MOVIE, movieclip_load_movie_file(), NULL, and MovieClip::source.
Referenced by prefetch_movie_frame().
void BKE_movieclip_build_proxy_frame | ( | struct MovieClip * | clip, |
int | clip_flag, | ||
struct MovieDistortion * | distortion, | ||
int | cfra, | ||
int * | build_sizes, | ||
int | build_count, | ||
bool | undistorted | ||
) |
Definition at line 1823 of file movieclip.c.
References BKE_movieclip_get_ibuf_flag(), MovieClipUser::framenr, get_undistorted_ibuf(), IMB_freeImBuf(), MCLIP_PROXY_RENDER_SIZE_FULL, movieclip_build_proxy_ibuf(), MOVIECLIP_CACHE_SKIP, MovieClipUser::render_flag, and MovieClipUser::render_size.
Referenced by do_movie_proxy().
void BKE_movieclip_build_proxy_frame_for_ibuf | ( | struct MovieClip * | clip, |
struct ImBuf * | ibuf, | ||
struct MovieDistortion * | distortion, | ||
int | cfra, | ||
int * | build_sizes, | ||
int | build_count, | ||
bool | undistorted | ||
) |
Definition at line 1864 of file movieclip.c.
References get_undistorted_ibuf(), IMB_freeImBuf(), and movieclip_build_proxy_ibuf().
Referenced by proxy_task_func().
Definition at line 1655 of file movieclip.c.
References free_buffers().
Referenced by ED_space_clip_set_clip().
Definition at line 1660 of file movieclip.c.
References MovieClip::cache, IMB_moviecache_cleanup(), MovieClipCache::moviecache, moviecache_check_free_proxy(), and NULL.
Referenced by proxy_endjob().
Will try to make image buffer usable when originating from the multi-layer source. Internally finds a first combined pass and uses that as a buffer. Not ideal, but is better than a complete empty buffer.
Definition at line 527 of file movieclip.c.
References BLI_assert, ImBuf::channels, ImBuf::flags, ImBuf::ftype, IB_rectfloat, IMB_exr_close(), IMB_exr_multilayer_convert(), IMB_FTYPE_OPENEXR, ImBuf::mall, NULL, ImBuf::rect_float, and ImBuf::userdata.
Referenced by movieclip_load_sequence_file(), and prefetch_task_func().
Definition at line 2028 of file movieclip.c.
References DEG_debug_print_eval(), depsgraph, MovieClip::id, movieclip_selection_sync(), ID::name, and ID::orig_id.
Referenced by blender::deg::DepsgraphNodeBuilder::build_movieclip().
void BKE_movieclip_eval_update | ( | struct Depsgraph * | depsgraph, |
struct Main * | bmain, | ||
struct MovieClip * | clip | ||
) |
Definition at line 2017 of file movieclip.c.
References DEG_debug_print_eval(), depsgraph, MovieClip::id, ID_RECALC_SOURCE, movieclip_eval_update_generic(), movieclip_eval_update_reload(), ID::name, and ID::recalc.
Referenced by blender::deg::DepsgraphNodeBuilder::build_movieclip().
Checks if image was already loaded, then returns same image otherwise creates new. does not load ibuf itself pass on optional frame for #name images.
Definition at line 967 of file movieclip.c.
References BKE_main_blendfile_path(), BLI_open(), BLI_path_abs(), BLI_path_basename(), BLI_strncpy(), MovieTracking::camera, detect_clip_source(), file, FILE_MAX, MovieClip::filepath, MovieTrackingCamera::focal, MovieClip::lastsize, movieclip_alloc(), movieclip_calc_length(), movieclip_load_get_size(), MovieCache::name, NULL, O_BINARY, MovieTrackingCamera::sensor_width, str, MovieClip::tracking, and width.
Referenced by BKE_movieclip_file_add_exists_ex(), and seqclipboard_ptr_restore().
Definition at line 1031 of file movieclip.c.
References BKE_movieclip_file_add_exists_ex(), and NULL.
Referenced by open_exec().
struct MovieClip* BKE_movieclip_file_add_exists_ex | ( | struct Main * | bmain, |
const char * | filepath, | ||
bool * | r_exists | ||
) |
Definition at line 1003 of file movieclip.c.
References BKE_main_blendfile_path(), BKE_movieclip_file_add(), BLI_path_abs(), BLI_path_cmp, BLI_strncpy(), FILE_MAX, MovieClip::filepath, ListBase::first, MovieClip::id, ID_BLEND_PATH, id_us_plus(), Main::movieclips, ID::next, and str.
Referenced by BKE_movieclip_file_add_exists().
void BKE_movieclip_filename_for_frame | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
char * | name | ||
) |
Definition at line 1909 of file movieclip.c.
References BLI_path_abs(), BLI_strncpy(), FILE_MAX, MovieClip::filepath, MovieClip::flag, MovieClipUser::framenr, get_proxy_fname(), get_sequence_fname(), MovieClip::id, ID_BLEND_PATH_FROM_GLOBAL, if(), MCLIP_PROXY_RENDER_SIZE_FULL, MCLIP_PROXY_RENDER_UNDISTORT, MCLIP_SRC_SEQUENCE, MCLIP_USE_PROXY, MovieCache::name, MovieClipUser::render_flag, MovieClipUser::render_size, and MovieClip::source.
Referenced by prefetch_read_file_to_memory(), proxy_thread_next_frame(), and uiTemplateMovieclipInformation().
Definition at line 2098 of file movieclip.c.
References BLI_listbase_count(), BLI_pophead(), GPU_texture_free(), MovieClip_Runtime::gputextures, MEM_freeN, NULL, MovieClip::runtime, tex, and TEXTARGET_COUNT.
Referenced by OVERLAY_image_free_movieclips_textures().
Definition at line 1588 of file movieclip.c.
References MovieClip::aspx, MovieClip::aspy, MovieTracking::camera, MovieTrackingCamera::pixel_aspect, and MovieClip::tracking.
Referenced by BKE_mask_coord_from_movieclip(), BKE_mask_coord_to_movieclip(), BKE_mask_point_parent_matrix_get(), and ED_space_clip_get_aspect().
void BKE_movieclip_get_cache_segments | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
int * | r_totseg, | ||
int ** | r_points | ||
) |
Get segments of cached frames. useful for debugging cache policies.
Definition at line 1596 of file movieclip.c.
References BLI_thread_lock(), BLI_thread_unlock(), MovieClip::cache, MovieClip::flag, IMB_moviecache_get_cache_segments(), LOCK_MOVIECLIP, MovieClipCache::moviecache, NULL, MovieCache::proxy, MovieClipUser::render_flag, and rendersize_to_proxy().
Referenced by draw_movieclip_cache().
int BKE_movieclip_get_duration | ( | struct MovieClip * | clip | ) |
Definition at line 1562 of file movieclip.c.
References MovieClip::len, and movieclip_calc_length().
Referenced by clip_set_scene_frames_exec(), prefetch_check_early_out(), SEQ_add_movieclip_strip(), and SEQ_add_reload_new_file().
Definition at line 1571 of file movieclip.c.
References MovieClip::anim, IMB_anim_get_fps(), MCLIP_SRC_MOVIE, movieclip_open_anim_file(), NULL, and MovieClip::source.
Referenced by SEQ_time_sequence_get_fps().
struct GPUTexture* BKE_movieclip_get_gpu_texture | ( | struct MovieClip * | clip, |
struct MovieClipUser * | cuser | ||
) |
Definition at line 2066 of file movieclip.c.
References BKE_movieclip_get_ibuf(), GPU_texture_create_error(), GPU_texture_mipmap_mode(), MovieClip::id, IMB_create_gpu_texture(), IMB_freeImBuf(), movieclip_get_gputexture_ptr(), ID::name, NULL, ImBuf::rect_float, tex, and TEXTARGET_2D.
Referenced by image_camera_background_texture_get().
struct ImBuf* BKE_movieclip_get_ibuf | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user | ||
) |
Definition at line 1329 of file movieclip.c.
References BKE_movieclip_get_ibuf_flag(), and MovieClip::flag.
Referenced by accessor_get_preprocessed_ibuf(), BKE_movieclip_get_gpu_texture(), BKE_movieclip_get_size(), BKE_movieclip_has_frame(), BKE_movieclip_update_scopes(), blender::compositor::KeyingScreenOperation::build_voronoi_triangulation(), blender::compositor::MovieClipNode::convert_to_operations(), blender::compositor::MovieClipBaseOperation::init_execution(), and reference_keyframed_image_buffers().
struct ImBuf* BKE_movieclip_get_ibuf_flag | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
int | flag, | ||
int | cache_flag | ||
) |
Definition at line 1334 of file movieclip.c.
References movieclip_get_postprocessed_ibuf().
Referenced by BKE_movieclip_build_proxy_frame(), BKE_movieclip_get_ibuf(), BKE_tracking_refine_marker(), blender::compositor::MovieClipNode::convert_to_operations(), detect_features_exec(), blender::compositor::MovieClipBaseOperation::init_execution(), seq_get_movieclip_ibuf(), tracking_context_get_frame_ibuf(), and uiTemplateMovieclipInformation().
struct ImBuf* BKE_movieclip_get_postprocessed_ibuf | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
int | postprocess_flag | ||
) |
Definition at line 1339 of file movieclip.c.
References MovieClip::flag, and movieclip_get_postprocessed_ibuf().
Referenced by BKE_movieclip_get_stable_ibuf(), and ED_space_clip_get_buffer().
void BKE_movieclip_get_size | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
int * | width, | ||
int * | height | ||
) |
Definition at line 1520 of file movieclip.c.
References BKE_movieclip_get_ibuf(), MovieClipUser::framenr, height, IMB_freeImBuf(), MovieClip::lastframe, MovieClip::lastsize, real_ibuf_size(), width, ImBuf::x, and ImBuf::y.
Referenced by accessor_get_mask_for_track_callback(), autotrack_context_init_clips(), BKE_movieclip_get_size_fl(), BKE_movieclip_update_scopes(), BKE_tracking_refine_marker(), clip_graph_tracking_values_iterate_track_reprojection_error_values(), clip_graph_tracking_values_iterate_track_speed_values(), createTransTrackingCurvesData(), createTransTrackingData(), blender::compositor::PlaneTrackCommon::determine_canvas(), blender::compositor::KeyingScreenOperation::determine_canvas(), blender::compositor::MovieClipBaseOperation::determine_canvas(), do_movie_proxy(), do_sequence_proxy(), draw_tracks_motion_and_error_curves(), ED_clip_point_undistorted_pos(), ED_space_clip_get_aspect_dimension_aware(), ED_space_clip_get_size(), followtrack_evaluate_using_2d_position(), image_camera_background_texture_get(), blender::compositor::MovieDistortionOperation::init_data(), marker_block_handler(), movieclip_load_get_size(), set_center_principal_exec(), solve_camera_freejob(), solve_camera_initjob(), uiTemplateMarker(), and uiTemplateMovieclipInformation().
void BKE_movieclip_get_size_fl | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
float | size[2] | ||
) |
Definition at line 1553 of file movieclip.c.
References BKE_movieclip_get_size(), float(), height, size(), and width.
Referenced by BKE_mask_coord_from_movieclip(), BKE_mask_coord_to_movieclip(), and BKE_mask_point_parent_matrix_get().
struct ImBuf* BKE_movieclip_get_stable_ibuf | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
float | loc[2], | ||
float * | scale, | ||
float * | angle, | ||
int | postprocess_flag | ||
) |
Definition at line 1447 of file movieclip.c.
References angle(), MovieClipCache::angle, BKE_movieclip_get_postprocessed_ibuf(), MovieClip::cache, copy_v2_v2(), MovieTrackingStabilization::flag, MovieClipUser::framenr, get_stable_cached_frame(), IMB_freeImBuf(), MovieClipCache::loc, NULL, put_stabilized_frame_to_cache(), MovieClipCache::scale, MovieTracking::stabilization, MovieClipCache::stabilized, MovieClip::tracking, TRACKING_2D_STABILIZATION, and zero_v2().
Referenced by ED_space_clip_get_stable_buffer(), and seq_get_movieclip_ibuf().
bool BKE_movieclip_has_cached_frame | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user | ||
) |
Definition at line 1942 of file movieclip.c.
References BLI_thread_lock(), BLI_thread_unlock(), MovieClip::flag, has_imbuf_cache(), and LOCK_MOVIECLIP.
Referenced by prefetch_find_uncached_frame(), and prefetch_movie_frame().
bool BKE_movieclip_has_frame | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user | ||
) |
Definition at line 1508 of file movieclip.c.
References BKE_movieclip_get_ibuf(), and IMB_freeImBuf().
Definition at line 1894 of file movieclip.c.
References MovieClip::flag, and MCLIP_USE_PROXY.
Referenced by seq_render_movieclip_strip().
bool BKE_movieclip_put_frame_if_possible | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
struct ImBuf * | ibuf | ||
) |
Definition at line 1953 of file movieclip.c.
References BLI_thread_lock(), BLI_thread_unlock(), MovieClip::flag, LOCK_MOVIECLIP, put_imbuf_cache(), and result.
Referenced by prefetch_movie_frame(), and prefetch_task_func().
Definition at line 1667 of file movieclip.c.
References BKE_ntree_update_tag_id_changed(), detect_clip_source(), free_buffers(), MovieClip::id, MovieClip::lastsize, movieclip_calc_length(), and movieclip_load_get_size().
Referenced by movieclip_eval_update_reload(), and reload_exec().
Referenced by accessor_get_mask_for_track_callback(), accessor_get_preprocessed_ibuf(), BKE_autotrack_context_sync(), BKE_tracking_refine_marker(), BKE_tracking_track_get_weight_for_marker(), clip_draw_dopesheet_background(), clip_draw_dopesheet_main(), clip_graph_tracking_values_iterate_track_reprojection_error_values(), clip_graph_tracking_values_iterate_track_speed_values(), draw_frame_curves(), fetch_from_fcurve(), frame_jump_exec(), get_animated_weight(), libmv_tracks_new(), reference_keyframed_image_buffers(), track_markers_endjob(), and tracking_context_get_frame_ibuf().
Referenced by autotrack_context_init_markers(), autotrack_is_track_trackable(), BKE_autotrack_context_finish(), BKE_autotrack_context_sync(), BKE_mask_point_parent_matrix_get(), blender::compositor::KeyingScreenOperation::build_voronoi_triangulation(), camera_view3d_reconstruction(), camerasolver_evaluate(), blender::compositor::MovieClipNode::convert_to_operations(), blender::compositor::KeyingScreenOperation::determine_canvas(), ED_space_clip_get_clip_frame_number(), followtrack_context_init(), frame_jump_exec(), marker_block_handler(), marker_update_cb(), objectsolver_evaluate(), set_solver_keyframe_exec(), track_markers_initjob(), ui_numedit_but_TRACKPREVIEW(), uiTemplateMarker(), and uiTemplateMovieclipInformation().
void BKE_movieclip_update_scopes | ( | struct MovieClip * | clip, |
struct MovieClipUser * | user, | ||
struct MovieClipScopes * | scopes | ||
) |
Definition at line 1683 of file movieclip.c.
References BKE_movieclip_get_ibuf(), BKE_movieclip_get_size(), BKE_movieclip_remap_scene_to_clip_frame(), BKE_tracking_get_search_imbuf(), BKE_tracking_marker_get(), BKE_tracking_marker_pattern_minmax(), BKE_tracking_track_get_active(), BKE_tracking_undistort_v2(), MovieTracking::camera, MovieTrackingMarker::flag, MovieTrackingTrack::flag, MovieClipScopes::frame_height, MovieClipScopes::frame_width, MovieClipUser::framenr, height, IMB_freeImBuf(), MovieClipScopes::marker, MARKER_DISABLED, MCLIP_PROXY_RENDER_UNDISTORT, NULL, MovieClipScopes::ok, MovieTrackingCamera::pixel_aspect, MovieTrackingMarker::pos, ImBuf::rect, ImBuf::rect_float, MovieClipUser::render_flag, MovieClipScopes::scene_framenr, MovieClipScopes::slide_scale, MovieClipScopes::track, MovieClipScopes::track_disabled, MovieClipScopes::track_locked, TRACK_LOCKED, MovieClipScopes::track_preview, TRACK_PREVIEW_ALPHA, MovieClipScopes::track_search, MovieClip::tracking, MovieClipScopes::undist_marker, MovieClipScopes::use_track_mask, width, ImBuf::x, and ImBuf::y.
Referenced by clip_properties_region_draw().
void BKE_movieclip_user_set_frame | ( | struct MovieClipUser * | user, |
int | framenr | ||
) |
Definition at line 1614 of file movieclip.c.
References MovieClipUser::framenr.
Referenced by accessor_get_mask_for_track_callback(), accessor_get_preprocessed_ibuf(), BKE_mask_point_parent_matrix_get(), blender::compositor::KeyingScreenOperation::build_voronoi_triangulation(), clip_area_sync_frame_from_scene(), clip_refresh(), blender::compositor::PlaneTrackCommon::determine_canvas(), blender::compositor::KeyingScreenOperation::determine_canvas(), ED_clip_update_frame(), image_camera_background_texture_get(), blender::compositor::MovieDistortionOperation::init_data(), blender::compositor::MovieClipBaseOperation::init_execution(), reference_keyframed_image_buffers(), and seq_render_movieclip_strip().