[Bf-blender-cvs] [3baf65975cc] master: Split BKE_sequencer.h intern/extern definitions

Richard Antalik noreply at git.blender.org
Mon Oct 26 00:48:11 CET 2020


Commit: 3baf65975cc294cdf562e0dca822be0e060b22db
Author: Richard Antalik
Date:   Mon Oct 26 00:47:06 2020 +0100
Branches: master
https://developer.blender.org/rB3baf65975cc294cdf562e0dca822be0e060b22db

Split BKE_sequencer.h intern/extern definitions

Intern definitions are moved to sequencer/intern/sequencer.h

BKE_sequencer.h was also cleaned up a bit to make sure that functions
and structs are in correct category.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9259

===================================================================

M	source/blender/sequencer/BKE_sequencer.h
M	source/blender/sequencer/CMakeLists.txt
M	source/blender/sequencer/intern/effects.c
M	source/blender/sequencer/intern/image_cache.c
M	source/blender/sequencer/intern/modifier.c
M	source/blender/sequencer/intern/prefetch.c
M	source/blender/sequencer/intern/sequencer.c
A	source/blender/sequencer/intern/sequencer.h

===================================================================

diff --git a/source/blender/sequencer/BKE_sequencer.h b/source/blender/sequencer/BKE_sequencer.h
index 04be46f0ccf..90b1d611842 100644
--- a/source/blender/sequencer/BKE_sequencer.h
+++ b/source/blender/sequencer/BKE_sequencer.h
@@ -20,7 +20,7 @@
 #pragma once
 
 /** \file
- * \ingroup bke
+ * \ingroup sequencer
  */
 
 #ifdef __cplusplus
@@ -39,20 +39,37 @@ struct Scene;
 struct Sequence;
 struct SequenceModifierData;
 struct Stereo3dFormat;
-struct StripColorBalance;
 struct StripElem;
 struct TextVars;
 struct bContext;
 struct bSound;
-
 struct SeqIndexBuildContext;
 
-#define EARLY_NO_INPUT -1
-#define EARLY_DO_EFFECT 0
-#define EARLY_USE_INPUT_1 1
-#define EARLY_USE_INPUT_2 2
+/* Wipe effect */
+enum {
+  DO_SINGLE_WIPE,
+  DO_DOUBLE_WIPE,
+  /* DO_BOX_WIPE, */   /* UNUSED */
+  /* DO_CROSS_WIPE, */ /* UNUSED */
+  DO_IRIS_WIPE,
+  DO_CLOCK_WIPE,
+};
 
-/* sequence iterator */
+/* RNA enums, just to be more readable */
+enum {
+  SEQ_SIDE_NONE = 0,
+  SEQ_SIDE_LEFT,
+  SEQ_SIDE_RIGHT,
+  SEQ_SIDE_BOTH,
+  SEQ_SIDE_NO_CHANGE,
+};
+
+/* **********************************************************************
+ * sequencer.c
+ *
+ * Sequencer iterators
+ * **********************************************************************
+ */
 
 typedef struct SeqIterator {
   struct Sequence **array;
@@ -62,12 +79,6 @@ typedef struct SeqIterator {
   int valid;
 } SeqIterator;
 
-void BKE_sequence_iterator_begin(struct Editing *ed,
-                                 SeqIterator *iter,
-                                 const bool use_current_sequences);
-void BKE_sequence_iterator_next(SeqIterator *iter);
-void BKE_sequence_iterator_end(SeqIterator *iter);
-
 #define SEQ_ALL_BEGIN(ed, _seq) \
   { \
     SeqIterator iter_macro; \
@@ -90,6 +101,19 @@ void BKE_sequence_iterator_end(SeqIterator *iter);
 
 #define SEQ_CURRENT_END SEQ_ALL_END
 
+void BKE_sequence_iterator_begin(struct Editing *ed,
+                                 SeqIterator *iter,
+                                 const bool use_current_sequences);
+void BKE_sequence_iterator_next(SeqIterator *iter);
+void BKE_sequence_iterator_end(SeqIterator *iter);
+
+/* **********************************************************************
+ * sequencer.c
+ *
+ * Sequencer render functions
+ * **********************************************************************
+ */
+
 typedef enum eSeqTaskId {
   SEQ_TASK_MAIN_RENDER,
   SEQ_TASK_PREFETCH_RENDER,
@@ -118,6 +142,12 @@ typedef struct SeqRenderData {
   // bool gpu_full_samples;
 } SeqRenderData;
 
+struct ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown);
+struct ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context,
+                                             float cfra,
+                                             struct Sequence *seq);
+void BKE_sequence_alpha_mode_from_extension(struct Sequence *seq);
+void BKE_sequence_init_colorspace(struct Sequence *seq);
 void BKE_sequencer_new_render_data(struct Main *bmain,
                                    struct Depsgraph *depsgraph,
                                    struct Scene *scene,
@@ -127,132 +157,24 @@ void BKE_sequencer_new_render_data(struct Main *bmain,
                                    int for_render,
                                    SeqRenderData *r_context);
 
-int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b);
-
-/* Wipe effect */
-enum {
-  DO_SINGLE_WIPE,
-  DO_DOUBLE_WIPE,
-  /* DO_BOX_WIPE, */   /* UNUSED */
-  /* DO_CROSS_WIPE, */ /* UNUSED */
-  DO_IRIS_WIPE,
-  DO_CLOCK_WIPE,
-};
-
-struct SeqEffectHandle {
-  bool multithreaded;
-  bool supports_mask;
-
-  /* constructors & destructor */
-  /* init is _only_ called on first creation */
-  void (*init)(struct Sequence *seq);
-
-  /* number of input strips needed
-   * (called directly after construction) */
-  int (*num_inputs)(void);
-
-  /* load is called first time after readblenfile in
-   * get_sequence_effect automatically */
-  void (*load)(struct Sequence *seqconst);
-
-  /* duplicate */
-  void (*copy)(struct Sequence *dst, struct Sequence *src, const int flag);
-
-  /* destruct */
-  void (*free)(struct Sequence *seq, const bool do_id_user);
-
-  /* returns: -1: no input needed,
-   * 0: no early out,
-   * 1: out = ibuf1,
-   * 2: out = ibuf2 */
-  int (*early_out)(struct Sequence *seq, float facf0, float facf1);
-
-  /* stores the y-range of the effect IPO */
-  void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax);
-
-  /* stores the default facf0 and facf1 if no IPO is present */
-  void (*get_default_fac)(struct Sequence *seq, float cfra, float *facf0, float *facf1);
-
-  /* execute the effect
-   * sequence effects are only required to either support
-   * float-rects or byte-rects
-   * (mixed cases are handled one layer up...) */
-
-  struct ImBuf *(*execute)(const SeqRenderData *context,
-                           struct Sequence *seq,
-                           float cfra,
-                           float facf0,
-                           float facf1,
-                           struct ImBuf *ibuf1,
-                           struct ImBuf *ibuf2,
-                           struct ImBuf *ibuf3);
-
-  struct ImBuf *(*init_execution)(const SeqRenderData *context,
-                                  struct ImBuf *ibuf1,
-                                  struct ImBuf *ibuf2,
-                                  struct ImBuf *ibuf3);
-
-  void (*execute_slice)(const SeqRenderData *context,
-                        struct Sequence *seq,
-                        float cfra,
-                        float facf0,
-                        float facf1,
-                        struct ImBuf *ibuf1,
-                        struct ImBuf *ibuf2,
-                        struct ImBuf *ibuf3,
-                        int start_line,
-                        int total_lines,
-                        struct ImBuf *out);
-};
-
-/* ********************* prototypes *************** */
-
 /* **********************************************************************
  * sequencer.c
  *
- * sequencer render functions
+ * Sequencer color space functions
  * ********************************************************************** */
-double BKE_sequencer_rendersize_to_scale_factor(int size);
 
-struct ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown);
-struct ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context,
-                                             float cfra,
-                                             struct Sequence *seq);
-struct ImBuf *BKE_sequencer_give_ibuf_seqbase(const SeqRenderData *context,
-                                              float cfra,
-                                              int chan_shown,
-                                              struct ListBase *seqbasep);
-struct ImBuf *BKE_sequencer_effect_execute_threaded(struct SeqEffectHandle *sh,
-                                                    const SeqRenderData *context,
-                                                    struct Sequence *seq,
-                                                    float cfra,
-                                                    float facf0,
-                                                    float facf1,
-                                                    struct ImBuf *ibuf1,
-                                                    struct ImBuf *ibuf2,
-                                                    struct ImBuf *ibuf3);
-
-/* **********************************************************************
- * sequencer.c
- *
- * sequencer color space functions
- * ********************************************************************** */
-
-void BKE_sequencer_imbuf_to_sequencer_space(struct Scene *scene,
-                                            struct ImBuf *ibuf,
-                                            bool make_float);
 void BKE_sequencer_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf);
 void BKE_sequencer_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]);
 
 /* **********************************************************************
- * sequencer scene functions
+ * sequencer.c
+ *
+ * Sequencer scene functions
  * ********************************************************************** */
 struct Editing *BKE_sequencer_editing_get(struct Scene *scene, bool alloc);
 struct Editing *BKE_sequencer_editing_ensure(struct Scene *scene);
 void BKE_sequencer_editing_free(struct Scene *scene, const bool do_id_user);
-
 void BKE_sequencer_sort(struct Scene *scene);
-
 struct Sequence *BKE_sequencer_from_elem(ListBase *seqbase, struct StripElem *se);
 struct Sequence *BKE_sequencer_active_get(struct Scene *scene);
 int BKE_sequencer_active_get_pair(struct Scene *scene,
@@ -260,7 +182,6 @@ int BKE_sequencer_active_get_pair(struct Scene *scene,
                                   struct Sequence **seq_other);
 void BKE_sequencer_active_set(struct Scene *scene, struct Sequence *seq);
 struct Mask *BKE_sequencer_mask_get(struct Scene *scene);
-
 /* apply functions recursively */
 int BKE_sequencer_base_recursive_apply(struct ListBase *seqbase,
                                        int (*apply_fn)(struct Sequence *seq, void *),
@@ -268,16 +189,14 @@ int BKE_sequencer_base_recursive_apply(struct ListBase *seqbase,
 int BKE_sequencer_recursive_apply(struct Sequence *seq,
                                   int (*apply_fn)(struct Sequence *, void *),
                                   void *arg);
-
+float BKE_sequence_get_fps(struct Scene *scene, struct Sequence *seq);
+int BKE_sequencer_find_next_prev_edit(struct Scene *scene,
+                                      int cfra,
+                                      const short side,
+                                      const bool do_skip_mute,
+                                      const bool do_center,
+                                      const bool do_unselected);
 /* maintenance functions, mostly for RNA */
-/* extern  */
-
-void BKE_sequencer_free_clipboard(void);
-
-void BKE_sequencer_base_clipboard_pointers_free(struct ListBase *seqbase);
-void BKE_sequencer_base_clipboard_point

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list