Age | Commit message (Collapse) | Author |
|
Instead of duplicating logic many times.
|
|
Patch implements better way to control playback speed than it is
possible to do with speed effect. Speed factor property can be set in
Time panel.
There are 2 layers of control:
Option to retime movie to match scene FPS rate.
Custom speed factor to control playback rate.
Since playback rate is strip property, it is now possible to manipulate
strip as normal one even if it is retimed.
To facilitate manipulation, some functions need to consider speed factor
and apply necessary corrections to strip offset or strip start. These
corrections may need to be float numbers, so start and offsets must be
float as well.
Sound strips now use speed factor instead of pitch. This means, that
strips will change length to match usable length. In addition, it is
possible to group movie and sound strip and change speed of meta strip.
|
|
This patch makes it possible to manipulate strips without need to use
update functions to recalculate effect and meta strips.
Prior to this change function `SEQ_time_update_sequence` had to be used
to update mainly effects and meta strips. This was implemented in a way
that relied on sorted list of strips, which can't always be done and in
rare cases this approach failed.
In case of meta strips, `seqbase` had to be passed and compared with
"active" one to determine whether meta strip should be updated or not.
This is especially weak system that is prone to bugs when functions are
used by python API functions.
Finally, other strip types had startdisp` and `enddisp` fields updated
by this function and a lot of code relied on these fields even if strip
start, length and offsets are available. This is completely
unnecessary.
Implemented changes:
All effects and meta strips are updated when strip handles are moved or
strip is translated, without need to call any update function.
Function `SEQ_time_update_sequence` has been split to
`SEQ_time_update_meta_strip_range` and
`seq_time_update_effects_strip_range`. These functions should be only
used within sequencer module code. Meta update is used for versioning,
which is only reason for it not being declared internally.
Sequence fields `startdisp` and `enddisp` are now only used for
effects to store strip start and end points. These fields should be
used only internally within sequencer module code.
Use function `SEQ_time_*_handle_frame_get` to get strip start and end
points.
To update effects and meta strips with reasonable performance, cache
for "parent" meta strip and attached effects is added to
`SequenceLookup` cache, so it shares invalidation mechanisms.
All caches are populated during single iteration.
There should be no functional changes.
Differential Revision: https://developer.blender.org/D14990
|
|
To clarify term still frame: This is portion of strip that displays
static image. This area can exist before or after strip movie content.
Still frames were implemented as strip property, but this was never
displayed in panel. Only way to set still frames was to drag strip
handle with mouse or using python API. This would set either
`seq->*still` or `seq->*ofs` where * stands for `start` or `end`.
When strip had offset, it can't have still frames and vice versa, but
this had to be enforced in RNA functions and everywhere in code where
these fields are set directly. Strip can not have negative offset or
negative number of still frames.
This is not very practical approach and still frames can be simply
implemented as applying negative offset. Merging these offsets would
simplify offset calculations for example in D14962 and could make it
easier to also deprecate usage `seq->*disp` and necessity to call
update functions to recalculate strip boundaries.
For users only functional change is ability to set negative strip offset
using property in side panel.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D14976
|
|
Last step of proxy building caused crash due to thread race contition
when acessing ed->seqbase.
Looking at code, it seems that calling IMB_close_anim_proxies on
original strips is unnecessary so this code was removed to resolve this
issue.
Locking seqbase data may be possible, but it's not very practical as
many functions access this data on demand which can easily cause
program to freeze.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D14210
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
This change applies only for automatic proxy building, when strip
is added to timeline. Manual building process is not affected.
Don't build proxy file if movie is already fast enough to seek.
To determine seek performance, check if whole GOP can be decoded
in 100 milliseconds.
To consider some variation in GOP size, large number of packets are
read, assuming that each packet will produce 1 frame. While this is not
technically correct, it does give quite accurate estimate of maximum GOP
size.
This test will ensure consistent performance on wide array of machines.
Check should be done in order of few milliseconds.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11671
|
|
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
|
|
- Move functions that handle animation to own file - `animation.c`
- Refactor `SEQ_offset_animdata` and `SEQ_free_animdata` functions
- Add function `SEQ_fcurves_by_strip_get` to provide more granular
and explicit way for operators to handle animation
- Remove function `SEQ_dupe_animdata`, do curve duplication explicitly
in operator code, which makes more sense to do. Further this function
was also used for renaming strips which makes no sense.
- Refactor usage of function `SEQ_free_animdata` and remove XXX comment.
Now this functiuon is no longer called when `Sequence` data is freed
implicitly, it is done explicitly in high level function
`SEQ_edit_remove_flagged_sequences`
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D13852
|
|
If strip is removed while proxy is built, this causes crash when
building is finished. This happens because proxy anims are freed in
`SEQ_proxy_rebuild_finish()`.
Iterate over available strips and check if original strip still exists
by comparing `SessionUUID`.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D13408
|
|
We now use a for_each function with callback to iterate through all sequences in the scene.
This has the benefit that we now only loop over the sequences in the scene once.
Before we would loop over them twice and allocate memory to store temporary data.
The allocation of temporary data lead to unintentional memory leaks if the code used returns to exit out of the iteration loop.
The new for_each callback method doesn't allocate any temporary data and only iterates though all sequences once.
Reviewed By: Richard Antalik, Bastien Montagne
Differential Revision: http://developer.blender.org/D12278
|
|
GOP size and quality are adjusted for h264 codec.
These new values are based on result of benchmark on 9 random files:
https://docs.google.com/spreadsheets/d/1nOyUGjoVWUyhQ2y2lAd8VtFfyaY1wQNGj1krCCNbk7Y/edit?usp=sharing
Reducing quality to 50 reduces proxy filesize by about 2x on average
and has no significant impact on decoding performance.
Increasing GOP size from 2 to 10 also reduces proxy filesize 2x-3x
while scrubbing is only about 8% slower. It is still around 100FPS
with 1920x1080 media.
This is unfortunately about 50% slower than MJPEG, but this can be
improved with `fastdecode` tune applied to libx264 encoder
Quite surprisingly h264 codec presets had little influence on proxy
building performance as well as proxy filesize. So far it looks that
FFmpeg does initialize encoder in different way then Blender.
This applies mot only for presets but for tune and profile libx264
setting.
Once this issue is resolved, performance of proxies may be optimized
further.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D10897
|
|
When video file for strip doesn't exist, building crashes on NULL
dereference.
This check was removed by 04e1feb83051.
|
|
Broken by 04e1feb83051
Caused by accidentaly moving `SEQ_proxy_rebuild_finish` outside of
`if (nseq->type == SEQ_TYPE_MOVIE)` condition in function
`SEQ_proxy_rebuild_context()`.
|
|
Build proxies automatically when added to sequencer timeline and when
switching preview size.
This behavior can be disabled in user preferences.
Reviewed By: sergey, fsiddi
Differential Revision: https://developer.blender.org/D10363
|
|
- Remove Full Render size from VSE preview size. Use just 100% instead.
- Add Use Proxies checkbox to control whether proxies are used globally
- Move preview size to top so it is most prominent
- Set default to 100% preview size and use proxies
Reviewed By: sergey, fsiddi
Differential Revision: https://developer.blender.org/D10362
|
|
|
|
API functions get SEQ_ prefix.
Intern functions get seq_ prefix
Functions also have appropriate category included in name.
|
|
Move most functions into separate files.
File sequencer.c is reserved for alloc, free and duplicating functions.
There should be no functional changes.
|
|
|
|
Variables renaned:
- cfra -> timeline_frame
- nr -> frame index
- cfra_over -> overlap_frame
Function seq_give_stripelem_index was renamed to seq_give_frame_index.
|
|
Replace BKE_sequencer wirh SEQ_render or SEQ_proxy prefixes.
In cases where function is very generic, only SEQ prefix is used.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9439
|
|
Move functions closely related to rendering images and proxies into
render.c and proxy.c files. render.h and proxy.h are created for
functions used internally.
There should be no functional changes.
|