Commit Graph
62 Commits
Author SHA1 Message Date
itsmattkc 526f07ba08 implemented demonstrative dip to black transition 2019-12-12 19:00:49 +11:00
itsmattkc 76c0399b75 implemented base transition support
While very much incomplete, transitions can now be created and will render
correctly.
2019-12-12 15:21:39 +11:00
itsmattkc 7b92b21df2 reimplemented "add" tool
Tool for adding empty/non-media clips in the timeline. Also basis of the
transition tool.
2019-12-11 19:54:53 +11:00
itsmattkc da98793a6b fixed segfault if pipeline returned an empty texture 2019-12-11 13:54:19 +11:00
itsmattkc 3d3e40d431 minor code cleanup and fixed opengl thread desync issue 2019-12-11 03:20:23 +11:00
itsmattkc f5d66436fa attempt to use fbo clear function 2019-12-10 21:32:21 +11:00
itsmattkc 91c7d8aa4d implemented texture cache for performance
Creating and destroying textures is a slow process, particularly when we can
re-use them throughout most of the render chain. We now keep them stored so
they can be re-used which improves performance substantially.
2019-12-10 14:53:47 +11:00
itsmattkc 6ac33d8dc4 created simple texture cache object ready for implementation into the workers 2019-12-10 13:24:12 +11:00
itsmattkc 1f5ae6f9bd use mutexes to prevent threads from interfering with each other while sharing shaders 2019-12-10 01:45:39 +11:00
itsmattkc 92776b877d implement texture null check flag on shaders
Sets a flag if the texture being sent to the shader is null
2019-12-10 01:20:57 +11:00
itsmattkc c35a6d009d removed unnecessary debug messages 2019-12-10 00:57:28 +11:00
itsmattkc f46b1245c4 reduced the output of some nodes
Some nodes don't need to provide all their inputs merged as outputs.
2019-12-10 00:37:06 +11:00
itsmattkc 3dc563b697 removed double buffered textures
These functions never ended up getting used, and have the potential to become
confusing in implementation.
2019-12-09 23:59:00 +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 927e2252f3 fixed bug where several frames being cached at the same time would lead to most
of them returning blank
2019-12-06 13:32:02 +11:00
itsmattkc b8b9ae878b generalized object render caches so they can be used for any object types 2019-12-06 13:30:57 +11:00
itsmattkc 694f424627 finished conforming renderers to new node structure
Stateless node system is done! Functionality is about equal to the functionality
in master meaning this is ready for merging.
2019-12-06 03:43:24 +11:00
itsmattkc 50f7fac156 fixed signal/slot connections which had been renamed and weren't resolving 2019-12-06 00:43:51 +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
itsmattkc 87394f0c2a conformed renderworkers to new decoder retrieval functions 2019-11-30 02:52:11 +11:00
itsmattkc 45d17810d5 removed old legacy code from openglbackend (had already been commented out) 2019-11-27 09:52:20 +10:00
itsmattkc 955fac1fbb improved documentation note on audiorenderbackend 2019-11-27 09:51:06 +10:00
itsmattkc d5b1768d70 reimplement Q_DISABLE_COPY_MOVE for full compatibility with versions < 5.13
I was under the impression Q_DISABLE_COPY_MOVE was a much older function than
it is. Since we historically target 5.6 and these functions are small
convenience functions, I just implemented them in the actual codebase.
2019-11-24 14:57:57 +09:00
itsmattkc 289cb889ef removed declaration of function removed in previous commit 2019-11-24 02:05:44 +09:00
itsmattkc db739b7fbb removed unused function from renderworker
Code cleanup.
2019-11-24 02:05:07 +09:00
itsmattkc 6a27161e96 set params on workers when a backend's params change
Previous iteration had params attached to the backend and the params couldn't
change without being destroyed and re-instantiated. This is not necessary in
this iteration so doing so only wastes resources.
2019-11-23 22:28:06 +09:00
itsmattkc 44d649903c copy values whenever the cache is invalidated
Since we're now working with a separate proxy copy of the original node graph,
if the user changes a parameter in one of those nodes (triggering an
InvalidateCache signal), the values in our copied graph need to be updated
with these new values too.
2019-11-23 17:06:49 +09:00
itsmattkc 2cfccbfbef copy node graph before rendering
Previous iterations would use mutexes to prevent changing of the graph
mid-render, however several user actions would need to capture these mutexes
causing the main thread to hang until the current render job (frame/range of
samples) was complete. We now copy the nodes necessary as part of the "compile"
process so that the main thread shouldn't need nearly as much blocking while
caching occurs.
2019-11-23 08:53:52 +09:00
itsmattkc 2599c1e8a4 forego memory sample buffer and only write samples that need writing
Rather than writing the entire sequence audio to disk every change, now we
just write the parts we need to write.
2019-11-20 10:32:46 +09:00
itsmattkc 8353b8d745 handle node providing less audio samples than expected for a given time
If the bytes retrieved is less than the bytes we expected for the time period
we're rendering, we fill the remainder with silence. Fixes segfault trying to
copy bytes that aren't actually allocated.
2019-11-19 22:25:04 +09:00
itsmattkc 7385e3dc56 fixes jitters by using signals/slots to pass image buffers around
Updating values rapidly would cause strange jitters as a
byproduct of the viewer trying to update from the renderer while
it was still working. Rather than the viewer trying to access the
the renderer, we now send textures in the initial update signal
to keep everything synchronized.
2019-11-18 02:14:54 +09:00
itsmattkc 8e6c23ffc1 fixed bug that caused some frames to never render indefinitely
Frames should no longer get stuck unrendered.
2019-11-17 17:14:08 +09:00
itsmattkc 51439c2992 removed extraneous debug line 2019-11-17 13:49:23 +09:00
itsmattkc 2f8675f5f9 cleaned up opengl backend
Removed some legacy code (that had been all commented out by now anyway)
2019-11-17 13:48:36 +09:00
itsmattkc 9d154e1909 use different signals when the audio invalidates vs the video
Both audio and video renderers were working off the same invalidation signal
(i.e. changing audio would also trigger a re-render of the video). This is
obviously suboptimal and now they are separate.
2019-11-17 13:44:50 +09:00
itsmattkc 863525c595 remove functions that were moved to the timerange class 2019-11-17 12:31:02 +09:00
itsmattkc 40b3879440 overhauled render classes to support video AND audio
Major refactoring work to try sharing as much code as possible between the
video renderers and audio renderers, as well as make them as
platform-independent as possible.
2019-11-15 13:50:58 +09:00
itsmattkc 9a44e656b5 added simple wave classes
To assist the input/output of PCM data, we use the fairly straight-forward
WAVE format. These classes simplify the input and output of such data.
2019-11-15 13:49:40 +09:00
itsmattkc 7a6dd02e5b furthered development of audio renderers
Mostly reimplementing functions from other workers to produce audio samples
2019-11-11 11:35:01 +09:00
itsmattkc 1206eb73b9 moved frame cache to external class that's easier to pass around 2019-11-06 23:46:44 +11:00
itsmattkc 3b224c7638 multithreaded download and files that probably should have been in the last
commit

For testing the new iteration, the texture cache disk download was written
into the main thread instead of into the separate threads. Now they're back
in separate threads again.

Also I think some of these files probably should have been in the previous
commit.
2019-11-06 09:14:20 +11:00
itsmattkc 6de976c19f worked through new renderer worker annd split it off into gl and non-gl
specific code

The new rendering system is now starting to work as planned, however it is
still not as complete as the iteration before. But this should be a more
robust design moving forward. Work was also done towards splitting off all
OpenGL-specific worker code into a derived class. The hope is to have no
hard dependency on OpenGL and make swapping it out with other backends
straight-forward.
2019-11-05 03:39:56 +11:00
itsmattkc 6021852f18 moved decodercache to base folder for shared usage 2019-11-04 11:42:35 +11:00
itsmattkc 97a4294bb3 refactoring work to improve issues with new rendering pipeline 2019-11-04 11:34:43 +11:00