Commit Graph
101 Commits
Author SHA1 Message Date
itsmattkc 4e3cafe578 precachetask: removed unnecessary hash setting
Pre-cache doesn't need to set a memory cache since its only purpose is to
write to the disk cache.
2020-08-10 02:08:58 +10:00
itsmattkc edeeed49ba various: enabled config saving 2020-08-08 02:44:39 +10:00
itsmattkc df14c2aaa7 cache: better implemented changing disk cache folders
Not complete yet, but getting there.
2020-08-07 02:31:46 +10:00
itsmattkc a34d696138 various: fixed issues on some compilers 2020-08-06 01:50:49 +10:00
itsmattkc d5dce29b22 cache: merged cachetask and footagecache into one precache task
Since the actual auto-cache now happens elsewhere, this cleans up a lot of
dead code.
2020-08-05 23:45:18 +10:00
itsmattkc c8def73b95 cache: mild auto-cache overhaul
Shifted from CacheTask to functionality built into RenderBackend. It was
a lot easier to control behavior this way without having to juggle a ton
of threads and race conditions.

Could likely be multithreaded further.
2020-08-05 02:19:04 +10:00
itsmattkc dca4c6d960 export: allow rgb32f and rgba32f to pass through ocio without conversion
Minor optimization.
2020-07-24 14:45:55 +10:00
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 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 0280ade20d project: improved main window layout loading
There were a lot of issues that arose from trying to make GUI changes
from another thread (even though we ran those functions in the right
thread). Now we store layout information until the end of the load and
make the changes then. This works much better from both a business logic
and user experience perspective.

Also prevents multiple sequences from taking focus during load and
starting a render job.
2020-06-19 02:23:06 +10:00
itsmattkc a818e17c55 export: made progress on headless export
Still incomplete and unusable, but less so than before.
2020-06-17 18:06:50 +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 6a4f3f613c rendertask: remove sorting code and calculate duplicate hashes while retrieving
These are two changes that speed up when frames start getting rendered
and processed (particularly for larger scale projects):

* Sorting of time beforehand was done to optimize decoding but is actually
unnecessary since the frames are already sequential when they're retrieved
from the range. As long as we maintain that order, no sorting is required.
This speeds up caching IMMENSELY.

* Evaluate hashes concurrently while retrieving frames. Before, this was
done before any rendering and could therefore delay rendering by several
seconds. Doing them concurrently means frames start rendering almost
immediately and further hashes can be analyzed while we wait for frames to
finish rendering.
2020-06-16 03:07:53 +10:00
itsmattkc f2ab9839e5 project: save to temp folder first and then overwrite actual file
With this commit, we save to a temporary file first and then cat the end
run a copy to overwrite the source file. If the save somehow fails or the
program crashes mid-save, this will prevent the user's project file from
getting corrupted.
2020-06-15 15:41:24 +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 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 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 b9de8ea035 rendertask: include audio in progress signal 2020-06-06 18:24:28 +10:00
itsmattkc 242994c736 rendertask: initialize nb_frames
The code path doesn't ever use this value uninitialized, but GCC is unaware
and still presents a warning.
2020-06-05 15:53:07 +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 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 017271b909 cachetask: write silence if no samples are returned
Fixes segfault trying to access a null sample buffer.
2020-06-01 04:45:45 +10:00
itsmattkc c1ed84b90e viewer: receive audio invalidation signal
Invalidates and runs cache task correctly even if there are no video
nodes connected.
2020-05-30 02:50:30 +10:00
itsmattkc 4b8ac6a414 rendertask: ensure frames get sorted in chronological order
Previous commit broke the sorting system. This commit restores it.
2020-05-30 02:03:13 +10:00
itsmattkc 6d16ac9f50 rendertask: optimized hash matching and grouping
Significantly improves speed of matching already cached frames.
2020-05-29 16:37:58 +10:00
itsmattkc 6638edb761 rendertask: ensure backend nodes are copied the main thread
May not be a permanent solution, but should prevents race conditions for
the time being.
2020-05-29 15:25:18 +10:00
itsmattkc a0dec75f2b renderer: ensure offscreen surface is created in main thread
Fixes render crash on some platforms.
2020-05-27 04:05:01 +10:00
itsmattkc 14ac1ada6e various: adding files missing in last commit
Oddly some files didn't commit previously. This commit adds those.
2020-05-27 03:24:37 +10:00
itsmattkc 3e3cacbc85 various: update Qt code deprecated in 5.15
- Replaces QLinkedList with std::list as recommended by Qt docs.
- Replaces QWheelEvent::delta() with QWheelEvent::angleDelta(). This
  should also benefit trackpad behavior.
2020-05-27 02:54:05 +10:00
itsmattkc 0c7b3e1761 cache: streamlined audio into cache task
Since we always cache audio, it makes sense to lump it into the same auto-cache
task we use for everything else.
2020-05-27 00:09:09 +10:00
itsmattkc c907114b17 renderer: optimizing and fixing code paths
Re-introducing some old concepts for the new structure.
2020-05-26 22:40:54 +10:00
itsmattkc 4c62dd3708 rendertask: automatically re-match existing hashes
Major optimization for frames that have already been cached.
2020-05-24 18:13:18 +10:00
itsmattkc 4f21a930dd tasks: added elapsed/remaining time displays for all tasks 2020-05-24 18:10:08 +10:00
itsmattkc 89ae6e026f cache: reimplemented auto-caching
Implemented a smarter auto-cache that's context sensitive. Caching will
automatically pause when playback begins or values are being changed and resume
when inactive.
2020-05-24 15:20:35 +10:00
itsmattkc 34fade9d81 cache: attempt to automatically re-match hashes on invalidate
This code is slow and unoptimized. Will require some more work.
2020-05-21 16:49:02 +10:00
itsmattkc d5766489e4 export: fixed audio exporting with new renderer system 2020-05-21 02:18:52 +10:00
itsmattkc 87e7564222 cache: heavily reworked exporting for new system
Also cleans up cache in general and moves it to the Task infrastructure.
2020-05-19 23:35:17 +10:00
itsmattkc cb383d760b tasks now emit floats rather than integers
Simplifies code for tasks.
2020-05-19 02:44:38 +10:00
itsmattkc b9cd83eff1 task: massively simplified task system
Made various changes and fixes to the task system:

- Tasks are built around QtConcurrent rather than QThread. Reduces
  code complexity significantly.
- Task error reporting is now streamlined in both TaskManager and
  TaskDialog.
- Moved ProjectImport/Save/LoadManager to the app/task folder
2020-05-19 02:44:32 +10:00
itsmattkc 558773538d cache: fixed audio with new system 2020-05-18 17:16:28 +10:00
itsmattkc 814bbe8c22 fixed various segfaults in decoder and renderer 2020-05-18 02:40:58 +10:00
itsmattkc 53a2956350 cache: added cache task that can be manually invoked 2020-05-15 18:36:02 +10:00
itsmattkc 6754feb2f6 proxy: began work towards creating proxy from video 2020-05-03 17:09:52 +10:00
itsmattkc e4c3b6bf7b renderer/decoder: simplified audio PCM transcode
Turned the two-step PCM transcode into one step and simplified/removed much of
the unnecessary infrastructure that supported it. This makes the code cleaner
and generally improves the code paths.
2020-05-03 16:07:10 +10:00
itsmattkc 2eb03bf386 various: removed constructor.h include 2020-04-14 00:53:25 +10:00
itsmattkc f08734d18e index/confirm tasks: these tasks no longer need to open the decoder to perform said tasks 2020-04-11 17:36:16 +10:00