Blender  V2.93
BKE_movieclip.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2011 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct Depsgraph;
31 struct ImBuf;
32 struct Main;
33 struct MovieClip;
34 struct MovieClipScopes;
35 struct MovieClipUser;
36 struct MovieDistortion;
37 
38 struct MovieClip *BKE_movieclip_file_add(struct Main *bmain, const char *name);
39 struct MovieClip *BKE_movieclip_file_add_exists_ex(struct Main *bmain,
40  const char *filepath,
41  bool *r_exists);
42 struct MovieClip *BKE_movieclip_file_add_exists(struct Main *bmain, const char *filepath);
43 void BKE_movieclip_reload(struct Main *bmain, struct MovieClip *clip);
44 void BKE_movieclip_clear_cache(struct MovieClip *clip);
46 
48 
49 struct ImBuf *BKE_movieclip_get_ibuf(struct MovieClip *clip, struct MovieClipUser *user);
51  struct MovieClipUser *user,
52  int postprocess_flag);
53 struct ImBuf *BKE_movieclip_get_stable_ibuf(struct MovieClip *clip,
54  struct MovieClipUser *user,
55  float loc[2],
56  float *scale,
57  float *angle,
58  int postprocess_flag);
59 struct ImBuf *BKE_movieclip_get_ibuf_flag(struct MovieClip *clip,
60  struct MovieClipUser *user,
61  int flag,
62  int cache_flag);
63 void BKE_movieclip_get_size(struct MovieClip *clip,
64  struct MovieClipUser *user,
65  int *width,
66  int *height);
67 void BKE_movieclip_get_size_fl(struct MovieClip *clip, struct MovieClipUser *user, float size[2]);
68 int BKE_movieclip_get_duration(struct MovieClip *clip);
69 float BKE_movieclip_get_fps(struct MovieClip *clip);
70 void BKE_movieclip_get_aspect(struct MovieClip *clip, float *aspx, float *aspy);
71 bool BKE_movieclip_has_frame(struct MovieClip *clip, struct MovieClipUser *user);
72 void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr);
73 
74 void BKE_movieclip_update_scopes(struct MovieClip *clip,
75  struct MovieClipUser *user,
76  struct MovieClipScopes *scopes);
77 
79  struct MovieClipUser *user,
80  int *r_totseg,
81  int **r_points);
82 
84  int clip_flag,
85  struct MovieDistortion *distortion,
86  int cfra,
87  int *build_sizes,
88  int build_count,
89  bool undistorted);
90 
92  struct ImBuf *ibuf,
93  struct MovieDistortion *distortion,
94  int cfra,
95  int *build_sizes,
96  int build_count,
97  bool undistorted);
98 
99 float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr);
100 float BKE_movieclip_remap_clip_to_scene_frame(const struct MovieClip *clip, float framenr);
101 
103  struct MovieClipUser *user,
104  char *name);
105 
106 /* Read image buffer from the given movie clip without acquiring the `LOCK_MOVIECLIP` lock.
107  * Used by a prefetch job which takes care of creating a local copy of the clip. */
109  struct MovieClipUser *user);
110 
111 bool BKE_movieclip_has_cached_frame(struct MovieClip *clip, struct MovieClipUser *user);
113  struct MovieClipUser *user,
114  struct ImBuf *ibuf);
115 
117  struct MovieClipUser *cuser);
118 
119 void BKE_movieclip_free_gputexture(struct MovieClip *clip);
120 
121 /* Dependency graph evaluation. */
122 
124  struct Main *bmain,
125  struct MovieClip *clip);
127 
128 /* caching flags */
129 #define MOVIECLIP_CACHE_SKIP (1 << 0)
130 
131 /* postprocessing flags */
132 #define MOVIECLIP_DISABLE_RED (1 << 0)
133 #define MOVIECLIP_DISABLE_GREEN (1 << 1)
134 #define MOVIECLIP_DISABLE_BLUE (1 << 2)
135 #define MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3)
136 
137 #ifdef __cplusplus
138 }
139 #endif
struct MovieClip * BKE_movieclip_file_add_exists_ex(struct Main *bmain, const char *filepath, bool *r_exists)
Definition: movieclip.c:1023
bool BKE_movieclip_put_frame_if_possible(struct MovieClip *clip, struct MovieClipUser *user, struct ImBuf *ibuf)
Definition: movieclip.c:1983
void BKE_movieclip_get_aspect(struct MovieClip *clip, float *aspx, float *aspy)
Definition: movieclip.c:1608
float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr)
void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, struct Main *bmain, struct MovieClip *clip)
Definition: movieclip.c:2047
struct MovieClip * BKE_movieclip_file_add_exists(struct Main *bmain, const char *filepath)
Definition: movieclip.c:1051
struct ImBuf * BKE_movieclip_get_ibuf_flag(struct MovieClip *clip, struct MovieClipUser *user, int flag, int cache_flag)
Definition: movieclip.c:1354
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr)
Definition: movieclip.c:1633
void BKE_movieclip_reload(struct Main *bmain, struct MovieClip *clip)
Definition: movieclip.c:1686
int BKE_movieclip_get_duration(struct MovieClip *clip)
Definition: movieclip.c:1582
void BKE_movieclip_eval_selection_update(struct Depsgraph *depsgraph, struct MovieClip *clip)
Definition: movieclip.c:2058
void BKE_movieclip_clear_cache(struct MovieClip *clip)
Definition: movieclip.c:1674
void BKE_movieclip_get_size_fl(struct MovieClip *clip, struct MovieClipUser *user, float size[2])
Definition: movieclip.c:1573
void BKE_movieclip_get_size(struct MovieClip *clip, struct MovieClipUser *user, int *width, int *height)
Definition: movieclip.c:1540
bool BKE_movieclip_has_frame(struct MovieClip *clip, struct MovieClipUser *user)
Definition: movieclip.c:1528
struct ImBuf * BKE_movieclip_get_ibuf(struct MovieClip *clip, struct MovieClipUser *user)
Definition: movieclip.c:1349
float BKE_movieclip_remap_clip_to_scene_frame(const struct MovieClip *clip, float framenr)
void BKE_movieclip_filename_for_frame(struct MovieClip *clip, struct MovieClipUser *user, char *name)
Definition: movieclip.c:1939
struct ImBuf * BKE_movieclip_anim_ibuf_for_frame_no_lock(struct MovieClip *clip, struct MovieClipUser *user)
Definition: movieclip.c:1961
void BKE_movieclip_clear_proxy_cache(struct MovieClip *clip)
Definition: movieclip.c:1679
void BKE_movieclip_update_scopes(struct MovieClip *clip, struct MovieClipUser *user, struct MovieClipScopes *scopes)
Definition: movieclip.c:1712
struct ImBuf * BKE_movieclip_get_stable_ibuf(struct MovieClip *clip, struct MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag)
Definition: movieclip.c:1467
struct GPUTexture * BKE_movieclip_get_gpu_texture(struct MovieClip *clip, struct MovieClipUser *cuser)
Definition: movieclip.c:2096
float BKE_movieclip_get_fps(struct MovieClip *clip)
Definition: movieclip.c:1591
void BKE_movieclip_convert_multilayer_ibuf(struct ImBuf *ibuf)
Definition: movieclip.c:543
struct ImBuf * BKE_movieclip_get_postprocessed_ibuf(struct MovieClip *clip, struct MovieClipUser *user, int postprocess_flag)
Definition: movieclip.c:1359
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: movieclip.c:1899
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: movieclip.c:1855
void BKE_movieclip_free_gputexture(struct MovieClip *clip)
Definition: movieclip.c:2129
struct MovieClip * BKE_movieclip_file_add(struct Main *bmain, const char *name)
Definition: movieclip.c:987
void BKE_movieclip_get_cache_segments(struct MovieClip *clip, struct MovieClipUser *user, int *r_totseg, int **r_points)
Definition: movieclip.c:1617
bool BKE_movieclip_has_cached_frame(struct MovieClip *clip, struct MovieClipUser *user)
Definition: movieclip.c:1972
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
struct GPUTexture GPUTexture
Definition: GPU_texture.h:33
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
const Depsgraph * depsgraph
char name[IMB_FILENAME_SIZE]
Definition: BKE_main.h:116
char filepath[1024]