Commit Graph
100 Commits
Author SHA1 Message Date
itsmattkc 5e66508f3c curveview: color code keyframe tracks when more than one is present 2020-04-05 23:15:47 +10:00
itsmattkc 9133bbe632 curveview: implemented keyframe tracks
I'm not sure why this wasn't implemented before, but as a pretty integral part
of the keyframe system, now it is.
2020-04-05 20:19:46 +10:00
itsmattkc 6ea52e4123 audio renderer/timeline: pass through channel count of waveform visualizations 2020-04-05 19:59:14 +10:00
itsmattkc 56178648bd timelinepoints: implemented saving/loading into project files 2020-04-05 19:21:17 +10:00
itsmattkc e3a8d32e4a audiorenderer: fill destination buffer with zeroes before copying samples over
Ensures no uninitialized values end up in the audio cache.
2020-04-05 13:29:04 +10:00
itsmattkc 5b48c1ceb0 travis: try newer xcode sdk for better mojave+ support 2020-04-05 11:41:19 +10:00
itsmattkc 92da0c220d exporter: wait for conforms/indexes when exporting audio
The audio rendering system uses an event-based mechanism where if audio needs
to be converted (i.e. to a different sample rate), it will create a conform
task and re-render that section again when the audio is ready. Unfortunately,
the export code didn't respect this and would start encoding audio once the
initial queue was done. This usually resulted in silent audio, but could also
result in "uninitialized" audio that would crash any float-based encoders
(e.g. AAC). Now we use a different signal that only emits once the queue is done
AND all conforms are done.
2020-04-05 00:13:26 +11:00
itsmattkc fb1cf1edaf ffmpegencoder: improvements to resampling
Updates the AVFrame's nb_samples field to the amount of samples retrieved from
swresample so it doesn't encode more or less samples than it has.
2020-04-05 00:12:23 +11:00
itsmattkc 626c50477c renderer: set null value on shader if no value was found in the table 2020-04-04 19:28:38 +11:00
itsmattkc c4b11c7bd1 nodevalue: return a null qvariant instead of 0 if there is no matching value in the table 2020-04-04 19:04:44 +11:00
itsmattkc c82ca3c716 audiorenderer: don't memcpy if the copy length is zero 2020-04-04 17:25:31 +11:00
itsmattkc 615e227f9a renderer: convert footage frames to reference pixel format
Due to an oversight, incoming footage frames were NOT converted to the
working pixel format (usually half or float). For most frames, this meant the
OCIO conversion would occur on frames while they were still in their source
format (usually either RGB8 or RGB16). This leads to rounding error
inaccuracies, but even worse GLSL will clamp integer textures to 1.0 potentially
losing a lot of data.

While later nodes would correctly convert to the appropriate format, by then it
would be too late. This commit corrects this issue, converting the frames to
float during the OCIO shader pass.
2020-04-04 14:15:18 +11:00
itsmattkc 55c86f6cb6 viewer: removed framebuffer that never got used
This framebuffer was an early approach to the pixel sampler that never got
used, but was still getting created/destroyed unnecessarily. This has now
been removed.
2020-04-04 14:11:16 +11:00
itsmattkc b2090c113c videorenderingparams: added divider to constructor that doesn't have mode or timebase 2020-04-04 14:09:46 +11:00
itsmattkc 3ba31f9d5f openglframebuffer: fixed erroneous error message 2020-04-04 14:09:24 +11:00
itsmattkc d5581f0772 preferencesdisktab: when browsing for a disk cache path, start in the currently set dir 2020-04-04 14:09:00 +11:00
itsmattkc dfb00d9f15 pixelformat: added convenience function for whether a format is float or not 2020-04-04 13:46:12 +11:00
itsmattkc 666bd64943 pixelformat: fixed regression that broke pixel format conversion
Affected all exports.
2020-04-04 12:45:14 +11:00
itsmattkc 07d1123978 renderer: disassociate requires float as well, so we may as well do the version before 2020-04-04 12:24:36 +11:00
itsmattkc f8d9404cc9 colorspacechooser: ensure a (none) option is available 2020-04-04 12:24:03 +11:00
itsmattkc 98e5b175e9 colordialog: various improvements that should ultimately be near completion 2020-04-04 04:22:55 +11:00
itsmattkc 730b94c471 colorspacechooser: implemented setting input color space 2020-04-04 04:21:48 +11:00
itsmattkc ae6c7174c3 core: declare Color as a Qt metatype 2020-04-04 04:21:28 +11:00
itsmattkc a21e7b1e77 nodeinput: implemented color
Implements converting color to and from string, keyframing color, and
conversion between the class and its keyframe tracks.
2020-04-04 04:19:24 +11:00
itsmattkc f1423c169c nodeparam: move ValueToBytes color from QColor to our new Color class 2020-04-04 04:18:43 +11:00
itsmattkc 30be89ac2d color: QDebug implementation
Makes debugging color values easier.
2020-04-04 04:18:06 +11:00
itsmattkc 87b8713b5e colorbutton: implemented management for the color that this button displays 2020-04-04 04:17:34 +11:00
itsmattkc 0801488c89 nodeparamviewwidgetbridge: implemented setting and receiving color 2020-04-04 04:16:49 +11:00
itsmattkc ce88da80ef openglproxy: for shader inputs, use our new Color class instead of QColor 2020-04-04 04:15:57 +11:00
itsmattkc 0752b75682 mathnode: disable method keyframing and connecting
There's probably no situation where these would need keyframing/connecting.
2020-04-04 04:12:16 +11:00
itsmattkc c9c9bd5174 metareader: use NodeInput's StringToValue/ValueToString when reading default values from XML 2020-04-04 04:11:20 +11:00
itsmattkc c538f2a421 solid: fixed erroneous shader reference in XML file 2020-04-04 03:47:34 +11:00
itsmattkc 11f962d6b3 media nodes: moved video/audioinput category to media base
They both have the same category, so they can share the same code in their base.
2020-04-03 23:28:03 +11:00
itsmattkc 3dd91a1429 timenode: implemented timenode to allow values to be connected to time 2020-04-03 23:27:38 +11:00
itsmattkc 378c354277 nodeview: improved nodeview usage
Rather than the cumbersome and small "node connectors" (introduced a while ago
when nodes had more than one output), this is a more streamlined system of
connecting nodes (hold Ctrl and drag to connect)
2020-04-03 08:34:47 +11:00
itsmattkc e1ca5f2f82 various: removed hardcoded OCIO::ROLE_SCENE_LINEAR to allow for a configurable reference space 2020-04-03 01:30:47 +11:00
itsmattkc 552163320c colorpicker: implemented color management
Also moves some items to ColorManager from Project for better accessibility and
re-uses some widgets in ExportDialog for improved code.
2020-04-03 01:23:08 +11:00
itsmattkc 4d0b8f18e2 colordialog/picker/wheel: finished color picker UI
Dialog is still unmanaged, but that's the only remaining step.
2020-04-02 19:26:30 +11:00
itsmattkc a2ed1035da Merge branch 'master' into colorpicker 2020-04-02 15:30:55 +11:00
itsmattkc bfbb2e3fef msvc: fixed compile/syntax error that only seems to occur in msvc 2020-04-02 13:09:21 +11:00
itsmattkc 03c9c708f0 Merge branch 'master' of https://github.com/olive-editor/olive 2020-04-02 13:02:53 +11:00
itsmattkc f3290003be colordialog/wheel/gradient: implemented basic UI components for color picking 2020-04-02 13:02:30 +11:00
itsmattkc 5e609882d8 color: fixed oiio incompatibility
While developing, we used a function that only exists in OpenImageIO 2.1.x+.
Fortunately however, it seems to have simply existed with a different name in
earlier versions so we can maintain compatibility with 1.6+.
2020-04-02 12:47:05 +11:00
itsmattkc 3bec108fee Merge branch 'master' into colorpicker 2020-04-01 19:30:24 +11:00
itsmattkc 920a0a27a7 menu: set keyboard shortcuts to application-wide so they continue to work in
viewerwindows
2020-04-01 19:29:41 +11:00
itsmattkc 1319d7141f viewer: re-implemented auto viewer full screen from menubar/keyboard shortcut 2020-04-01 19:22:53 +11:00
itsmattkc ed48d24cbc viewerwindow: implemented displaying a viewer image fullscreen on another monitor
Implements an extra widget to display images on a separate monitor. Both
viewers have separate display color controls since different monitors may
conform to different standards/transforms.
2020-04-01 19:21:25 +11:00
itsmattkc bcc8eaee55 colordialog: began widgets and dialogs for a managed color picker 2020-04-01 17:57:19 +11:00
itsmattkc 6ea6dd810e pixelsampler: added pixel sampler panel
When visible, this panel will show the current reference and display transformed
color under the cursor of any viewer.
2020-04-01 16:57:10 +11:00
itsmattkc 76f260cb3a timeline: added ability to move clips by sample in addition to by frame 2020-04-01 13:55:19 +11:00
itsmattkc 061f7ac20d mainwindow: show active project filename in the titlebar 2020-04-01 13:19:18 +11:00
itsmattkc 1363d2b94c mathnode: expanded math node
Implemented handling of various different types.
2020-04-01 05:21:50 +11:00
itsmattkc 74e36bc99d audiorenderworker: fixed segfault in audiorenderworker
Switches memset/memcpy pointers to a char* pointer specifically to work on the
byte level rather than the float* level.
2020-04-01 05:20:56 +11:00
itsmattkc b562a84e00 videorenderparams: don't consider a null timebase invalid
Not all items that use VideoRenderParams need a timebase much like they don't
all need a render mode.
2020-04-01 05:19:04 +11:00
itsmattkc 154f6c5666 projectviewmodel: fixed segfault when dragging sequence in project 2020-04-01 05:18:37 +11:00
itsmattkc 4aad73a21d samplebuffer: use delete [] instead of delete for sample buffers 2020-04-01 05:17:45 +11:00
itsmattkc 922e11a23d frame: refuse to allocate if the video params are invalid 2020-04-01 05:17:24 +11:00
itsmattkc 59d32f60ad core: use SAMPLE_FMT_FLT only
There's no real reason not to use float for audio. It's light on system
resources (compared to everything else we're doing at least) and the code
becomes simpler when we can assume all audio will be -1 to 1 rather than 0 to
255 or -32768 to 32767.

The only thing we might want to do one day is move up to SAMPLE_FMT_DBL, but
this should only take some mild refactoring and all our assumptions (i.e. -1 to
1 range, etc.) can remain the same.
2020-03-31 18:07:25 +11: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 8413886c17 audiobackend: fixed bug that sometimes extended the
While we implement an audio cache "truncate" function when the sequence length
changes, the render functions also have the ability to extend it. This is fine,
but if truncation happened while workers were caching, it could truncate and
then extend beyond the length of the sequence. This commit changes the worker
extend function to only extend as much as the length, therefore not undoing the
truncation.
2020-03-31 13:56:02 +11:00
itsmattkc 9603f90072 ffmpegencoder: added range support to audio encoding
There isn't UI for this yet, but sending a time range to the encoder will now
encode just that range of audio.
2020-03-31 13:55:57 +11:00
itsmattkc be6bea234b exportdialog: make integer slider for crf smaller
Using QSizePolicys seemed to always produce some variant of the IntegerSlider
and QSlider consuming roughly half of the width each. The IntegerSlider is only
two characters wide at any one time so this results in a lot of wasted screen
real estate. This commit limits the integer slider to 4 characters wide (more
than 2 to allow for UI padding)
2020-03-31 12:41:08 +11:00
itsmattkc af0d85f0cc exportdialog: added filename validation
Ensures filenames end with the appropriate extension (necessary for
communicating the output format to both FFmpeg and OIIO) and moves overwrite
check from file dialog to render since it's still possible to type the
intended filename. Also checks the intended output directory and creates it
if it doesn't already exist.
2020-03-31 12:23:47 +11:00
itsmattkc 51c834f375 exporter: start debug timer before EncodeFrame() call
Minor code path improvement. Since EncodeFrame() will try to stop the debug
timer if the encode is finished, it doesn't make sense to always start it
unconditionally after calling EncodeFrame().
2020-03-31 12:10:45 +11:00
itsmattkc 7328a813f9 ffmpegencoder: fixed bug that failed to flush the audio encoder
For some reason, when the encoder closed it only flushed the video encoder and
not the audio encoder. Now it does both.
2020-03-31 12:09:43 +11:00
itsmattkc 26d02e82ad exporter: fixed double-free 2020-03-31 11:50:23 +11:00
itsmattkc 18c36155d7 Merge branch 'master' into mathnode 2020-03-31 02:39:46 +11:00
itsmattkc a855dea8de timeline/project: block serializations to and from xml now include links
Fixes issue where blocks would become unlinked after copy/paste or save/load.
2020-03-31 02:38:14 +11:00
itsmattkc 53955e9632 timeline: fixed array index out of bounds bug 2020-03-31 02:23:00 +11:00
itsmattkc 2bda306866 timeline/various: implemented block copy/paste
Implemented the ability to copy/paste blocks/clips in the timeline. This did
require some large scale changes and reworking of the copy/paste system
introduced a few commits ago, but should be largely functional now.
2020-03-31 02:19:05 +11:00
itsmattkc 67d8ad571d timeline: remove blocks from timeline if a place command has overwritten them 2020-03-30 18:06:02 +11:00
itsmattkc 6624f14517 timeline: temporarily disable optimization that doesn't re-cache after split
Since waveforms are generated during the cache process, if clips don't cache,
a waveform isn't generated for them. Therefore for now, this optimization will
be disabled but should be re-enabled later when waveforms are improved to handle
this situation.
2020-03-30 15:14:06 +11:00
itsmattkc 5aa4f91c46 timelineviewblockitem: fixed some indentation
Minor code tidiness.
2020-03-30 15:13:17 +11:00
itsmattkc a143b64ac7 block: don't send cache invalidation signals from length changes
Minor optimization.
2020-03-30 15:11:32 +11:00
itsmattkc 27412baa57 Merge branch 'master' into mathnode 2020-03-30 01:27:22 +11:00
itsmattkc 2bfe9f44df nodeview: added ctrl+scroll zooming 2020-03-30 01:27:10 +11:00
itsmattkc 2544c5e832 mathnode: added support for adding samples together 2020-03-29 03:29:18 +11:00
itsmattkc 7100d00060 nodes: made changes to the node system to allow for context sensitive shader code
Primarily implemented for the math node so a new shader can be generated and
compiled based on what inputs the node is receiving.
2020-03-29 03:11:30 +11:00
itsmattkc 52acb272bf mathnode: added parameters 2020-03-29 00:22:44 +11:00
itsmattkc 48d8c8f242 Merge branch 'master' into mathnode 2020-03-28 18:10:38 +11:00
itsmattkc 7bca61608a node: added qstringliterals to node IDs
Minor code optimization.
2020-03-28 18:02:34 +11:00
itsmattkc 938527b9fe mathnode: began math node 2020-03-28 17:51:35 +11:00
itsmattkc b54388894c project: implemented the ability to delete items from projects 2020-03-28 12:33:28 +11:00
itsmattkc a2a432a0e8 item: wrote better function for retrieving shared ptr from raw ptr
Rather than every call having to access the item's parent, the item does it
automatically which simplifies code everywhere.
2020-03-28 12:32:30 +11:00
itsmattkc 4dcc672b23 taskdialog: improved signalling
Ensures task errors are picked up and objects are deleted at the most
appropriate times.
2020-03-28 12:13:51 +11:00
itsmattkc b40dd761f5 projectexplorer: cache first selected item for context menu operations
Minor optimization.
2020-03-28 11:36:05 +11:00
itsmattkc 84aab543ca oiiodecoder: always add 1 frame to image sequences so the end frame is shown 2020-03-28 11:29:51 +11:00
itsmattkc 3399227b3a keyframeview: implemented transforming keyframe times to and from sequence time
Since the node graph can have transform cross nodes, input keyframes may occur
at a different times requiring transforming between sequence time and media
time. This commit implements such a mechanism in all UI classes that need it.
2020-03-26 19:17:46 +11:00
itsmattkc 592171cc31 keyframeviewbase: use existing function to access variable rather than changing the variable's visibility
Improved class encapsulation.
2020-03-26 00:38:25 +11:00
itsmattkc a75e8fcde5 timebasedwidget: don't update the viewer if it's the same
Minor optimization, since changing the viewer can be a complex process it should
only be done if absolutely necessary.
2020-03-26 00:34:01 +11:00
itsmattkc c5d3c4ff36 node: implemented convenience functions for transforming time
Implements a function that calculates the time transformation(s) only between
one node and another.
2020-03-26 00:26:13 +11:00
itsmattkc 9f3b9fdc70 footageviewer: allows users to drag video or audio only
Updates drag mime data to include a variable determining which streams are
enabled and which ones aren't (a binary qint64 where the 0s are disabled
and the 1s are enabled) rather than relying solely on the stream->enabled
values which can't be modified as part of the drag process.
2020-03-23 18:55:59 +11:00
itsmattkc 3b8743a0ce timeline: show timecode on block items and started copy function 2020-03-23 15:28:58 +11:00
itsmattkc bb326e2b50 nodeview/core: moved node copy/paste functions to core so they can be used elsewhere 2020-03-23 15:27:58 +11:00
itsmattkc 52a8966abd timecode functions: added convenience function and improved error reporting
Added a convenience function for converting rational time to a timecode
and timecode converters now return error messages if something goes wrong.
2020-03-23 15:26:31 +11:00
itsmattkc 053ea10393 viewer: fixed occasional segfault when setting the viewer node
Since other parts of the UI use OpenGL (through Qt), the viewer's context can
sometimes become non-current until the next time it draws. Since the color
processor is created before the main drawing function, the context could
occasionally be non-current causing its creation to fail. Subsequently trying
to use that color processor would trigger a segfault. This commit addresses that
by always making the context current before creating the color processor shader.
2020-03-22 20:09:05 +11:00
itsmattkc f9fc27c6eb renderer: invalid cache when viewer node changes
Ensures frames get re-rendered rather than stuck on the previous viewer node.
2020-03-22 20:03:14 +11:00
itsmattkc 51f02ea01b viewer: allow switching open sequences 2020-03-21 22:18:17 +11:00
itsmattkc 3c3543a2a9 viewer: avoid divide by zero on sequences with zero length 2020-03-21 13:15:11 +11:00
itsmattkc e6b484a523 audiowaveformview: rounded some float to int conversions 2020-03-19 13:22:48 +11:00