Blender V2.61 - r43446
Classes | Typedefs | Functions

movieclip.c File Reference

#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include "MEM_guardedalloc.h"
#include "DNA_constraint_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_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_mempool.h"
#include "BLI_threads.h"
#include "BKE_constraint.h"
#include "BKE_library.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "BKE_movieclip.h"
#include "BKE_image.h"
#include "BKE_tracking.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_moviecache.h"

Go to the source code of this file.

Classes

struct  MovieClipCache
struct  MovieClipImBufCacheKey

Typedefs

typedef struct MovieClipCache MovieClipCache
typedef struct
MovieClipImBufCacheKey 
MovieClipImBufCacheKey

Functions

static int sequence_guess_offset (const char *full_name, int head_len, int numlen)
static int rendersize_to_proxy (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 (MovieClip *clip, int framenr, char *name)
static void get_proxy_fname (MovieClip *clip, int proxy_render_size, int undistorted, int framenr, char *name)
static ImBufmovieclip_load_sequence_file (MovieClip *clip, MovieClipUser *user, int framenr, int flag)
static ImBufmovieclip_load_movie_file (MovieClip *clip, MovieClipUser *user, int framenr, int flag)
static void moviecache_keydata (void *userkey, int *framenr, int *proxy, int *render_flags)
static unsigned int moviecache_hashhash (const void *keyv)
static int moviecache_hashcmp (const void *av, const void *bv)
static ImBufget_imbuf_cache (MovieClip *clip, MovieClipUser *user, int flag)
static void put_imbuf_cache (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int flag)
static MovieClipmovieclip_alloc (const char *name)
MovieClipBKE_add_movieclip_file (const char *name)
static void real_ibuf_size (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int *width, int *height)
static ImBufget_undistorted_ibuf (MovieClip *clip, struct MovieDistortion *distortion, ImBuf *ibuf)
static int need_undistortion_postprocess (MovieClipUser *user, int flag)
static int need_postprocessed_frame (MovieClipUser *user, int flag, int postprocess_flag)
static int check_undistortion_cache_flags (MovieClip *clip)
static ImBufget_postprocessed_cached_frame (MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag)
static ImBufput_postprocessed_frame_to_cache (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int flag, int postprocess_flag)
static ImBufmovieclip_get_postprocessed_ibuf (MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag)
ImBufBKE_movieclip_get_ibuf (MovieClip *clip, MovieClipUser *user)
ImBufBKE_movieclip_get_ibuf_flag (MovieClip *clip, MovieClipUser *user, int flag)
ImBufBKE_movieclip_get_postprocessed_ibuf (MovieClip *clip, MovieClipUser *user, int postprocess_flag)
static ImBufget_stable_cached_frame (MovieClip *clip, MovieClipUser *user, int framenr)
static ImBufput_stabilized_frame_to_cache (MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int framenr)
ImBufBKE_movieclip_get_stable_ibuf (MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag)
int BKE_movieclip_has_frame (MovieClip *clip, MovieClipUser *user)
void BKE_movieclip_get_size (MovieClip *clip, MovieClipUser *user, int *width, int *height)
void BKE_movieclip_aspect (MovieClip *clip, float *aspx, float *aspy)
void BKE_movieclip_get_cache_segments (MovieClip *clip, MovieClipUser *user, int *totseg_r, int **points_r)
void BKE_movieclip_user_set_frame (MovieClipUser *iuser, int framenr)
static void free_buffers (MovieClip *clip)
void BKE_movieclip_reload (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, int undistorted)
void BKE_movieclip_build_proxy_frame (MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, int cfra, int *build_sizes, int build_count, int undistorted)
void free_movieclip (MovieClip *clip)
void unlink_movieclip (Main *bmain, MovieClip *clip)

Detailed Description

Definition in file movieclip.c.


Typedef Documentation


Function Documentation

MovieClip* BKE_add_movieclip_file ( const char *  name) [read]
void BKE_movieclip_aspect ( MovieClip clip,
float *  aspx,
float *  aspy 
)
void BKE_movieclip_build_proxy_frame ( MovieClip clip,
int  clip_flag,
struct MovieDistortion distortion,
int  cfra,
int *  build_sizes,
int  build_count,
int  undistorted 
)
void BKE_movieclip_get_cache_segments ( MovieClip clip,
MovieClipUser user,
int *  totseg_r,
int **  points_r 
)
ImBuf* BKE_movieclip_get_ibuf ( MovieClip clip,
MovieClipUser user 
) [read]
ImBuf* BKE_movieclip_get_ibuf_flag ( MovieClip clip,
MovieClipUser user,
int  flag 
) [read]
ImBuf* BKE_movieclip_get_postprocessed_ibuf ( MovieClip clip,
MovieClipUser user,
int  postprocess_flag 
) [read]
void BKE_movieclip_get_size ( MovieClip clip,
MovieClipUser user,
int *  width,
int *  height 
)
ImBuf* BKE_movieclip_get_stable_ibuf ( MovieClip clip,
MovieClipUser user,
float  loc[2],
float *  scale,
float *  angle,
int  postprocess_flag 
) [read]
int BKE_movieclip_has_frame ( MovieClip clip,
MovieClipUser user 
)

Definition at line 812 of file movieclip.c.

References BKE_movieclip_get_ibuf(), and IMB_freeImBuf().

Referenced by createTransTrackingData(), and space_clip_frame_poll().

void BKE_movieclip_reload ( MovieClip clip)
void BKE_movieclip_update_scopes ( MovieClip clip,
MovieClipUser user,
MovieClipScopes scopes 
)
void BKE_movieclip_user_set_frame ( MovieClipUser iuser,
int  framenr 
)
static int check_undistortion_cache_flags ( MovieClip clip) [static]
static void free_buffers ( MovieClip clip) [static]
void free_movieclip ( MovieClip clip)

Definition at line 1043 of file movieclip.c.

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

Referenced by free_libblock().

static ImBuf* get_imbuf_cache ( MovieClip clip,
MovieClipUser user,
int  flag 
) [static]
static ImBuf* get_postprocessed_cached_frame ( MovieClip clip,
MovieClipUser user,
int  flag,
int  postprocess_flag 
) [static]
static void get_proxy_fname ( MovieClip clip,
int  proxy_render_size,
int  undistorted,
int  framenr,
char *  name 
) [static]
static void get_sequence_fname ( MovieClip clip,
int  framenr,
char *  name 
) [static]
static ImBuf* get_stable_cached_frame ( MovieClip clip,
MovieClipUser user,
int  framenr 
) [static]
static int get_timecode ( MovieClip clip,
int  flag 
) [static]

Definition at line 138 of file movieclip.c.

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

Referenced by movieclip_load_movie_file().

static ImBuf* get_undistorted_ibuf ( MovieClip clip,
struct MovieDistortion distortion,
ImBuf ibuf 
) [static]
static int moviecache_hashcmp ( const void *  av,
const void *  bv 
) [static]
static unsigned int moviecache_hashhash ( const void *  keyv) [static]

Definition at line 301 of file movieclip.c.

References MovieClipImBufCacheKey::framenr.

Referenced by put_imbuf_cache().

static void moviecache_keydata ( void *  userkey,
int *  framenr,
int *  proxy,
int *  render_flags 
) [static]
static MovieClip* movieclip_alloc ( const char *  name) [static]
static void movieclip_build_proxy_ibuf ( MovieClip clip,
ImBuf ibuf,
int  cfra,
int  proxy_render_size,
int  undistorted 
) [static]
static ImBuf* movieclip_get_postprocessed_ibuf ( MovieClip clip,
MovieClipUser user,
int  flag,
int  postprocess_flag 
) [static]
static ImBuf* movieclip_load_movie_file ( MovieClip clip,
MovieClipUser user,
int  framenr,
int  flag 
) [static]
static ImBuf* movieclip_load_sequence_file ( MovieClip clip,
MovieClipUser user,
int  framenr,
int  flag 
) [static]
static int need_postprocessed_frame ( MovieClipUser user,
int  flag,
int  postprocess_flag 
) [static]

Definition at line 516 of file movieclip.c.

References need_undistortion_postprocess().

Referenced by movieclip_get_postprocessed_ibuf().

static int need_undistortion_postprocess ( MovieClipUser user,
int  flag 
) [static]
static void put_imbuf_cache ( MovieClip clip,
MovieClipUser user,
ImBuf ibuf,
int  flag 
) [static]
static ImBuf* put_postprocessed_frame_to_cache ( MovieClip clip,
MovieClipUser user,
ImBuf ibuf,
int  flag,
int  postprocess_flag 
) [static]
static ImBuf* put_stabilized_frame_to_cache ( MovieClip clip,
MovieClipUser user,
ImBuf ibuf,
int  framenr 
) [static]
static void real_ibuf_size ( MovieClip clip,
MovieClipUser user,
ImBuf ibuf,
int *  width,
int *  height 
) [static]
static int rendersize_to_number ( int  render_size) [static]
static int rendersize_to_proxy ( MovieClipUser user,
int  flag 
) [static]
static int sequence_guess_offset ( const char *  full_name,
int  head_len,
int  numlen 
) [static]

Definition at line 82 of file movieclip.c.

References BLI_strncpy(), and FILE_MAX.

Referenced by get_sequence_fname().

void unlink_movieclip ( Main bmain,
MovieClip clip 
)