Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SEQ_render.h « sequencer « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fcf9f2365e17e3e48fefe2f17dfd8bcd8b8325d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2004 Blender Foundation. All rights reserved. */

#pragma once

/** \file
 * \ingroup sequencer
 */

#ifdef __cplusplus
extern "C" {
#endif

#define SEQ_RENDER_THUMB_SIZE 256

struct ListBase;
struct Main;
struct Scene;
struct Sequence;

typedef enum eSeqTaskId {
  SEQ_TASK_MAIN_RENDER,
  SEQ_TASK_PREFETCH_RENDER,
} eSeqTaskId;

typedef struct SeqRenderData {
  struct Main *bmain;
  struct Depsgraph *depsgraph;
  struct Scene *scene;
  int rectx;
  int recty;
  int preview_render_size;
  bool use_proxies;
  int for_render;
  int motion_blur_samples;
  float motion_blur_shutter;
  bool skip_cache;
  bool is_proxy_render;
  bool is_prefetch_render;
  int view_id;
  /* ID of task for assigning temp cache entries to particular task(thread, etc.) */
  eSeqTaskId task_id;

  /* special case for OpenGL render */
  struct GPUOffScreen *gpu_offscreen;
  // int gpu_samples;
  // bool gpu_full_samples;
} SeqRenderData;

/**
 * \return The image buffer or NULL.
 *
 * \note The returned #ImBuf has its reference increased, free after usage!
 */
struct ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context,
                                   float timeline_frame,
                                   int chanshown);
struct ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context,
                                          float timeline_frame,
                                          struct Sequence *seq);
/**
 * Render the series of thumbnails and store in cache.
 */
void SEQ_render_thumbnails(const struct SeqRenderData *context,
                           struct Sequence *seq,
                           struct Sequence *seq_orig,
                           float start_frame,
                           float frame_step,
                           rctf *view_area,
                           const short *stop);
/**
 * Get cached thumbnails.
 */
struct ImBuf *SEQ_get_thumbnail(const struct SeqRenderData *context,
                                struct Sequence *seq,
                                float timeline_frame,
                                rcti *crop,
                                bool clipped);
/**
 * Get frame step for equally spaced thumbnails. These thumbnails should always be present in
 * memory, so they can be used when zooming.
 */
int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const struct Sequence *seq);
/**
 * Render set of evenly spaced thumbnails that are drawn when zooming..
 */
void SEQ_render_thumbnails_base_set(const struct SeqRenderData *context,
                                    struct Sequence *seq,
                                    struct Sequence *seq_orig,
                                    rctf *view_area,
                                    const short *stop);

void SEQ_render_init_colorspace(struct Sequence *seq);
void SEQ_render_new_render_data(struct Main *bmain,
                                struct Depsgraph *depsgraph,
                                struct Scene *scene,
                                int rectx,
                                int recty,
                                int preview_render_size,
                                int for_render,
                                SeqRenderData *r_context);
int SEQ_render_evaluate_frame(struct ListBase *seqbase, int timeline_frame);
struct StripElem *SEQ_render_give_stripelem(struct Sequence *seq, int timeline_frame);

void SEQ_render_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf);
void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]);

#ifdef __cplusplus
}
#endif