Commit Graph
57 Commits
Author SHA1 Message Date
itsmattkc e4e797c901 proxy: cleaned up, re-use the render cache's disk save system for proxies, multithreaded compression 2020-05-04 00:29:26 +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 afc9cff301 exporter: fixed segfault when cancelling introduced by multithreaded color space conversion 2020-05-01 00:36:37 +10:00
itsmattkc aecfa842c3 nodes: moved hashing to nodes so they can override behavior if they wish 2020-04-30 01:56:08 +10:00
itsmattkc 53ae25a7cb nodes: optimize node graph changes by only updating from inputs that changed
A huge optimization that ensures only the parts of a node graph that have
changed get pushed to the renderer. For thread-safety, the node graph is
copied elsewhere so that users can make changes asynchronously and the graph
can update when its threads are ready. Up until now, if an input value changed,
every node's values would be re-copied, or worse, if a connection was changed,
the entire graph would be recopied. This has been negligible in testing since
we've been largely testing with small graphs, but for massive projects, it's
important that this be as optimized as possible.
2020-04-26 04:16:15 +10:00
itsmattkc 61e3641bcc export: fixed bug where null frames never got signalled and hung exporting 2020-04-23 03:02:04 +10:00
itsmattkc 361a986b79 renderer: added path for generating resized frames from textures 2020-04-22 22:58:00 +10:00
itsmattkc c9e797abdf various: conformed frame usages to respect stride 2020-04-22 15:54:47 +10:00
itsmattkc 38fcad6a3f cache: fixed signalling issue where changing default input didn't update the cache 2020-04-21 23:48:26 +10:00
itsmattkc 0c3ce03348 renderer: use a dedicated decoder per thread 2020-04-11 13:18:31 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc 6f0d72c05d renderer: switched audio rendering over to planar buffers
While planar audio cannot be used for playback, it's much easier for processing.
This should lead to cleaner and easier to write code in the future.
2020-03-31 18:01:20 +11:00
itsmattkc 16b072fa98 various: allow users to override the start and end index of image sequences
Also includes various fixes to footage property setting/signalling.
2020-03-09 19:58:42 +11:00
itsmattkc 163ad76456 renderer: rewrote frame compression algorithm
This function was noticeably lagging the main thread while caching. The
cause was OpenEXR's internal thread pool competing with our main
thread. Since we have our own system of worker threads, its thread pool
was unnecessary for caching, however for normal playback it was a useful
optimization. Unfortunately OIIO (which we were using to save EXRs)
didn't provide quite enough control over OpenEXR's threading behavior
(only providing control for over the global thread pool and not on
a per-image basis), so for caching we've switched to using OpenEXR
directly. This has noticeably sped up the main thread while causing no
noticeable slowdown to the caching process.
2020-02-29 01:00:17 +11:00
itsmattkc 15ac7f0e9d renderer: removed old signal that isn't used anymore 2020-02-28 15:49:02 +11:00
itsmattkc 02ce48d0c6 various: pixel optimizations
Several things are accomplished in this commit, including:

- Use OIIO instead of our own functions for pixel format conversions
  (cleaner code/less for us to maintain)

- Fold all PixelService functions into the PixelFormat class
  (cleaner code)

- Moved OpenGL pixel definitions to OpenGL classes and out of the
  global classes.

- Add support for RGB buffers as well as RGBA (optimization)
2020-02-27 13:54:38 +11:00
itsmattkc 78daf9e28a exporter: updated exporter to function with new render system 2020-02-25 20:03:15 +11:00
itsmattkc faffbb0f38 renderer: re-use already created textures if the images are known not to change 2020-02-25 14:57:49 +11:00
itsmattkc be6fbfecdb videorenderworker: fixed improper QString::arg() usage 2020-02-20 19:44:48 +11:00
itsmattkc 2145efa2a0 decoder/renderer: use memory cache and single decoder to optimize frames for
cycles
2020-02-20 15:32:12 +11:00
itsmattkc 71048f40a8 ffmpegdecoder: removed all old code to clean up 2020-02-20 02:22:59 +11:00
itsmattkc 03bdf01357 decoder/renderer: no longer index automatically as part of the retrieve
functions

Indexing is a lengthy process and had a high chance of getting RenderWorkers
stuck doing it rather than being responsive to cache requests. This commit
introduces a system where workers never index media, but instead signal that
media is not ready to their RenderBackends which ensure that the media gets
indexed and re-queues the affected frames when those indexes are ready.
2020-02-19 11:44:29 +11:00
itsmattkc 21affd4e58 renderers: add early functions for cancelling long render processes 2020-02-17 02:15:28 +11:00
itsmattkc b0e7ae34ba videorenderworker: improve download code 2020-02-14 14:51:40 +11:00
itsmattkc 8b0c7edfec OIIO: added support for OIIO 1.x
OIIO 2.x uses std::unique_ptr while 1.x uses raw pointers. Olive can now handle
both, manually destroying the raw pointers when necessary if running on OIIO
1.x.
2020-01-26 11:33:45 +11:00
itsmattkc 3f85ce8a7a diskmanager: clearing disk cache at runtime will correctly signal renderers
Clearing the disk cache in the preferences will correctly communicate to
renderers that those frames are now deleted.
2020-01-25 12:18:46 +11:00
itsmattkc fdbaa75dff renderer: allow parameters to be changed mid-session 2020-01-22 14:05:37 +11:00
itsmattkc 4697b98980 fixed gcc compile issues 2020-01-19 20:39:48 +11:00
itsmattkc 1101b58ee8 allow setting of pixel format/ocio method/sample format in preferences
Implementation isn't perfect yet, viewer/renderer doesn't update yet when
the preference is changed so a sequence needs to be re-opened for the change to
take effect.
2020-01-18 03:37:36 +11:00
itsmattkc ea42ca36f5 don't segregate disk cached frames by sequence
Allows disk cached frames to be re-used in any context if their hashes are
perfect matches.
2020-01-09 23:36:53 +11:00
itsmattkc b8aabb7e01 updated exporter to work with new frame flow 2020-01-08 02:27:47 +11:00
itsmattkc d3ed7f9863 hash the transition's progress
Since the transition progress directly affects the resulting image, it's
important to include it in the frame hash.
2020-01-06 17:25:38 +11:00
itsmattkc 464dfb9be0 fixed audio renderer with new speed system 2020-01-06 16:16:36 +11:00
itsmattkc dae09abf45 use speed value instead of media out value
This functions more or less identically to using a media out value, but the
desired speed is preserved through block length changes, even if the block's
length is reduced to zero (i.e. no rounding errors).
2020-01-06 15:21:27 +11:00
itsmattkc 55135114b9 fixed that would erroneously pass a zero integer instead of null value 2020-01-03 18:19:01 +11:00
itsmattkc ef91f81e0f implemented cursors in the timeline
Note: this does not use the cursor SVGs in app/ui/cursors since I was never
really satisfied with them. They're kept for posterity for the time being.
2020-01-03 17:58:07 +11:00
itsmattkc 31af04fc6c minor render pipeline improvements
Simple flow improvements of the rendering pipeline for efficiency and
reliability.
2020-01-02 06:01:23 +11:00
itsmattkc e8fddc2d5b improved renderer reliability
The renderer backend can now distinguish between jobs. Previously if two jobs
of the same frame were started (which is legal if the user made a change while
frames were still being rendered), an earlier job in some situations could
finish AFTER a later job, and the backend would have no way of distinguishing
between them. This meant a frame could be erroneously set to an old value
rather than the newest. This commit introduces job identification so that old
jobs are automatically discarded.
2020-01-02 03:21:38 +11:00
itsmattkc 61c60e00d6 various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
2019-12-26 19:00:08 +11:00
itsmattkc 46855adea7 use a system of deferred maps to keep track of frames that don't need to be rendered twice
Mostly used for exporting to ensure all frames get accounted for when being
sent from the renderer to the exporter through signals/slots.
2019-12-22 03:03:08 +11:00
itsmattkc 377e2316be completed color management implementation
This commit adds the background functionality of the render cache invalidating
whenever a footage's color space is changed. This includes when the project's
configuration is changed as well.
2019-12-16 16:46:15 +11:00
itsmattkc ecfaa7b79d fixed bug where Node::InputTimeAdjustment isn't honored in footage retrieval
This bug broke frame retrieval from the decoder when the clip in point was
trimmed. This commit fixes it.
2019-12-14 23:17:21 +11:00
itsmattkc 26b3993b9d made vast improvements to rendering engine and node structure
This was many changes that were largely fundamentally related. They included:
- More const modifiers to enforce read only node graphs
- Support for fragment and vertex shaders from the nodes
- Support for node code loaded externally (embedded into the binary)
- Fixed issue preventing two textures from being used in a shader
- Removed several unused functions and cleaned up code
- Fixed video media node misreading its matrix input
2019-12-09 23:50:52 +11:00
itsmattkc f6064b40df hold worker busy state in renderbackend rather than in renderworker
Workers run in different threads and the backends can poll whether the worker
is currently busy or not. However the previous iteration has the worker (and an
atomic int) provide the busy state which could easily desync with the main
thread (since all workers run in different threads). By holding the busy states
in the main thread, the main thread will always be able to poll the busy state
accurately.
2019-12-06 19:38:57 +11:00
itsmattkc 5227e10f39 render one frame per thread for increased parallelism
If the nodes are now stateless, there's nothing stopping the renderer from
rendering multiple frames at once. Earlier since the nodes held some of their
input/output data (and that data could change per frame), it was not possible
to render multiple frames at once without conflicts. Now that the node state is
held in render threads, they can do whatever they want at any time.
2019-12-06 15:37:31 +11:00
itsmattkc 33f73e0e90 reimplemented color management and alpha association in new renderer system
Color management is now as functional as it was before.
2019-12-06 13:33:53 +11:00
itsmattkc d25dda5275 removed all dependence on NodeOutputs
If Nodes only have the one output, we don't need to do so much differentiation
between them. Previous iteration used outputs as like a distinct function
within a Node (e.g. length output would return one result, buffer output would
produce a different result - each run different code to produce their results).
Now in this iteration, it's more accurate to say a Node is just one function
(which seems more appropriate for a node system anyway).
2019-12-06 00:23:26 +11:00
itsmattkc f424d8b44e rewrote renderers where necessary for new node structure
Largely conforming renderers to new NodeValue system. Code seems a lot cleaner
this way which is a nice advantage. Likely non-functional as this won't
compile just yet and still needs probably another day or two of testing to get
it back to where it was before.
2019-12-05 03:53:52 +11:00
itsmattkc 88c3bd44a5 rewrote node data types as or flags
The data types can now be or'd to match broader data types.
2019-12-04 20:26:43 +11:00
itsmattkc 092d76f41a disambiguated whether NodeParam::parent() would return a Node* or a QObject*
Old code assumes that a NodeParam's parent will always be a Node. The function
has been separated off and tweaked in the event that this is not the case.
2019-11-30 23:58:56 +11:00