[Bf-blender-cvs] [eab066cbf2d] master: VSE: Use timecodes by default

Richard Antalik noreply at git.blender.org
Tue Jan 25 17:10:56 CET 2022


Commit: eab066cbf2da1fdb8162d9ed814a9491f9acf02d
Author: Richard Antalik
Date:   Tue Jan 25 17:05:33 2022 +0100
Branches: master
https://developer.blender.org/rBeab066cbf2da1fdb8162d9ed814a9491f9acf02d

VSE: Use timecodes by default

Movies with variable frame rate can cause mismatch of displayed frame
when proxies are used. Since proxies are not used for rendering, this
means, that output may be different than expected. This problem can be
avoided when timecodes are used.

Set used timecode to Record Run. Timecodes are built with proxies at
the same time, therefore if proxies are built and used this will
resolve possible mismatch of output.

Record run is chosen, because it will show frames based on time they
were encoded by encoder and should match behavior as if movie was
played back at normal speed. This change is done only for new strips
in order to not overwrite user defined settings.

Other minor changes:
- When proxies are enabled, size 25% is no longer set by default. It was mostly annoying anyway.
- Silence warning when timecode file is not present. This was introduced in 4adbe31e2fc98f982aed3d97505513750ec348d4.
  Previously use of timecodes was hard-coded in sequencer and this error would spam console if timecodes would be
  enabled by default and proxies would be never built.

ref: T95093

Reviewed By: sergey

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

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

M	source/blender/imbuf/intern/indexer.c
M	source/blender/sequencer/intern/proxy.c
M	source/blender/sequencer/intern/sequencer.c
M	source/blender/sequencer/intern/sequencer.h

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

diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 6cd87e29c9d..7aeee2740c0 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -170,7 +170,6 @@ struct anim_index *IMB_indexer_open(const char *name)
   int i;
 
   if (!fp) {
-    fprintf(stderr, "Couldn't open indexer file: %s\n", name);
     return NULL;
   }
 
diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c
index 2cb2ba13fb5..cc0ea0634a3 100644
--- a/source/blender/sequencer/intern/proxy.c
+++ b/source/blender/sequencer/intern/proxy.c
@@ -601,10 +601,7 @@ void SEQ_proxy_set(struct Sequence *seq, bool value)
   if (value) {
     seq->flag |= SEQ_USE_PROXY;
     if (seq->strip->proxy == NULL) {
-      seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
-      seq->strip->proxy->quality = 50;
-      seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
-      seq->strip->proxy->build_size_flags = SEQ_PROXY_IMAGE_SIZE_25;
+      seq->strip->proxy = seq_strip_proxy_alloc();
     }
   }
   else {
diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c
index f0a45355143..1c7fe927381 100644
--- a/source/blender/sequencer/intern/sequencer.c
+++ b/source/blender/sequencer/intern/sequencer.c
@@ -66,6 +66,15 @@
 /** \name Allocate / Free Functions
  * \{ */
 
+StripProxy *seq_strip_proxy_alloc(void)
+{
+  StripProxy *strip_proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
+  strip_proxy->quality = 50;
+  strip_proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
+  strip_proxy->tc = SEQ_PROXY_TC_RECORD_RUN;
+  return strip_proxy;
+}
+
 static Strip *seq_strip_alloc(int type)
 {
   Strip *strip = MEM_callocN(sizeof(Strip), "strip");
diff --git a/source/blender/sequencer/intern/sequencer.h b/source/blender/sequencer/intern/sequencer.h
index 7d7ecbc8178..2a82f966f02 100644
--- a/source/blender/sequencer/intern/sequencer.h
+++ b/source/blender/sequencer/intern/sequencer.h
@@ -29,12 +29,13 @@ extern "C" {
 
 struct Scene;
 struct Sequence;
-
+struct StripProxy;
 /**
  * Cache must be freed before calling this function
  * since it leaves the seqbase in an invalid state.
  */
 void seq_free_sequence_recurse(struct Scene *scene, struct Sequence *seq, bool do_id_user);
+struct StripProxy *seq_strip_proxy_alloc(void);
 
 #ifdef __cplusplus
 }



More information about the Bf-blender-cvs mailing list