Code cleanup: mark functions as static, ifdef 0 some unused functions
This commit is contained in:
@@ -64,7 +64,6 @@ typedef struct SeqIterator {
|
||||
void seq_begin(struct Editing *ed, SeqIterator *iter, int use_pointer);
|
||||
void seq_next(SeqIterator *iter);
|
||||
void seq_end(SeqIterator *iter);
|
||||
void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
|
||||
|
||||
#define SEQP_BEGIN(ed, _seq) \
|
||||
{ \
|
||||
@@ -97,9 +96,6 @@ SeqRenderData seq_new_render_data(
|
||||
struct Main *bmain, struct Scene *scene,
|
||||
int rectx, int recty, int preview_render_size);
|
||||
|
||||
int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b);
|
||||
unsigned int seq_hash_render_data(const SeqRenderData *a);
|
||||
|
||||
/* Wipe effect */
|
||||
enum {
|
||||
DO_SINGLE_WIPE,
|
||||
@@ -191,21 +187,16 @@ int seq_recursive_apply(struct Sequence *seq, int (*apply_func)(struct Sequence
|
||||
/* maintenance functions, mostly for RNA */
|
||||
// extern
|
||||
void seq_free_sequence(struct Scene *scene, struct Sequence *seq);
|
||||
void seq_free_sequence_recurse(struct Scene *scene, struct Sequence *seq);
|
||||
void seq_free_strip(struct Strip *strip);
|
||||
|
||||
void seq_free_clipboard(void);
|
||||
const char *give_seqname(struct Sequence *seq);
|
||||
void calc_sequence(struct Scene *scene, struct Sequence *seq);
|
||||
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
|
||||
void reload_sequence_new_file(struct Scene *scene, struct Sequence *seq, int lock_range);
|
||||
void build_seqar_cb(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq,
|
||||
int (*test_func)(struct Sequence *seq));
|
||||
int evaluate_seq_frame(struct Scene *scene, int cfra);
|
||||
struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
|
||||
|
||||
// intern
|
||||
void printf_strip(struct Sequence *seq); // debugging function (unused)
|
||||
void update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_seq, int len_change, int ibuf_change);
|
||||
|
||||
int input_have_to_preprocess(
|
||||
@@ -267,8 +258,6 @@ int get_sequence_effect_num_inputs(int seq_type);
|
||||
*/
|
||||
|
||||
/* for transform but also could use elsewhere */
|
||||
int seq_tx_get_start(struct Sequence *seq);
|
||||
int seq_tx_get_end(struct Sequence *seq);
|
||||
int seq_tx_get_final_left(struct Sequence *seq, int metaclip);
|
||||
int seq_tx_get_final_right(struct Sequence *seq, int metaclip);
|
||||
void seq_tx_set_final_left(struct Sequence *seq, int val);
|
||||
@@ -337,8 +326,6 @@ typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct Se
|
||||
|
||||
struct Sequence *alloc_sequence(ListBase *lb, int cfra, int machine);
|
||||
|
||||
void seq_load_apply(struct Scene *scene, struct Sequence *seq, struct SeqLoadInfo *seq_load);
|
||||
|
||||
struct Sequence *sequencer_add_image_strip(struct bContext *C, ListBase *seqbasep, struct SeqLoadInfo *seq_load);
|
||||
struct Sequence *sequencer_add_sound_strip(struct bContext *C, ListBase *seqbasep, struct SeqLoadInfo *seq_load);
|
||||
struct Sequence *sequencer_add_movie_strip(struct bContext *C, ListBase *seqbasep, struct SeqLoadInfo *seq_load);
|
||||
|
||||
@@ -47,6 +47,73 @@ typedef struct SeqCacheKey {
|
||||
|
||||
static struct MovieCache *moviecache = NULL;
|
||||
|
||||
static int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b)
|
||||
{
|
||||
if (a->preview_render_size < b->preview_render_size) {
|
||||
return -1;
|
||||
}
|
||||
if (a->preview_render_size > b->preview_render_size) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->rectx < b->rectx) {
|
||||
return -1;
|
||||
}
|
||||
if (a->rectx > b->rectx) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->recty < b->recty) {
|
||||
return -1;
|
||||
}
|
||||
if (a->recty > b->recty) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->bmain < b->bmain) {
|
||||
return -1;
|
||||
}
|
||||
if (a->bmain > b->bmain) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->scene < b->scene) {
|
||||
return -1;
|
||||
}
|
||||
if (a->scene > b->scene) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->motion_blur_shutter < b->motion_blur_shutter) {
|
||||
return -1;
|
||||
}
|
||||
if (a->motion_blur_shutter > b->motion_blur_shutter) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->motion_blur_samples < b->motion_blur_samples) {
|
||||
return -1;
|
||||
}
|
||||
if (a->motion_blur_samples > b->motion_blur_samples) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int seq_hash_render_data(const SeqRenderData *a)
|
||||
{
|
||||
unsigned int rval = a->rectx + a->recty;
|
||||
|
||||
rval ^= a->preview_render_size;
|
||||
rval ^= ((intptr_t) a->bmain) << 6;
|
||||
rval ^= ((intptr_t) a->scene) << 6;
|
||||
rval ^= (int)(a->motion_blur_shutter * 100.0f) << 10;
|
||||
rval ^= a->motion_blur_samples << 24;
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
static unsigned int seqcache_hashhash(const void *key_)
|
||||
{
|
||||
const SeqCacheKey *key = (SeqCacheKey *) key_;
|
||||
|
||||
@@ -95,13 +95,14 @@ ListBase seqbase_clipboard;
|
||||
int seqbase_clipboard_frame;
|
||||
SequencerDrawView sequencer_view3d_cb = NULL; /* NULL in background mode */
|
||||
|
||||
|
||||
void printf_strip(Sequence *seq)
|
||||
#if 0 /* unused function */
|
||||
static void printf_strip(Sequence *seq)
|
||||
{
|
||||
fprintf(stderr, "name: '%s', len:%d, start:%d, (startofs:%d, endofs:%d), (startstill:%d, endstill:%d), machine:%d, (startdisp:%d, enddisp:%d)\n",
|
||||
seq->name, seq->len, seq->start, seq->startofs, seq->endofs, seq->startstill, seq->endstill, seq->machine, seq->startdisp, seq->enddisp);
|
||||
fprintf(stderr, "\tseq_tx_set_final_left: %d %d\n\n", seq_tx_get_final_left(seq, 0), seq_tx_get_final_right(seq, 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
int seqbase_recursive_apply(ListBase *seqbase, int (*apply_func)(Sequence *seq, void *), void *arg)
|
||||
{
|
||||
@@ -140,7 +141,7 @@ static void free_proxy_seq(Sequence *seq)
|
||||
}
|
||||
}
|
||||
|
||||
void seq_free_strip(Strip *strip)
|
||||
static void seq_free_strip(Strip *strip)
|
||||
{
|
||||
strip->us--;
|
||||
if (strip->us > 0) return;
|
||||
@@ -205,7 +206,7 @@ void seq_free_sequence(Scene *scene, Sequence *seq)
|
||||
MEM_freeN(seq);
|
||||
}
|
||||
|
||||
void seq_free_sequence_recurse(Scene *scene, Sequence *seq)
|
||||
static void seq_free_sequence_recurse(Scene *scene, Sequence *seq)
|
||||
{
|
||||
Sequence *iseq;
|
||||
|
||||
@@ -306,73 +307,6 @@ SeqRenderData seq_new_render_data(
|
||||
return rval;
|
||||
}
|
||||
|
||||
int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b)
|
||||
{
|
||||
if (a->preview_render_size < b->preview_render_size) {
|
||||
return -1;
|
||||
}
|
||||
if (a->preview_render_size > b->preview_render_size) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->rectx < b->rectx) {
|
||||
return -1;
|
||||
}
|
||||
if (a->rectx > b->rectx) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->recty < b->recty) {
|
||||
return -1;
|
||||
}
|
||||
if (a->recty > b->recty) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->bmain < b->bmain) {
|
||||
return -1;
|
||||
}
|
||||
if (a->bmain > b->bmain) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->scene < b->scene) {
|
||||
return -1;
|
||||
}
|
||||
if (a->scene > b->scene) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->motion_blur_shutter < b->motion_blur_shutter) {
|
||||
return -1;
|
||||
}
|
||||
if (a->motion_blur_shutter > b->motion_blur_shutter) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a->motion_blur_samples < b->motion_blur_samples) {
|
||||
return -1;
|
||||
}
|
||||
if (a->motion_blur_samples > b->motion_blur_samples) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int seq_hash_render_data(const SeqRenderData *a)
|
||||
{
|
||||
unsigned int rval = a->rectx + a->recty;
|
||||
|
||||
rval ^= a->preview_render_size;
|
||||
rval ^= ((intptr_t) a->bmain) << 6;
|
||||
rval ^= ((intptr_t) a->scene) << 6;
|
||||
rval ^= (int)(a->motion_blur_shutter * 100.0f) << 10;
|
||||
rval ^= a->motion_blur_samples << 24;
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/* ************************* iterator ************************** */
|
||||
/* *************** (replaces old WHILE_SEQ) ********************* */
|
||||
/* **************** use now SEQ_BEGIN () SEQ_END ***************** */
|
||||
@@ -407,7 +341,7 @@ static void seq_build_array(ListBase *seqbase, Sequence ***array, int depth)
|
||||
}
|
||||
}
|
||||
|
||||
void seq_array(Editing *ed, Sequence ***seqarray, int *tot, int use_pointer)
|
||||
static void seq_array(Editing *ed, Sequence ***seqarray, int *tot, int use_pointer)
|
||||
{
|
||||
Sequence **array;
|
||||
|
||||
@@ -508,8 +442,9 @@ static void do_build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int depth,
|
||||
}
|
||||
}
|
||||
|
||||
void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq,
|
||||
int (*test_func)(Sequence *seq))
|
||||
#if 0 /* unused function */
|
||||
static void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq,
|
||||
int (*test_func)(Sequence *seq))
|
||||
{
|
||||
Sequence **tseqar;
|
||||
|
||||
@@ -526,6 +461,7 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq,
|
||||
do_build_seqar_cb(seqbase, seqar, 0, test_func);
|
||||
*seqar = tseqar;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int metaseq_start(Sequence *metaseq)
|
||||
{
|
||||
@@ -2459,6 +2395,8 @@ static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra)
|
||||
{
|
||||
StripElem *s_elem = give_stripelem(seq, cfra);
|
||||
|
||||
printf("Render image strip\n");
|
||||
|
||||
if (s_elem) {
|
||||
BLI_join_dirfile(name, sizeof(name), seq->strip->dir, s_elem->name);
|
||||
BLI_path_abs(name, G.main->name);
|
||||
@@ -3211,11 +3149,11 @@ void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_ch
|
||||
* left and right are the bounds at which the sequence is rendered,
|
||||
* start and end are from the start and fixed length of the sequence.
|
||||
*/
|
||||
int seq_tx_get_start(Sequence *seq)
|
||||
static int seq_tx_get_start(Sequence *seq)
|
||||
{
|
||||
return seq->start;
|
||||
}
|
||||
int seq_tx_get_end(Sequence *seq)
|
||||
static int seq_tx_get_end(Sequence *seq)
|
||||
{
|
||||
return seq->start + seq->len;
|
||||
}
|
||||
@@ -3908,7 +3846,7 @@ Mask *BKE_sequencer_mask_get(Scene *scene)
|
||||
|
||||
/* api like funcs for adding */
|
||||
|
||||
void seq_load_apply(Scene *scene, Sequence *seq, SeqLoadInfo *seq_load)
|
||||
static void seq_load_apply(Scene *scene, Sequence *seq, SeqLoadInfo *seq_load)
|
||||
{
|
||||
if (seq) {
|
||||
BLI_strncpy(seq->name + 2, seq_load->name, sizeof(seq->name) - 2);
|
||||
|
||||
Reference in New Issue
Block a user