|
Blender V5.0
|
Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
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) |
Functions | |
| struct MovieClip * | BKE_movieclip_file_add (struct Main *bmain, const char *filepath) |
| struct MovieClip * | BKE_movieclip_file_add_exists_ex (struct Main *bmain, const char *filepath, bool *r_exists) |
| struct MovieClip * | BKE_movieclip_file_add_exists (struct Main *bmain, const char *filepath) |
| void | BKE_movieclip_reload (struct Main *bmain, struct MovieClip *clip) |
| void | BKE_movieclip_clear_cache (struct MovieClip *clip) |
| void | BKE_movieclip_clear_proxy_cache (struct MovieClip *clip) |
| void | BKE_movieclip_convert_multilayer_ibuf (struct ImBuf *ibuf) |
| struct ImBuf * | BKE_movieclip_get_ibuf (struct MovieClip *clip, const struct MovieClipUser *user) |
| struct ImBuf * | BKE_movieclip_get_postprocessed_ibuf (struct MovieClip *clip, const struct MovieClipUser *user, int postprocess_flag) |
| struct ImBuf * | BKE_movieclip_get_stable_ibuf (struct MovieClip *clip, const struct MovieClipUser *user, int postprocess_flag, float r_loc[2], float *r_scale, float *r_angle) |
| struct ImBuf * | BKE_movieclip_get_ibuf_flag (struct MovieClip *clip, const struct MovieClipUser *user, int flag, int cache_flag) |
| void | BKE_movieclip_get_size (struct MovieClip *clip, const struct MovieClipUser *user, int *r_width, int *r_height) |
| void | BKE_movieclip_get_size_fl (struct MovieClip *clip, const struct MovieClipUser *user, float r_size[2]) |
| int | BKE_movieclip_get_duration (struct MovieClip *clip) |
| float | BKE_movieclip_get_fps (struct MovieClip *clip) |
| void | BKE_movieclip_get_aspect (struct MovieClip *clip, float *aspx, float *aspy) |
| bool | BKE_movieclip_has_frame (struct MovieClip *clip, const struct MovieClipUser *user) |
| void | BKE_movieclip_user_set_frame (struct MovieClipUser *user, int framenr) |
| void | BKE_movieclip_update_scopes (struct MovieClip *clip, const struct MovieClipUser *user, struct MovieClipScopes *scopes) |
| void | BKE_movieclip_get_cache_segments (struct MovieClip *clip, const struct MovieClipUser *user, int *r_totseg, int **r_points) |
| void | BKE_movieclip_build_proxy_frame (struct MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, int cfra, const int *build_sizes, int build_count, bool undistorted) |
| void | BKE_movieclip_build_proxy_frame_for_ibuf (struct MovieClip *clip, struct ImBuf *ibuf, struct MovieDistortion *distortion, int cfra, const int *build_sizes, int build_count, bool undistorted) |
| bool | BKE_movieclip_proxy_enabled (struct MovieClip *clip) |
| float | BKE_movieclip_remap_scene_to_clip_frame (const struct MovieClip *clip, float framenr) |
| float | BKE_movieclip_remap_clip_to_scene_frame (const struct MovieClip *clip, float framenr) |
| void | BKE_movieclip_filepath_for_frame (struct MovieClip *clip, const struct MovieClipUser *user, char *filepath) |
| struct ImBuf * | BKE_movieclip_anim_ibuf_for_frame_no_lock (struct MovieClip *clip, const struct MovieClipUser *user) |
| bool | BKE_movieclip_has_cached_frame (struct MovieClip *clip, const struct MovieClipUser *user) |
| bool | BKE_movieclip_put_frame_if_possible (struct MovieClip *clip, const struct MovieClipUser *user, struct ImBuf *ibuf) |
| blender::gpu::Texture * | BKE_movieclip_get_gpu_texture (struct MovieClip *clip, struct MovieClipUser *cuser) |
| void | BKE_movieclip_free_gputexture (struct MovieClip *clip) |
| void | BKE_movieclip_eval_update (struct Depsgraph *depsgraph, struct Main *bmain, struct MovieClip *clip) |
| #define MOVIECLIP_CACHE_SKIP (1 << 0) |
Caching flags.
Definition at line 138 of file BKE_movieclip.h.
Referenced by BKE_movieclip_build_proxy_frame(), BKE_tracking_refine_marker(), detect_features_exec(), movieclip_get_postprocessed_ibuf(), blender::seq::seq_get_movieclip_ibuf(), and tracking_context_get_frame_ibuf().
| #define MOVIECLIP_DISABLE_BLUE (1 << 2) |
Definition at line 143 of file BKE_movieclip.h.
Referenced by postprocess_frame(), and rna_def_space_clip().
| #define MOVIECLIP_DISABLE_GREEN (1 << 1) |
Definition at line 142 of file BKE_movieclip.h.
Referenced by postprocess_frame(), and rna_def_space_clip().
| #define MOVIECLIP_DISABLE_RED (1 << 0) |
Post-processing flags.
Definition at line 141 of file BKE_movieclip.h.
Referenced by postprocess_frame(), and rna_def_space_clip().
| #define MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3) |
Definition at line 144 of file BKE_movieclip.h.
Referenced by postprocess_frame(), and rna_def_space_clip().
| struct ImBuf * BKE_movieclip_anim_ibuf_for_frame_no_lock | ( | struct MovieClip * | clip, |
| const 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.
Referenced by prefetch_movie_frame().
| void BKE_movieclip_build_proxy_frame | ( | struct MovieClip * | clip, |
| int | clip_flag, | ||
| struct MovieDistortion * | distortion, | ||
| int | cfra, | ||
| const int * | build_sizes, | ||
| int | build_count, | ||
| bool | undistorted ) |
Definition at line 1811 of file movieclip.cc.
References BKE_movieclip_get_ibuf_flag(), MovieClipUser::framenr, get_undistorted_ibuf(), i, 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, | ||
| const int * | build_sizes, | ||
| int | build_count, | ||
| bool | undistorted ) |
Definition at line 1852 of file movieclip.cc.
References get_undistorted_ibuf(), i, IMB_freeImBuf(), and movieclip_build_proxy_ibuf().
Referenced by proxy_task_func().
| void BKE_movieclip_clear_cache | ( | struct MovieClip * | clip | ) |
Definition at line 1643 of file movieclip.cc.
References free_buffers().
Referenced by ED_space_clip_set_clip(), and wm_set_working_color_space_exec().
| void BKE_movieclip_clear_proxy_cache | ( | struct MovieClip * | clip | ) |
Definition at line 1648 of file movieclip.cc.
References MovieClip::cache, IMB_moviecache_cleanup(), MovieClipCache::moviecache, and moviecache_check_free_proxy().
Referenced by proxy_endjob().
| void BKE_movieclip_convert_multilayer_ibuf | ( | struct ImBuf * | ibuf | ) |
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 521 of file movieclip.cc.
References BLI_assert, ImBuf::channels, ImBufFloatBuffer::data, ImBuf::exrhandle, ImBuf::float_buffer, ImBuf::ftype, IB_TAKE_OWNERSHIP, IMB_assign_float_buffer(), IMB_exr_close(), IMB_exr_multilayer_convert(), and IMB_FTYPE_OPENEXR.
Referenced by blender::seq::convert_multilayer_ibuf(), movieclip_load_sequence_file(), and prefetch_task_func().
| void BKE_movieclip_eval_update | ( | struct Depsgraph * | depsgraph, |
| struct Main * | bmain, | ||
| struct MovieClip * | clip ) |
Definition at line 1970 of file movieclip.cc.
References DEG_debug_print_eval(), DEG_get_update_count(), depsgraph, MovieClip::id, ID_RECALC_SOURCE, MovieClip_Runtime::last_update, movieclip_eval_update_generic(), movieclip_eval_update_reload(), ID::name, ID::recalc, and MovieClip::runtime.
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 filepath images.
Definition at line 955 of file movieclip.cc.
References BKE_main_blendfile_path(), BLI_open(), BLI_path_abs(), BLI_path_basename(), MovieTracking::camera, detect_clip_source(), FILE_MAX, MovieClip::filepath, MovieTrackingCamera::focal, MovieClip::lastsize, movieclip_alloc(), movieclip_calc_length(), movieclip_load_get_size(), O_BINARY, MovieTrackingCamera::sensor_width, STRNCPY(), and MovieClip::tracking.
Referenced by BKE_movieclip_file_add_exists_ex().
Definition at line 1021 of file movieclip.cc.
References BKE_movieclip_file_add_exists_ex().
Referenced by open_exec().
| struct MovieClip * BKE_movieclip_file_add_exists_ex | ( | struct Main * | bmain, |
| const char * | filepath, | ||
| bool * | r_exists ) |
Definition at line 991 of file movieclip.cc.
References BKE_main_blendfile_path(), BKE_movieclip_file_add(), BLI_path_abs(), BLI_path_cmp, FILE_MAX, MovieClip::filepath, ListBase::first, MovieClip::id, ID_BLEND_PATH, id_us_plus(), Main::movieclips, ID::next, and STRNCPY().
Referenced by BKE_movieclip_file_add_exists().
| void BKE_movieclip_filepath_for_frame | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| char * | filepath ) |
Referenced by prefetch_read_file_to_memory(), proxy_thread_next_frame(), and uiTemplateMovieclipInformation().
| void BKE_movieclip_free_gputexture | ( | struct MovieClip * | clip | ) |
Definition at line 2047 of file movieclip.cc.
References BLI_listbase_count(), BLI_pophead(), GPU_texture_free(), MovieClip_RuntimeGPUTexture::gputexture, MovieClip_Runtime::gputextures, i, MEM_freeN(), MovieClip::runtime, and TEXTARGET_COUNT.
Referenced by blender::draw::overlay::Resources::free_movieclips_textures(), and wm_set_working_color_space_exec().
Definition at line 1574 of file movieclip.cc.
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, |
| const struct MovieClipUser * | user, | ||
| int * | r_totseg, | ||
| int ** | r_points ) |
Get segments of cached frames. useful for debugging cache policies.
Referenced by draw_movieclip_cache().
| int BKE_movieclip_get_duration | ( | struct MovieClip * | clip | ) |
Definition at line 1553 of file movieclip.cc.
References MovieClip::len, and movieclip_calc_length().
Referenced by blender::seq::add_movieclip_strip(), blender::seq::add_reload_new_file(), clip_set_scene_frames_exec(), and prefetch_check_early_out().
Definition at line 1562 of file movieclip.cc.
References MovieClip::anim, MCLIP_SRC_MOVIE, MOV_get_fps(), movieclip_open_anim_file(), and MovieClip::source.
Referenced by blender::seq::time_strip_fps_get().
| blender::gpu::Texture * BKE_movieclip_get_gpu_texture | ( | struct MovieClip * | clip, |
| struct MovieClipUser * | cuser ) |
Definition at line 2015 of file movieclip.cc.
References BKE_movieclip_get_ibuf(), CLOG_ERROR, ImBufFloatBuffer::data, false, ImBuf::float_buffer, GPU_texture_create_error(), GPU_texture_mipmap_mode(), MovieClip::id, IMB_create_gpu_texture(), IMB_freeImBuf(), LOG, movieclip_get_gputexture_ptr(), ID::name, and TEXTARGET_2D.
| struct ImBuf * BKE_movieclip_get_ibuf | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user ) |
| struct ImBuf * BKE_movieclip_get_ibuf_flag | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| int | flag, | ||
| int | cache_flag ) |
References flag.
Referenced by BKE_tracking_refine_marker(), detect_features_exec(), blender::seq::seq_get_movieclip_ibuf(), tracking_context_get_frame_ibuf(), and uiTemplateMovieclipInformation().
| struct ImBuf * BKE_movieclip_get_postprocessed_ibuf | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| int | postprocess_flag ) |
Referenced by ED_space_clip_get_buffer().
| void BKE_movieclip_get_size | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| int * | r_width, | ||
| int * | r_height ) |
Referenced by accessor_get_mask_for_track_callback(), autotrack_context_init_clips(), BKE_tracking_camera_principal_point_pixel_get(), BKE_tracking_camera_principal_point_pixel_set(), BKE_tracking_refine_marker(), clip_graph_tracking_values_iterate_track_reprojection_error_values(), clip_graph_tracking_values_iterate_track_speed_values(), blender::ed::transform::createTransTrackingCurves(), blender::ed::transform::createTransTrackingCurvesData(), blender::ed::transform::createTransTrackingData(), 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(), blender::compositor::get_movie_clip_size(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::get_movie_clip_size(), blender::nodes::node_composite_keyingscreen_cc::KeyingScreenOperation::get_size(), blender::nodes::node_composite_trackpos_cc::TrackPositionOperation::get_size(), blender::compositor::KeyingScreen::KeyingScreen(), marker_block_handler(), solve_camera_freejob(), solve_camera_initjob(), uiTemplateMarker(), and uiTemplateMovieclipInformation().
| void BKE_movieclip_get_size_fl | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| float | r_size[2] ) |
| struct ImBuf * BKE_movieclip_get_stable_ibuf | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| int | postprocess_flag, | ||
| float | r_loc[2], | ||
| float * | r_scale, | ||
| float * | r_angle ) |
Referenced by ED_space_clip_get_stable_buffer(), and blender::seq::seq_get_movieclip_ibuf().
| bool BKE_movieclip_has_cached_frame | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user ) |
Referenced by prefetch_find_uncached_frame(), and prefetch_movie_frame().
| bool BKE_movieclip_has_frame | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user ) |
| bool BKE_movieclip_proxy_enabled | ( | struct MovieClip * | clip | ) |
Definition at line 1882 of file movieclip.cc.
References MovieClip::flag, and MCLIP_USE_PROXY.
Referenced by blender::seq::seq_render_movieclip_strip().
| bool BKE_movieclip_put_frame_if_possible | ( | struct MovieClip * | clip, |
| const struct MovieClipUser * | user, | ||
| struct ImBuf * | ibuf ) |
References depsgraph.
Referenced by prefetch_movie_frame(), and prefetch_task_func().
Definition at line 1655 of file movieclip.cc.
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(), camerasolver_evaluate(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_homography_matrices(), blender::nodes::node_composite_trackpos_cc::TrackPositionOperation::compute_marker_position_at_frame(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_stabilization_data(), blender::nodes::node_composite_trackpos_cc::TrackPositionOperation::compute_temporally_neighboring_marker_position(), ED_space_clip_get_clip_frame_number(), blender::nodes::node_composite_stabilize2d_cc::Stabilize2DOperation::execute(), followtrack_context_init(), frame_jump_exec(), blender::compositor::get_movie_clip_user(), blender::nodes::node_composite_keyingscreen_cc::KeyingScreenOperation::get_size(), 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, |
| const struct MovieClipUser * | user, | ||
| struct MovieClipScopes * | scopes ) |
Referenced by clip_properties_region_draw().
| void BKE_movieclip_user_set_frame | ( | struct MovieClipUser * | user, |
| int | framenr ) |
Definition at line 1600 of file movieclip.cc.
References MovieClipUser::framenr.
Referenced by accessor_get_mask_for_track_callback(), accessor_get_preprocessed_ibuf(), BKE_mask_point_parent_matrix_get(), clip_area_sync_frame_from_scene(), clip_refresh(), ED_clip_update_frame(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::get_movie_clip_buffer(), blender::compositor::get_movie_clip_size(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::get_movie_clip_size(), blender::compositor::get_movie_clip_user(), blender::nodes::node_composite_keyingscreen_cc::KeyingScreenOperation::get_size(), blender::nodes::node_composite_trackpos_cc::TrackPositionOperation::get_size(), reference_keyframed_image_buffers(), and blender::seq::seq_render_movieclip_strip().