Blender  V3.3
image_cache.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2004 Blender Foundation. All rights reserved. */
3 
4 #pragma once
5 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include "SEQ_render.h" /* Needed for #eSeqTaskId. */
15 
16 struct ImBuf;
17 struct Main;
18 struct Scene;
19 struct SeqRenderData;
20 struct Sequence;
21 
22 typedef struct SeqCacheKey {
24  void *userkey;
25  struct SeqCacheKey *link_prev; /* Used for linking intermediate items to final frame. */
26  struct SeqCacheKey *link_next; /* Used for linking intermediate items to final frame. */
27  struct Sequence *seq;
28  struct SeqRenderData context;
29  float frame_index; /* Usually same as timeline_frame. Mapped to media for RAW entries. */
30  float timeline_frame; /* Only for reference - used for freeing when cache is full. */
31  float cost; /* In short: render time(s) divided by playback frame duration(s) */
32  bool is_temp_cache; /* this cache entry will be freed before rendering next frame */
33  /* ID of task for assigning temp cache entries to particular task(thread, etc.) */
35  int type;
37 
38 struct ImBuf *seq_cache_get(const struct SeqRenderData *context,
39  struct Sequence *seq,
40  float timeline_frame,
41  int type);
42 void seq_cache_put(const struct SeqRenderData *context,
43  struct Sequence *seq,
44  float timeline_frame,
45  int type,
46  struct ImBuf *i);
48  struct Sequence *seq,
49  float timeline_frame,
50  struct ImBuf *i,
51  rctf *view_area);
53  struct Sequence *seq,
54  float timeline_frame,
55  int type,
56  struct ImBuf *nval);
61 bool seq_cache_recycle_item(struct Scene *scene);
62 void seq_cache_free_temp_cache(struct Scene *scene, short id, int timeline_frame);
63 void seq_cache_destruct(struct Scene *scene);
64 void seq_cache_cleanup_all(struct Main *bmain);
66  struct Sequence *seq,
67  struct Sequence *seq_changed,
68  int invalidate_types,
69  bool force_seq_changed_range);
70 void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area);
71 bool seq_cache_is_full(void);
72 float seq_cache_frame_index_to_timeline_frame(struct Sequence *seq, float frame_index);
73 
74 #ifdef __cplusplus
75 }
76 #endif
_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 type
eSeqTaskId
Definition: SEQ_render.h:22
Scene scene
void seq_cache_cleanup_sequence(struct Scene *scene, struct Sequence *seq, struct Sequence *seq_changed, int invalidate_types, bool force_seq_changed_range)
Definition: image_cache.c:626
struct ImBuf * seq_cache_get(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, int type)
void seq_cache_put(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, int type, struct ImBuf *i)
void seq_cache_cleanup_all(struct Main *bmain)
Definition: image_cache.c:596
float seq_cache_frame_index_to_timeline_frame(struct Sequence *seq, float frame_index)
Definition: image_cache.c:151
bool seq_cache_is_full(void)
Definition: image_cache.c:919
void seq_cache_thumbnail_put(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, struct ImBuf *i, rctf *view_area)
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area)
Definition: image_cache.c:685
bool seq_cache_put_if_possible(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, int type, struct ImBuf *nval)
void seq_cache_destruct(struct Scene *scene)
Definition: image_cache.c:576
struct SeqCacheKey SeqCacheKey
void seq_cache_free_temp_cache(struct Scene *scene, short id, int timeline_frame)
Definition: image_cache.c:547
bool seq_cache_recycle_item(struct Scene *scene)
Definition: image_cache.c:446
Definition: BKE_main.h:121
struct SeqCacheKey * link_next
Definition: image_cache.h:26
float timeline_frame
Definition: image_cache.h:30
float frame_index
Definition: image_cache.h:29
eSeqTaskId task_id
Definition: image_cache.h:34
struct Sequence * seq
Definition: image_cache.h:27
bool is_temp_cache
Definition: image_cache.h:32
struct SeqRenderData context
Definition: image_cache.h:28
void * userkey
Definition: image_cache.h:24
struct SeqCache * cache_owner
Definition: image_cache.h:23
float cost
Definition: image_cache.h:31
struct SeqCacheKey * link_prev
Definition: image_cache.h:25