Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
movieclip.c File Reference
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_constraint_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLI_threads.h"
#include "BLT_translation.h"
#include "BKE_anim_data.h"
#include "BKE_bpath.h"
#include "BKE_colortools.h"
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_movieclip.h"
#include "BKE_node.h"
#include "BKE_node_tree_update.h"
#include "BKE_tracking.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_moviecache.h"
#include "IMB_openexr.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "GPU_texture.h"
#include "BLO_read_write.h"

Go to the source code of this file.

Classes

struct  MovieClipCache
 
struct  MovieClipImBufCacheKey
 
struct  MovieClipCachePriorityData
 

Macros

#define DNA_DEPRECATED_ALLOW
 

Typedefs

typedef struct MovieClipCache MovieClipCache
 
typedef struct MovieClipImBufCacheKey MovieClipImBufCacheKey
 
typedef struct MovieClipCachePriorityData MovieClipCachePriorityData
 

Functions

static void free_buffers (MovieClip *clip)
 
static void movie_clip_init_data (ID *id)
 
static void movie_clip_copy_data (Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
 
static void movie_clip_free_data (ID *id)
 
static void movie_clip_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void movie_clip_foreach_cache (ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
 
static void movie_clip_foreach_path (ID *id, BPathForeachPathData *bpath_data)
 
static void write_movieTracks (BlendWriter *writer, ListBase *tracks)
 
static void write_moviePlaneTracks (BlendWriter *writer, ListBase *plane_tracks_base)
 
static void write_movieReconstruction (BlendWriter *writer, MovieTrackingReconstruction *reconstruction)
 
static void movieclip_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void direct_link_movieReconstruction (BlendDataReader *reader, MovieTrackingReconstruction *reconstruction)
 
static void direct_link_movieTracks (BlendDataReader *reader, ListBase *tracksbase)
 
static void direct_link_moviePlaneTracks (BlendDataReader *reader, ListBase *plane_tracks_base)
 
static void movieclip_blend_read_data (BlendDataReader *reader, ID *id)
 
static void lib_link_movieTracks (BlendLibReader *reader, MovieClip *clip, ListBase *tracksbase)
 
static void lib_link_moviePlaneTracks (BlendLibReader *reader, MovieClip *clip, ListBase *tracksbase)
 
static void movieclip_blend_read_lib (BlendLibReader *reader, ID *id)
 
static int sequence_guess_offset (const char *full_name, int head_len, unsigned short numlen)
 
static int rendersize_to_proxy (const MovieClipUser *user, int flag)
 
static int rendersize_to_number (int render_size)
 
static int get_timecode (MovieClip *clip, int flag)
 
static void get_sequence_fname (const MovieClip *clip, const int framenr, char *name)
 
static void get_proxy_fname (const MovieClip *clip, int proxy_render_size, bool undistorted, int framenr, char *name)
 
void BKE_movieclip_convert_multilayer_ibuf (struct ImBuf *ibuf)
 
static ImBuf * movieclip_load_sequence_file (MovieClip *clip, const MovieClipUser *user, int framenr, int flag)
 
static void movieclip_open_anim_file (MovieClip *clip)
 
static ImBuf * movieclip_load_movie_file (MovieClip *clip, const MovieClipUser *user, int framenr, int flag)
 
static void movieclip_calc_length (MovieClip *clip)
 
static int user_frame_to_cache_frame (MovieClip *clip, int framenr)
 
static void moviecache_keydata (void *userkey, int *framenr, int *proxy, int *render_flags)
 
static unsigned int moviecache_hashhash (const void *keyv)
 
static bool moviecache_hashcmp (const void *av, const void *bv)
 
static void * moviecache_getprioritydata (void *key_v)
 
static int moviecache_getitempriority (void *last_userkey_v, void *priority_data_v)
 
static void moviecache_prioritydeleter (void *priority_data_v)
 
static ImBuf * get_imbuf_cache (MovieClip *clip, const MovieClipUser *user, int flag)
 
static bool has_imbuf_cache (MovieClip *clip, MovieClipUser *user, int flag)
 
static bool put_imbuf_cache (MovieClip *clip, const MovieClipUser *user, ImBuf *ibuf, int flag, bool destructive)
 
static bool moviecache_check_free_proxy (ImBuf *UNUSED(ibuf), void *userkey, void *UNUSED(userdata))
 
static MovieClip * movieclip_alloc (Main *bmain, const char *name)
 
static void movieclip_load_get_size (MovieClip *clip)
 
static void detect_clip_source (Main *bmain, MovieClip *clip)
 
MovieClip * BKE_movieclip_file_add (Main *bmain, const char *name)
 
MovieClip * BKE_movieclip_file_add_exists_ex (Main *bmain, const char *filepath, bool *r_exists)
 
MovieClip * BKE_movieclip_file_add_exists (Main *bmain, const char *filepath)
 
static void real_ibuf_size (const MovieClip *clip, const MovieClipUser *user, const ImBuf *ibuf, int *width, int *height)
 
static ImBuf * get_undistorted_ibuf (MovieClip *clip, struct MovieDistortion *distortion, ImBuf *ibuf)
 
static bool need_undistortion_postprocess (const MovieClipUser *user, int clip_flag)
 
static bool need_postprocessed_frame (const MovieClipUser *user, int clip_flag, int postprocess_flag)
 
static bool check_undistortion_cache_flags (const MovieClip *clip)
 
static ImBuf * get_postprocessed_cached_frame (const MovieClip *clip, const MovieClipUser *user, int flag, int postprocess_flag)
 
static ImBuf * postprocess_frame (MovieClip *clip, const MovieClipUser *user, ImBuf *ibuf, int flag, int postprocess_flag)
 
static void put_postprocessed_frame_to_cache (MovieClip *clip, const MovieClipUser *user, ImBuf *ibuf, int flag, int postprocess_flag)
 
static ImBuf * movieclip_get_postprocessed_ibuf (MovieClip *clip, const MovieClipUser *user, int flag, int postprocess_flag, int cache_flag)
 
ImBuf * BKE_movieclip_get_ibuf (MovieClip *clip, MovieClipUser *user)
 
ImBuf * BKE_movieclip_get_ibuf_flag (MovieClip *clip, MovieClipUser *user, int flag, int cache_flag)
 
ImBuf * BKE_movieclip_get_postprocessed_ibuf (MovieClip *clip, MovieClipUser *user, int postprocess_flag)
 
static ImBuf * get_stable_cached_frame (MovieClip *clip, MovieClipUser *user, ImBuf *reference_ibuf, int framenr, int postprocess_flag)
 
static ImBuf * put_stabilized_frame_to_cache (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int framenr, int postprocess_flag)
 
ImBuf * BKE_movieclip_get_stable_ibuf (MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag)
 
bool BKE_movieclip_has_frame (MovieClip *clip, MovieClipUser *user)
 
void BKE_movieclip_get_size (MovieClip *clip, MovieClipUser *user, int *width, int *height)
 
void BKE_movieclip_get_size_fl (MovieClip *clip, MovieClipUser *user, float size[2])
 
int BKE_movieclip_get_duration (MovieClip *clip)
 
float BKE_movieclip_get_fps (MovieClip *clip)
 
void BKE_movieclip_get_aspect (MovieClip *clip, float *aspx, float *aspy)
 
void BKE_movieclip_get_cache_segments (MovieClip *clip, MovieClipUser *user, int *r_totseg, int **r_points)
 
void BKE_movieclip_user_set_frame (MovieClipUser *iuser, int framenr)
 
void BKE_movieclip_clear_cache (MovieClip *clip)
 
void BKE_movieclip_clear_proxy_cache (MovieClip *clip)
 
void BKE_movieclip_reload (Main *bmain, MovieClip *clip)
 
void BKE_movieclip_update_scopes (MovieClip *clip, MovieClipUser *user, MovieClipScopes *scopes)
 
static void movieclip_build_proxy_ibuf (MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, bool undistorted, bool threaded)
 
void BKE_movieclip_build_proxy_frame (MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, int cfra, int *build_sizes, int build_count, bool undistorted)
 
void BKE_movieclip_build_proxy_frame_for_ibuf (MovieClip *clip, ImBuf *ibuf, struct MovieDistortion *distortion, int cfra, int *build_sizes, int build_count, bool undistorted)
 
bool BKE_movieclip_proxy_enabled (MovieClip *clip)
 
float BKE_movieclip_remap_scene_to_clip_frame (const MovieClip *clip, float framenr)
 
float BKE_movieclip_remap_clip_to_scene_frame (const MovieClip *clip, float framenr)
 
void BKE_movieclip_filename_for_frame (MovieClip *clip, MovieClipUser *user, char *name)
 
ImBuf * BKE_movieclip_anim_ibuf_for_frame_no_lock (MovieClip *clip, MovieClipUser *user)
 
bool BKE_movieclip_has_cached_frame (MovieClip *clip, MovieClipUser *user)
 
bool BKE_movieclip_put_frame_if_possible (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf)
 
static void movieclip_selection_sync (MovieClip *clip_dst, const MovieClip *clip_src)
 
static void movieclip_eval_update_reload (struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip)
 
static void movieclip_eval_update_generic (struct Depsgraph *depsgraph, MovieClip *clip)
 
void BKE_movieclip_eval_update (struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip)
 
void BKE_movieclip_eval_selection_update (struct Depsgraph *depsgraph, MovieClip *clip)
 
GPU textures
static GPUTexture ** movieclip_get_gputexture_ptr (MovieClip *clip, MovieClipUser *cuser, eGPUTextureTarget textarget)
 
GPUTexture * BKE_movieclip_get_gpu_texture (MovieClip *clip, MovieClipUser *cuser)
 
void BKE_movieclip_free_gputexture (struct MovieClip *clip)
 

Variables

IDTypeInfo IDType_ID_MC
 

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 23 of file movieclip.c.

Typedef Documentation

◆ MovieClipCache

◆ MovieClipCachePriorityData

◆ MovieClipImBufCacheKey

Function Documentation

◆ BKE_movieclip_anim_ibuf_for_frame_no_lock()

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().

◆ BKE_movieclip_build_proxy_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 
)
Note
currently used by proxy job for movies, threading happens within single frame (meaning scaling shall be threaded).

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().

◆ BKE_movieclip_build_proxy_frame_for_ibuf()

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 
)
Note
currently used by proxy job for sequences, threading happens within sequence (different threads handles different frames, no threading within frame is needed)

Definition at line 1864 of file movieclip.c.

References get_undistorted_ibuf(), IMB_freeImBuf(), and movieclip_build_proxy_ibuf().

Referenced by proxy_task_func().

◆ BKE_movieclip_clear_cache()

void BKE_movieclip_clear_cache ( MovieClip *  clip)

Definition at line 1655 of file movieclip.c.

References free_buffers().

Referenced by ED_space_clip_set_clip().

◆ BKE_movieclip_clear_proxy_cache()

void BKE_movieclip_clear_proxy_cache ( MovieClip *  clip)

◆ BKE_movieclip_convert_multilayer_ibuf()

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 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().

◆ BKE_movieclip_eval_selection_update()

void BKE_movieclip_eval_selection_update ( struct Depsgraph *  depsgraph,
MovieClip *  clip 
)

◆ BKE_movieclip_eval_update()

void BKE_movieclip_eval_update ( struct Depsgraph *  depsgraph,
Main *  bmain,
MovieClip *  clip 
)

◆ BKE_movieclip_file_add()

MovieClip* BKE_movieclip_file_add ( struct Main *  bmain,
const char *  name 
)

◆ BKE_movieclip_file_add_exists()

MovieClip* BKE_movieclip_file_add_exists ( Main *  bmain,
const char *  filepath 
)

Definition at line 1031 of file movieclip.c.

References BKE_movieclip_file_add_exists_ex(), and NULL.

Referenced by open_exec().

◆ BKE_movieclip_file_add_exists_ex()

MovieClip* BKE_movieclip_file_add_exists_ex ( Main *  bmain,
const char *  filepath,
bool *  r_exists 
)

◆ BKE_movieclip_filename_for_frame()

void BKE_movieclip_filename_for_frame ( MovieClip *  clip,
MovieClipUser *  user,
char *  name 
)

◆ BKE_movieclip_free_gputexture()

void BKE_movieclip_free_gputexture ( struct MovieClip *  clip)

◆ BKE_movieclip_get_aspect()

void BKE_movieclip_get_aspect ( MovieClip *  clip,
float *  aspx,
float *  aspy 
)

◆ BKE_movieclip_get_cache_segments()

void BKE_movieclip_get_cache_segments ( struct MovieClip *  clip,
struct MovieClipUser *  user,
int *  r_totseg,
int **  r_points 
)

◆ BKE_movieclip_get_duration()

int BKE_movieclip_get_duration ( MovieClip *  clip)

◆ BKE_movieclip_get_fps()

float BKE_movieclip_get_fps ( MovieClip *  clip)

◆ BKE_movieclip_get_gpu_texture()

GPUTexture* BKE_movieclip_get_gpu_texture ( MovieClip *  clip,
MovieClipUser *  cuser 
)

◆ BKE_movieclip_get_ibuf()

ImBuf* BKE_movieclip_get_ibuf ( MovieClip *  clip,
MovieClipUser *  user 
)

◆ BKE_movieclip_get_ibuf_flag()

ImBuf* BKE_movieclip_get_ibuf_flag ( MovieClip *  clip,
MovieClipUser *  user,
int  flag,
int  cache_flag 
)

◆ BKE_movieclip_get_postprocessed_ibuf()

ImBuf* BKE_movieclip_get_postprocessed_ibuf ( MovieClip *  clip,
MovieClipUser *  user,
int  postprocess_flag 
)

◆ BKE_movieclip_get_size()

void BKE_movieclip_get_size ( MovieClip *  clip,
MovieClipUser *  user,
int *  width,
int *  height 
)

◆ BKE_movieclip_get_size_fl()

void BKE_movieclip_get_size_fl ( MovieClip *  clip,
MovieClipUser *  user,
float  size[2] 
)

◆ BKE_movieclip_get_stable_ibuf()

ImBuf* BKE_movieclip_get_stable_ibuf ( MovieClip *  clip,
MovieClipUser *  user,
float  loc[2],
float *  scale,
float *  angle,
int  postprocess_flag 
)

◆ BKE_movieclip_has_cached_frame()

bool BKE_movieclip_has_cached_frame ( MovieClip *  clip,
MovieClipUser *  user 
)

◆ BKE_movieclip_has_frame()

bool BKE_movieclip_has_frame ( MovieClip *  clip,
MovieClipUser *  user 
)

Definition at line 1508 of file movieclip.c.

References BKE_movieclip_get_ibuf(), and IMB_freeImBuf().

◆ BKE_movieclip_proxy_enabled()

bool BKE_movieclip_proxy_enabled ( MovieClip *  clip)

Definition at line 1894 of file movieclip.c.

References MovieClip::flag, and MCLIP_USE_PROXY.

Referenced by seq_render_movieclip_strip().

◆ BKE_movieclip_put_frame_if_possible()

bool BKE_movieclip_put_frame_if_possible ( MovieClip *  clip,
MovieClipUser *  user,
ImBuf *  ibuf 
)

◆ BKE_movieclip_reload()

void BKE_movieclip_reload ( Main *  bmain,
MovieClip *  clip 
)

◆ BKE_movieclip_remap_clip_to_scene_frame()

float BKE_movieclip_remap_clip_to_scene_frame ( const MovieClip *  clip,
float  framenr 
)

Definition at line 1904 of file movieclip.c.

References float(), and MovieClip::start_frame.

Referenced by movieclip_load_get_size().

◆ BKE_movieclip_remap_scene_to_clip_frame()

float BKE_movieclip_remap_scene_to_clip_frame ( const MovieClip *  clip,
float  framenr 
)

◆ BKE_movieclip_update_scopes()

void BKE_movieclip_update_scopes ( MovieClip *  clip,
MovieClipUser *  user,
MovieClipScopes *  scopes 
)

◆ BKE_movieclip_user_set_frame()

void BKE_movieclip_user_set_frame ( MovieClipUser *  iuser,
int  framenr 
)

◆ check_undistortion_cache_flags()

static bool check_undistortion_cache_flags ( const MovieClip *  clip)
static

◆ detect_clip_source()

static void detect_clip_source ( Main *  bmain,
MovieClip *  clip 
)
static

◆ direct_link_moviePlaneTracks()

static void direct_link_moviePlaneTracks ( BlendDataReader *  reader,
ListBase *  plane_tracks_base 
)
static

◆ direct_link_movieReconstruction()

static void direct_link_movieReconstruction ( BlendDataReader *  reader,
MovieTrackingReconstruction *  reconstruction 
)
static

Definition at line 228 of file movieclip.c.

References BLO_read_data_address, and reconstruction.

Referenced by movieclip_blend_read_data().

◆ direct_link_movieTracks()

static void direct_link_movieTracks ( BlendDataReader *  reader,
ListBase *  tracksbase 
)
static

Definition at line 234 of file movieclip.c.

References BLO_read_data_address, BLO_read_list(), and LISTBASE_FOREACH.

Referenced by movieclip_blend_read_data().

◆ free_buffers()

static void free_buffers ( MovieClip *  clip)
static

◆ get_imbuf_cache()

static ImBuf* get_imbuf_cache ( MovieClip *  clip,
const MovieClipUser *  user,
int  flag 
)
static

◆ get_postprocessed_cached_frame()

static ImBuf* get_postprocessed_cached_frame ( const MovieClip *  clip,
const MovieClipUser *  user,
int  flag,
int  postprocess_flag 
)
static

◆ get_proxy_fname()

static void get_proxy_fname ( const MovieClip *  clip,
int  proxy_render_size,
bool  undistorted,
int  framenr,
char *  name 
)
static

◆ get_sequence_fname()

static void get_sequence_fname ( const MovieClip *  clip,
const int  framenr,
char *  name 
)
static

◆ get_stable_cached_frame()

static ImBuf* get_stable_cached_frame ( MovieClip *  clip,
MovieClipUser *  user,
ImBuf *  reference_ibuf,
int  framenr,
int  postprocess_flag 
)
static

◆ get_timecode()

static int get_timecode ( MovieClip *  clip,
int  flag 
)
static

Definition at line 417 of file movieclip.c.

References IMB_TC_NONE, MCLIP_USE_PROXY, MovieClip::proxy, and MovieClipProxy::tc.

Referenced by movieclip_load_movie_file().

◆ get_undistorted_ibuf()

static ImBuf* get_undistorted_ibuf ( MovieClip *  clip,
struct MovieDistortion *  distortion,
ImBuf *  ibuf 
)
static

◆ has_imbuf_cache()

static bool has_imbuf_cache ( MovieClip *  clip,
MovieClipUser *  user,
int  flag 
)
static

◆ lib_link_moviePlaneTracks()

static void lib_link_moviePlaneTracks ( BlendLibReader *  reader,
MovieClip *  clip,
ListBase *  tracksbase 
)
static

Definition at line 303 of file movieclip.c.

References BLO_read_id_address, MovieClip::id, ID::lib, and LISTBASE_FOREACH.

Referenced by movieclip_blend_read_lib().

◆ lib_link_movieTracks()

static void lib_link_movieTracks ( BlendLibReader *  reader,
MovieClip *  clip,
ListBase *  tracksbase 
)
static

Definition at line 296 of file movieclip.c.

References BLO_read_id_address, MovieClip::id, ID::lib, and LISTBASE_FOREACH.

Referenced by movieclip_blend_read_lib().

◆ movie_clip_copy_data()

static void movie_clip_copy_data ( Main *  UNUSEDbmain,
ID *  id_dst,
const ID *  id_src,
const int  flag 
)
static

◆ movie_clip_foreach_cache()

static void movie_clip_foreach_cache ( ID *  id,
IDTypeForeachCacheFunctionCallback  function_callback,
void *  user_data 
)
static

◆ movie_clip_foreach_id()

static void movie_clip_foreach_id ( ID *  id,
LibraryForeachIDData *  data 
)
static

◆ movie_clip_foreach_path()

static void movie_clip_foreach_path ( ID *  id,
BPathForeachPathData *  bpath_data 
)
static

Definition at line 149 of file movieclip.c.

References BKE_bpath_foreach_path_fixed_process(), and MovieClip::filepath.

◆ movie_clip_free_data()

static void movie_clip_free_data ( ID *  id)
static

Definition at line 103 of file movieclip.c.

References BKE_tracking_free(), free_buffers(), and MovieClip::tracking.

◆ movie_clip_init_data()

static void movie_clip_init_data ( ID *  id)
static

◆ moviecache_check_free_proxy()

static bool moviecache_check_free_proxy ( ImBuf *  UNUSEDibuf,
void *  userkey,
void *  UNUSEDuserdata 
)
static

◆ moviecache_getitempriority()

static int moviecache_getitempriority ( void *  last_userkey_v,
void *  priority_data_v 
)
static

◆ moviecache_getprioritydata()

static void* moviecache_getprioritydata ( void *  key_v)
static

◆ moviecache_hashcmp()

static bool moviecache_hashcmp ( const void *  av,
const void *  bv 
)
static

Definition at line 774 of file movieclip.c.

References Freestyle::a, and usdtokens::b().

Referenced by put_imbuf_cache().

◆ moviecache_hashhash()

static unsigned int moviecache_hashhash ( const void *  keyv)
static

Definition at line 766 of file movieclip.c.

References MovieClipImBufCacheKey::framenr.

Referenced by put_imbuf_cache().

◆ moviecache_keydata()

static void moviecache_keydata ( void *  userkey,
int *  framenr,
int *  proxy,
int *  render_flags 
)
static

◆ moviecache_prioritydeleter()

static void moviecache_prioritydeleter ( void *  priority_data_v)
static

Definition at line 802 of file movieclip.c.

References MEM_freeN.

Referenced by put_imbuf_cache().

◆ movieclip_alloc()

static MovieClip* movieclip_alloc ( Main *  bmain,
const char *  name 
)
static

Definition at line 923 of file movieclip.c.

References BKE_id_new(), ID_MC, and MovieCache::name.

Referenced by BKE_movieclip_file_add().

◆ movieclip_blend_read_data()

static void movieclip_blend_read_data ( BlendDataReader *  reader,
ID *  id 
)
static

◆ movieclip_blend_read_lib()

static void movieclip_blend_read_lib ( BlendLibReader *  reader,
ID *  id 
)
static

◆ movieclip_blend_write()

static void movieclip_blend_write ( BlendWriter *  writer,
ID *  id,
const void *  id_address 
)
static

◆ movieclip_build_proxy_ibuf()

static void movieclip_build_proxy_ibuf ( MovieClip *  clip,
ImBuf *  ibuf,
int  cfra,
int  proxy_render_size,
bool  undistorted,
bool  threaded 
)
static

◆ movieclip_calc_length()

static void movieclip_calc_length ( MovieClip *  clip)
static

◆ movieclip_eval_update_generic()

static void movieclip_eval_update_generic ( struct Depsgraph *  depsgraph,
MovieClip *  clip 
)
static

◆ movieclip_eval_update_reload()

static void movieclip_eval_update_reload ( struct Depsgraph *  depsgraph,
Main *  bmain,
MovieClip *  clip 
)
static

◆ movieclip_get_gputexture_ptr()

static GPUTexture** movieclip_get_gputexture_ptr ( MovieClip *  clip,
MovieClipUser *  cuser,
eGPUTextureTarget  textarget 
)
static

◆ movieclip_get_postprocessed_ibuf()

static ImBuf* movieclip_get_postprocessed_ibuf ( MovieClip *  clip,
const MovieClipUser *  user,
int  flag,
int  postprocess_flag,
int  cache_flag 
)
static

◆ movieclip_load_get_size()

static void movieclip_load_get_size ( MovieClip *  clip)
static

◆ movieclip_load_movie_file()

static ImBuf* movieclip_load_movie_file ( MovieClip *  clip,
const MovieClipUser *  user,
int  framenr,
int  flag 
)
static

◆ movieclip_load_sequence_file()

static ImBuf* movieclip_load_sequence_file ( MovieClip *  clip,
const MovieClipUser *  user,
int  framenr,
int  flag 
)
static

◆ movieclip_open_anim_file()

static void movieclip_open_anim_file ( MovieClip *  clip)
static

◆ movieclip_selection_sync()

static void movieclip_selection_sync ( MovieClip *  clip_dst,
const MovieClip *  clip_src 
)
static

◆ need_postprocessed_frame()

static bool need_postprocessed_frame ( const MovieClipUser *  user,
int  clip_flag,
int  postprocess_flag 
)
static

Definition at line 1091 of file movieclip.c.

References need_undistortion_postprocess(), and result.

Referenced by movieclip_get_postprocessed_ibuf().

◆ need_undistortion_postprocess()

static bool need_undistortion_postprocess ( const MovieClipUser *  user,
int  clip_flag 
)
static

◆ postprocess_frame()

static ImBuf* postprocess_frame ( MovieClip *  clip,
const MovieClipUser *  user,
ImBuf *  ibuf,
int  flag,
int  postprocess_flag 
)
static

◆ put_imbuf_cache()

static bool put_imbuf_cache ( MovieClip *  clip,
const MovieClipUser *  user,
ImBuf *  ibuf,
int  flag,
bool  destructive 
)
static

◆ put_postprocessed_frame_to_cache()

static void put_postprocessed_frame_to_cache ( MovieClip *  clip,
const MovieClipUser *  user,
ImBuf *  ibuf,
int  flag,
int  postprocess_flag 
)
static

◆ put_stabilized_frame_to_cache()

static ImBuf* put_stabilized_frame_to_cache ( MovieClip *  clip,
MovieClipUser *  user,
ImBuf *  ibuf,
int  framenr,
int  postprocess_flag 
)
static

◆ real_ibuf_size()

static void real_ibuf_size ( const MovieClip *  clip,
const MovieClipUser *  user,
const ImBuf *  ibuf,
int *  width,
int *  height 
)
static

◆ rendersize_to_number()

static int rendersize_to_number ( int  render_size)
static

◆ rendersize_to_proxy()

static int rendersize_to_proxy ( const MovieClipUser *  user,
int  flag 
)
static

◆ sequence_guess_offset()

static int sequence_guess_offset ( const char *  full_name,
int  head_len,
unsigned short  numlen 
)
static

Definition at line 360 of file movieclip.c.

References BLI_strncpy(), and FILE_MAX.

Referenced by get_sequence_fname(), and user_frame_to_cache_frame().

◆ user_frame_to_cache_frame()

static int user_frame_to_cache_frame ( MovieClip *  clip,
int  framenr 
)
static

◆ write_moviePlaneTracks()

static void write_moviePlaneTracks ( BlendWriter *  writer,
ListBase *  plane_tracks_base 
)
static

◆ write_movieReconstruction()

static void write_movieReconstruction ( BlendWriter *  writer,
MovieTrackingReconstruction *  reconstruction 
)
static

Definition at line 184 of file movieclip.c.

References BLO_write_struct_array, and reconstruction.

Referenced by movieclip_blend_write().

◆ write_movieTracks()

static void write_movieTracks ( BlendWriter *  writer,
ListBase *  tracks 
)
static

Variable Documentation

◆ IDType_ID_MC

IDTypeInfo IDType_ID_MC
Initial value:
= {
.id_code = ID_MC,
.id_filter = FILTER_ID_MC,
.main_listbase_index = INDEX_ID_MC,
.struct_size = sizeof(MovieClip),
.name = "MovieClip",
.name_plural = "movieclips",
.translation_context = BLT_I18NCONTEXT_ID_MOVIECLIP,
.asset_type_info = NULL,
.copy_data = movie_clip_copy_data,
.free_data = movie_clip_free_data,
.make_local = NULL,
.foreach_id = movie_clip_foreach_id,
.foreach_cache = movie_clip_foreach_cache,
.foreach_path = movie_clip_foreach_path,
.owner_get = NULL,
.blend_write = movieclip_blend_write,
.blend_read_data = movieclip_blend_read_data,
.blend_read_lib = movieclip_blend_read_lib,
.blend_read_expand = NULL,
.blend_read_undo_preserve = NULL,
.lib_override_apply_post = NULL,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition: BKE_idtype.h:39
#define BLT_I18NCONTEXT_ID_MOVIECLIP
#define FILTER_ID_MC
Definition: DNA_ID.h:912
@ INDEX_ID_MC
Definition: DNA_ID.h:1008
@ ID_MC
Definition: DNA_ID_enums.h:73
struct MovieClip MovieClip
static void init_data(ModifierData *md)
static void movie_clip_foreach_path(ID *id, BPathForeachPathData *bpath_data)
Definition: movieclip.c:149
static void movieclip_blend_read_lib(BlendLibReader *reader, ID *id)
Definition: movieclip.c:312
static void movie_clip_foreach_cache(ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
Definition: movieclip.c:134
static void movie_clip_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
Definition: movieclip.c:85
static void movieclip_blend_read_data(BlendDataReader *reader, ID *id)
Definition: movieclip.c:257
static void movieclip_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition: movieclip.c:193
static void movie_clip_init_data(ID *id)
Definition: movieclip.c:74
static void movie_clip_foreach_id(ID *id, LibraryForeachIDData *data)
Definition: movieclip.c:113
static void movie_clip_free_data(ID *id)
Definition: movieclip.c:103

Definition at line 328 of file movieclip.c.