itsmattkc
efd90d5c8f
renderer: use shared backend when caching
...
I think there was an earlier commit with a similar name but turns out
I'd only done foundational work in that commit and never actually
properly set it up. Of course once I did, there were several issues that
needed fixing to make it work correctly, but now it works as expected.
Heavily optimizes larger projects by allowing cache jobs to only copy
what has changed.
2020-07-10 18:39:47 +10:00
itsmattkc
36dd06d2dc
viewer: set video and audio caches to children of the viewer
...
Ensures their thread gets changed along with the viewer. The project
gets loaded/created in a background thread so the GUI can remain
responsive, and is then moved to the main thread for intended event
handling. However if the caches aren't parented, the hierarchy breaks
and the caches remain in a thread whose event loop is quickly destroyed.
Now that they're parented, events can be properly queued on them once
again.
2020-07-10 18:34:16 +10:00
itsmattkc
0f9d409fb0
code: removed unused function declaration
2020-07-10 03:37:29 +10:00
itsmattkc
919314cce8
renderer: improve thread safety
...
Since we share render backends between the viewer and cache tasks now, we
should ensure the render backend is thread safe.
2020-07-07 13:16:25 +10:00
itsmattkc
a45f514f68
renderer: share render backend for auto-cache tasks
...
Since auto-cache events start and stop fairly frequently (and are somewhat
heavy to create/destroy), we can save a lot of cycles over time by sharing
the same backend between them all.
2020-07-06 14:22:17 +10:00
itsmattkc
a94caa5737
export: fixed bug that broke audio on export
2020-06-19 20:25:49 +10:00
itsmattkc
65ccac1dfe
renderer: fixed bug that would render frames even after hash matching
...
Also enables the -Wshadow GCC warning to warn against the code bug that
caused this issue (and has caused other issues like it in the past).
2020-06-19 20:25:05 +10:00
itsmattkc
b2a3cede2c
renderer: re-use the same opengl instance for all background rendering
...
Previously the OpenGL instance was tied to each render/cache task,
creating and destroying it each time one started and stopped. This was
completely unnecessary since the instance holds no state and can be
shared by all of the render tasks without having to expensively start
a new one.
2020-06-19 17:06:14 +10:00
itsmattkc
c3c26a8e24
cache: use openexr directly
...
OIIO lacks fidelity over OpenEXR's threading. Using it directly gives us
a little more control.
2020-06-17 17:49:54 +10:00
itsmattkc
2261f1147d
renderer: catch failure to load pre-cached frame
2020-06-17 17:48:41 +10:00
itsmattkc
a871c5081b
nodeparamtable: bare bones table view for node inputs
2020-06-17 17:48:07 +10:00
itsmattkc
cbbf1c9149
framehashcache: use correct linesize when saving EXR
...
Fixes stride issues on non-standard frame sizes.
2020-06-16 15:38:23 +10:00
itsmattkc
66b63535a3
renderer: null check before hashing
...
Fixes segfault.
2020-06-16 15:16:52 +10:00
itsmattkc
f70f266ca0
render: queue audio alongside video
...
Previously, audio was all queued first and would therefore all have to
finish before any video frames could start caching. No longer! Now they're
queued side by side so users won't have to wait for audio to finish before
their cached frames come in.
2020-06-16 03:49:12 +10:00
itsmattkc
3a4e13a04f
Merge branch 'master' of https://github.com/olive-editor/olive.git
2020-06-16 03:10:19 +10:00
itsmattkc
2e3072623a
renderer: use qvectors instead of qlists
...
Should be much more efficient for large-scale projects.
2020-06-16 02:45:16 +10:00
itsmattkc
49cec970f2
Merge pull request #1165 from sobotka/ocio-fixes
...
Hopefully OCIO fixes
2020-06-14 03:59:28 +10:00
Troy James Sobotka
7218209e6e
Update config.ocio
...
Fix mistake in the allocation variables that
mangled up the transforms.
2020-06-12 12:02:31 -07:00
itsmattkc
5c5f09a20c
renderer: added generate job
...
For nodes that produce an image on the CPU before sending it to the GPU.
2020-06-13 03:01:23 +10:00
itsmattkc
0c9435c94d
frame: implemented set pixel function
...
Counterpart to Frame::GetPixel()
2020-06-13 03:00:41 +10:00
itsmattkc
af5097bf5f
nodes: revert shader ID to string
...
Much easier to manage this way and fixes a compile issue on several
platforms.
2020-06-12 16:02:29 +10:00
itsmattkc
23365074f0
samplebuffer: fixed segfault when changing speed
2020-06-12 14:53:27 +10:00
itsmattkc
955d4ce910
opengl: clear ping-pong texture before blitting to it
2020-06-12 03:44:43 +10:00
itsmattkc
e547d5b116
audioparams: removed debug message
...
Not really necessary now. Specific situations can always print debug info
if the params are invalid.
2020-06-12 03:32:27 +10:00
itsmattkc
e2e8a6859c
renderer: updated audio to work with minor node overhaul
2020-06-12 03:28:43 +10:00
itsmattkc
bad60fc5f0
audioplaybackcache: no-op if params are invalid
2020-06-12 03:26:34 +10:00
itsmattkc
dd7af0e6bd
nodes: minor overhaul to functionality
...
The nodes now have more control over how their accelerated shaders/sample
functions are run, as well as how items are popped off the value tables.
This allows for various optimizations that we didn't have access to before.
2020-06-12 00:54:15 +10:00
itsmattkc
663cf4a020
pixelformat: added convenience functions for determining the format equivalent with and without an alpha channel
2020-06-11 21:27:42 +10:00
itsmattkc
ccf5d4cece
audiovisualwaveform: detect if the start index exceeds the buffer sample count
...
Fixes segfault.
2020-06-11 21:24:50 +10:00
itsmattkc
a9a13c4b0c
framehashcache: remove code for saving integer-based frames to cache
...
Since we don't allow non-float cached frames now, there's no need to have
this code complicating the codebase.
2020-06-10 14:12:26 +10:00
itsmattkc
71ec148e76
renderer: moved all shader code into one solidified function
...
Makes texture-based optimizations easier when they're all in one place.
2020-06-10 01:54:02 +10:00
itsmattkc
0f301cfdcc
manageddisplaywidget: show colorspaces as well as DVL
2020-06-09 13:53:20 +10:00
itsmattkc
e10b1462ff
renderbackend: moved bulk of hashing code to static function so more code has access to it
2020-06-09 02:36:11 +10:00
itsmattkc
2fc1ccebf7
openglproxy: implemented extra function for loading pre-cached frames into textures
2020-06-09 02:35:41 +10:00
itsmattkc
52ca18d5e1
viewer: moved cached frame loading code so that more classes have access to it
2020-06-09 02:35:13 +10:00
itsmattkc
9095dfa463
project: replaced proxy with pre-cache
...
Removed proxy task and replaced with a true honest-to-god pre-cache for
footage. This footage is pre-cached to a sequence and therefore 100% ready
for use in it once the task is done.
2020-06-08 23:17:51 +10:00
itsmattkc
50b4c1e456
sequence: rather than a static divider in config, default to a heuristically generated one
2020-06-08 15:18:01 +10:00
itsmattkc
430561e2ac
sequence: made divider a sequence parameter rather than a viewer parameter
...
Doing this makes the preview resolution an explicit project setting rather
than a temporary UI setting. This will allow more consistency when caching.
2020-06-08 14:41:35 +10:00
itsmattkc
5055c136b6
renderer: clear graph update queue when disconnecting a viewer
2020-06-06 01:02:03 +10:00
itsmattkc
bad039e7a9
playbackcache: don't invalidate if the cache has no length
...
Prevents zero-length invalidations.
2020-06-05 17:21:46 +10:00
itsmattkc
4a8d557c59
various: removed unused debug lines
2020-06-05 16:11:49 +10:00
itsmattkc
33e3225c89
audioplaybackcache: use std::rand instead of QRandomGenerator
...
Improves support for versions of Qt < 5.10.
2020-06-05 15:47:00 +10:00
itsmattkc
7609754103
playbackcache: more intelligent job matching
...
Ensures audio ranges can be anticipated and accurately ignored if they're
old or acknowledged if they're current.
2020-06-05 15:23:16 +10:00
itsmattkc
de3288893d
renderer: move waveform generation into worker and mutex the waveform
...
Addresses scheduling issues where a backend might be closed (or even
destroyed) before it processes a waveform signal from a worker. Requires
extra multithreading code.
2020-06-05 15:18:14 +10:00
itsmattkc
5eeef76b62
waveform: shift track waveform alongside cache
2020-06-04 23:32:50 +10:00
itsmattkc
0e87762afa
waveforms: moved waveform to track rather than block
...
This is a much more robust and thread-safe system of storing the waveforms.
2020-06-04 18:03:21 +10:00
itsmattkc
9ff9817b95
cache: use render job times to synchronize cache
...
Ensure old inaccurate jobs are never prioritized over current jobs.
2020-06-04 16:48:23 +10:00
itsmattkc
cc34f0e251
viewer: ensure view is updated if the cache is shifted
...
Also moves "ForceUpdate" to a queued connection so it occurs as soon as
the rest of the processing is done. This ensures the viewer isn't updated
too early.
2020-06-03 03:49:39 +10:00
itsmattkc
e30d278327
playbackcache: made thread-safe
...
Since this class is regularly accessed by multiple threads, it makes the
most sense to make all of its functions thread-safe.
2020-06-03 03:38:28 +10:00
itsmattkc
11bfe61208
cache: began base implementation of "shifting" the cache
...
Should be a fairly important optimization to make.
2020-06-02 01:38:12 +10:00