Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sequencer.c
| Show First 20 Lines • Show All 1,532 Lines • ▼ Show 20 Lines | int BKE_sequencer_evaluate_frame(Scene *scene, int cfra) | ||||
| return evaluate_seq_frame_gen(seq_arr, ed->seqbasep, cfra, 0); | return evaluate_seq_frame_gen(seq_arr, ed->seqbasep, cfra, 0); | ||||
| } | } | ||||
| static bool video_seq_is_rendered(Sequence *seq) | static bool video_seq_is_rendered(Sequence *seq) | ||||
| { | { | ||||
| return (seq && !(seq->flag & SEQ_MUTE) && seq->type != SEQ_TYPE_SOUND_RAM); | return (seq && !(seq->flag & SEQ_MUTE) && seq->type != SEQ_TYPE_SOUND_RAM); | ||||
| } | } | ||||
| static int get_shown_sequences(ListBase *seqbasep, int cfra, int chanshown, Sequence **seq_arr_out) | int BKE_sequencer_get_shown_sequences(ListBase *seqbasep, | ||||
| int cfra, | |||||
| int chanshown, | |||||
| Sequence **seq_arr_out) | |||||
| { | { | ||||
| Sequence *seq_arr[MAXSEQ + 1]; | Sequence *seq_arr[MAXSEQ + 1]; | ||||
| int b = chanshown; | int b = chanshown; | ||||
| int cnt = 0; | int cnt = 0; | ||||
| if (b > MAXSEQ) { | if (b > MAXSEQ) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,409 Lines • ▼ Show 20 Lines | static ImBuf *seq_render_strip_stack(const SeqRenderData *context, | ||||
| int chanshown) | int chanshown) | ||||
| { | { | ||||
| Sequence *seq_arr[MAXSEQ + 1]; | Sequence *seq_arr[MAXSEQ + 1]; | ||||
| int count; | int count; | ||||
| int i; | int i; | ||||
| ImBuf *out = NULL; | ImBuf *out = NULL; | ||||
| clock_t begin; | clock_t begin; | ||||
| count = get_shown_sequences(seqbasep, cfra, chanshown, (Sequence **)&seq_arr); | count = BKE_sequencer_get_shown_sequences(seqbasep, cfra, chanshown, (Sequence **)&seq_arr); | ||||
| if (count == 0) { | if (count == 0) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| for (i = count - 1; i >= 0; i--) { | for (i = count - 1; i >= 0; i--) { | ||||
| int early_out; | int early_out; | ||||
| Sequence *seq = seq_arr[i]; | Sequence *seq = seq_arr[i]; | ||||
| ▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown) | ||||
| } | } | ||||
| SeqRenderState state; | SeqRenderState state; | ||||
| sequencer_state_init(&state); | sequencer_state_init(&state); | ||||
| ImBuf *out = NULL; | ImBuf *out = NULL; | ||||
| Sequence *seq_arr[MAXSEQ + 1]; | Sequence *seq_arr[MAXSEQ + 1]; | ||||
| int count; | int count; | ||||
| count = get_shown_sequences(seqbasep, cfra, chanshown, seq_arr); | count = BKE_sequencer_get_shown_sequences(seqbasep, cfra, chanshown, seq_arr); | ||||
| if (count) { | if (count) { | ||||
| out = BKE_sequencer_cache_get( | out = BKE_sequencer_cache_get( | ||||
| context, seq_arr[count - 1], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); | context, seq_arr[count - 1], cfra, SEQ_CACHE_STORE_FINAL_OUT, false); | ||||
| } | } | ||||
| BKE_sequencer_cache_free_temp_cache(context->scene, context->task_id, cfra); | BKE_sequencer_cache_free_temp_cache(context->scene, context->task_id, cfra); | ||||
| ▲ Show 20 Lines • Show All 1,951 Lines • Show Last 20 Lines | |||||