Commit Graph
172 Commits
Author SHA1 Message Date
itsmattkc b697d2faec implemented settings for exporting ONLY video or ONLY audio 2020-01-08 02:59:30 +11:00
itsmattkc b8aabb7e01 updated exporter to work with new frame flow 2020-01-08 02:27:47 +11:00
itsmattkc a616aaa182 correctly affect speed/reversing when shuttling audio 2020-01-07 16:41:30 +11:00
itsmattkc c938055293 fixed exporter connections, some of which have changed in recent commits 2020-01-07 12:42:43 +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 8358d7d221 moved progress calculations from openglworker to transitionblock
These functions are universal transition functions that have use outside of
the OpenGL workers.
2020-01-06 16:35:45 +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 3a8a509f1a clear frame caches and renderers if the viewer node is ever changed
Clears the state if a viewer node is disconnected.
2020-01-03 21:17:20 +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 7f796bd99f revised video renderer's invalidate cache to use ranges rather than discrete
frames

Previously, when the video renderer received a dirty cache signal, it would
proceed to extract all frames from the range and queue them. However, this could
be extremely slow for long ranges since it had to iterate through the entire
range and calculate the individual frames it contained. Now, we use the same
range combining system as audio and automatically calculate the next frame
within the range only when necessary. Essentially the same work, but split up
over time and done only when needed leading to no discernible UI pause when
invalidating cache.
2020-01-03 15:50:43 +11:00
itsmattkc db146b376a implemented core UI caching feedback functionality
Not a perfect implementation yet, but this shows UI feedback on what frames are
cached and which ones aren't.
2020-01-03 05:38:20 +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 f8839e74de ensure texture is not copied in one thread while it's read in another
This seems to cause issues in the rendering pipeline, so this commit never lets
a texture copy and read occur at the same time.
2020-01-02 06:00:21 +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 55ea4a8177 implemented minor audio keyframing optimization
Since updating all input values per sample could be performance costly,
we now only update inputs that are either keyframing or connected to
another node
2019-12-30 20:17:02 +11:00
itsmattkc e6c47b14f4 implemented audio keyframing
This mostly builds on the keyframing we already set up for video, but the
audio renderer will now appropriately updated keyframe inputs per sample in
accordance with keyframe values.
2019-12-30 20:14:45 +11:00
itsmattkc 9272858de2 send list to EmitCachedFrameReady() rather than one rational at a time
Since EmitCachedFrameReady() makes a copy of the texture, we can economize a lot
by re-using the same copied texture for all the times rather than making a
separate copy for each time.
2019-12-27 05:17:18 +11:00
itsmattkc 549427353d updates to video render backend to speed up single frame previews
Allows single frame previews and improves communication with receiving
viewer classes.
2019-12-27 05:11:21 +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 520b8b46fa place timecode conversion functions into a Timecode class rather than an olive namespace
Code cleanup and improvement.
2019-12-26 17:20:58 +11:00
itsmattkc ac9690c5a7 ensure gcc will compile this file without warnings 2019-12-24 16:35:28 +11:00
itsmattkc 62f9e55609 implemented foundational reversed block code
Ensured renderers can handle clips that are reversed.
2019-12-24 16:17:33 +11:00
itsmattkc f0cd480540 finished audio effects support in audio renderer
Working structure implemented in previous commit into the audio renderer is
complete in this commit.
2019-12-24 14:02:07 +11:00
itsmattkc 7ad2eae7a2 implemented volume and pan effects
This commit implements a structure for sample processing and two implemenations
of this structure in volume and pan effects.
2019-12-24 12:34:30 +11:00
itsmattkc 3a7b3ffac6 implemented audio exporting
The encoder was moved to its own thread and will transcode the PCM from the
audio renderer into the chosen codec while the video frames are still
received. The implementation isn't perfect and could use some cleaning up, but
it is functional at the moment.
2019-12-23 01:45:27 +11:00
itsmattkc a8beae64ae general improvements to the renderer backend to help keep rendering consistent and performant 2019-12-22 03:04:34 +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 8514590c83 implement transformation matrix in exporter backend
This was supposed to have been done, but was not.
2019-12-22 02:59:08 +11:00
itsmattkc 4cb6659dbb cleaned up texture and texture reading classes 2019-12-21 21:30:42 +11:00
itsmattkc a8a5e50d3a update opengl exporter to pass encoderptr along to exporter base class 2019-12-21 20:40:09 +11:00
itsmattkc 04d39e27a8 copy texture before signalling it
Sending a texture directly from the texture cache is dangerous since once the
reference is relinquished, it could be picked up and used by another thread.
Copying the texture to a separate one takes a little extra time but lets the
viewer remain in control of that texture.
2019-12-21 20:38:15 +11:00
itsmattkc 57c0b93ba5 updated more classes for the moved decoder code a few commits back 2019-12-21 20:17:30 +11:00
itsmattkc eaedd23c83 set up encoder when setting up the exporter 2019-12-21 20:13:22 +11:00
itsmattkc 355baa893a cleaned opengl texture and framebuffer code
Minor code changes and improvements.
2019-12-21 20:08:20 +11:00
itsmattkc 401de26733 updated other classes for the previous commit's file moving 2019-12-21 20:07:14 +11:00
itsmattkc f93c20819b fixed incorrect algorithm in pixel converter 2019-12-21 20:04:44 +11:00
itsmattkc 8ace197d66 improved backend encapsulation
Various backend improvements are included in this commit, mostly for the
benefit of exporting. These include:
- Moving more non-GL code from OpenGL derivatives into base classes
- An "export mode" that changes the cache behavior of video backends
- Using the Viewer's UUID introduced a few commits ago
- No longer hardcoding the pixel format/render mode in the backend (since
  they'll inevitably differ when exporting vs previewing)
- Improved signalling for frames that are completed
2019-12-20 04:35:31 +11:00
itsmattkc 757aaa21c4 began exporter classes for handling render backends in an exporting context 2019-12-20 04:34:32 +11:00
itsmattkc 7844a2ed72 fixed race condition in appending to a list of exported cache references 2019-12-20 04:33:05 +11:00
itsmattkc 7a7d304268 use uuid for identifying viewers
To aid generating a cache ID, each viewer node needs a UUID. Previous iterations
tried to hash a name and time, but a UUID is a much more efficient way to do
this.
2019-12-20 04:32:17 +11:00
itsmattkc b308f753b3 with Block::set_length_and_* functions, keep the speeds correct
With differently set speeds, these functions would mess with the timing in ways
that would be confusing to the user. Now they act in a much more intuitive way
and also prevent negative media times.
2019-12-19 02:26:30 +11:00
itsmattkc 63086bc18d improved msvc warning compliance 2019-12-19 01:44:49 +11:00
itsmattkc 2c79edeb0f further improved msvc compilability 2019-12-18 23:35:02 +11:00
itsmattkc d1ace48ff9 started audio speed stretching 2019-12-18 22:38:34 +11:00
itsmattkc a0b6bb842d ColorManager is now specific to the Project
OCIO config was set on a per-project basis, but we were using a singleton for
the ColorManager that would break if more than one project was ever open.
Now the ColorManager belongs to the Project and is always accessed through the
Project.
2019-12-17 15:18:07 +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 4297cd92d6 fixed issue with accelerated node iterations
Uniform values cannot be set if the shader is not bound, and calling Blit would
release the shader making subsequent iteration count updates not work. This
commit makes sure the shader is bound before trying to do so.
2019-12-15 02:37:38 +11:00
itsmattkc 2067408273 use GL_CLAMP_TO_EDGE instead of GL_CLAMP_TO_BORDER
Ultimately it would be nice if nodes could configure this themselves, but
CLAMP_TO_BORDER behavior can be written manually into the shader if that
behavior is desired, whereas CLAMP_TO_EDGE cannot.
2019-12-15 02:36:31 +11:00