From 32b1a13fa1e427bc5b2cce2bf179fd274679e08f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2021 21:02:29 +1100 Subject: Cleanup: move public doc-strings into headers for 'sequencer' Ref T92709 --- source/blender/sequencer/SEQ_relations.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source/blender/sequencer/SEQ_relations.h') diff --git a/source/blender/sequencer/SEQ_relations.h b/source/blender/sequencer/SEQ_relations.h index 3b9d430a3c9..3c3fe2fdd83 100644 --- a/source/blender/sequencer/SEQ_relations.h +++ b/source/blender/sequencer/SEQ_relations.h @@ -34,8 +34,14 @@ struct ReportList; struct Scene; struct Sequence; +/** + * Function to free imbuf and anim data on changes. + */ void SEQ_relations_sequence_free_anim(struct Sequence *seq); bool SEQ_relations_check_scene_recursion(struct Scene *scene, struct ReportList *reports); +/** + * Check if "seq_main" (indirectly) uses strip "seq". + */ bool SEQ_relations_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); void SEQ_relations_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); void SEQ_relations_invalidate_cache_raw(struct Scene *scene, struct Sequence *seq); @@ -49,10 +55,14 @@ void SEQ_relations_invalidate_cache_in_range(struct Scene *scene, struct Sequence *range_mask, int invalidate_types); void SEQ_relations_free_all_anim_ibufs(struct Scene *scene, int timeline_frame); -/* A debug and development function which checks whether sequences have unique UUIDs. - * Errors will be reported to the console. */ +/** + * A debug and development function which checks whether sequences have unique UUIDs. + * Errors will be reported to the console. + */ void SEQ_relations_check_uuids_unique_and_report(const struct Scene *scene); -/* Generate new UUID for the given sequence. */ +/** + * Generate new UUID for the given sequence. + */ void SEQ_relations_session_uuid_generate(struct Sequence *sequence); void SEQ_cache_cleanup(struct Scene *scene); @@ -61,6 +71,9 @@ void SEQ_cache_iterate( void *userdata, bool callback_init(void *userdata, size_t item_count), bool callback_iter(void *userdata, struct Sequence *seq, int timeline_frame, int cache_type)); +/** + * Return immediate parent meta of sequence. + */ struct Sequence *SEQ_find_metastrip_by_sequence(ListBase *seqbase /* = ed->seqbase */, struct Sequence *meta /* = NULL */, struct Sequence *seq); -- cgit v1.2.3 From b64750991334517a0d0cfc94c21d7276d5e5e833 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 14 Dec 2021 00:18:24 +0100 Subject: Fix T93844: High memory usage during VSE preview Since 88c02bf826df FFmpeg handles are freed if image is not displayed. This change did not work correctly if strips are inside meta strip, because overlap did not consider meta strip boundary, only strips inside of meta strip. Pass frame range to `sequencer_all_free_anim_ibufs`, if strip is inside of meta strip, frame range is reduced to fit meta strip boundary, but if meta strip is being edited, range must be set to +/-`MAXFRAME`, otherwise playback performance would be too bad. --- source/blender/sequencer/SEQ_relations.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/sequencer/SEQ_relations.h') diff --git a/source/blender/sequencer/SEQ_relations.h b/source/blender/sequencer/SEQ_relations.h index 3c3fe2fdd83..9571e826759 100644 --- a/source/blender/sequencer/SEQ_relations.h +++ b/source/blender/sequencer/SEQ_relations.h @@ -54,6 +54,9 @@ void SEQ_relations_invalidate_cache_in_range(struct Scene *scene, struct Sequence *seq, struct Sequence *range_mask, int invalidate_types); +/** + * Release FFmpeg handles of strips that are not currently displayed to minimize memory usage. + */ void SEQ_relations_free_all_anim_ibufs(struct Scene *scene, int timeline_frame); /** * A debug and development function which checks whether sequences have unique UUIDs. -- cgit v1.2.3