Commit Graph
100 Commits
Author SHA1 Message Date
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 0624184b18 projectexplorer: re-implemented reveal in explorer function 2020-02-27 11:30:26 +11:00
itsmattkc 0fbffc9b8f ffmpegdecoder: mild code cleanup 2020-02-27 01:05:22 +11:00
itsmattkc 428cfc6210 exportdialog: use sequence name and project directory to auto-select export
filename
2020-02-27 00:58:19 +11:00
itsmattkc d7cde3b22e timelinewidget: clear block items before destruction
Prevents block items signalling anything after the TimelineWidget has already
been destroyed.
2020-02-26 14:36:51 +11:00
itsmattkc 9585786c4b exporter: removed unused and problematic function
This array this code made was never actually used and in fact the code was
potentially crash-prone.
2020-02-26 14:07:47 +11:00
itsmattkc 2fe680dccd Merge branch 'master' of https://github.com/olive-editor/olive 2020-02-26 11:39:08 +11:00
itsmattkc 0bef116020 oiiodecoder: set correct image stream
Fixes bug where loading a saved project with still images could crash.
2020-02-26 11:37:57 +11:00
itsmattkc e578ee6264 nodeviewedge: fixed float conversion warning 2020-02-26 01:59:46 +11:00
itsmattkc 7e7ff49777 nodeviewedge: use bezier curves instead of straight lines 2020-02-26 01:07:53 +11:00
itsmattkc 785160b86b nodeview: fixed crash when expanding a NodeViewItem with a NodeInputArray 2020-02-26 00:47:01 +11:00
itsmattkc bf7fc9a0c4 panels: selecting a clip in the timeline automatically selects the corresponding
nodes in the nodeview
2020-02-26 00:39:30 +11:00
itsmattkc 78daf9e28a exporter: updated exporter to function with new render system 2020-02-25 20:03:15 +11:00
itsmattkc ab19e445bd importtool: implemented auto-parameter detection from image streams too 2020-02-25 14:59:54 +11:00
itsmattkc 8d7b94658b footagepropertiesdialog: show colorspace and alpha association properties on
image streams
2020-02-25 14:59:48 +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 5404fa628d cmake: use rc resource file on windows 2020-02-25 13:18:16 +11:00
itsmattkc fcb8e934c4 config: changed default cache range values 2020-02-24 12:34:28 +11:00
itsmattkc 9f17a23a42 videorenderframecache: use hash-prefix directory structure
Many file systems become inefficient with a lot of files in the same directory.
To solve this we use a semi-arbitrary system to split up all cache files into
several folders to keep things performant.
2020-02-24 12:34:16 +11:00
itsmattkc 2c16bb7c53 renderworker: removed unnecessary declaration 2020-02-24 11:58:38 +11:00
itsmattkc fceb1e8d3e viewer: re-render both video and audio if parameters change 2020-02-24 11:57:39 +11:00
itsmattkc 6239107670 ffmpegdecoder: run timer in main thread at all times 2020-02-24 11:56:48 +11:00
itsmattkc 08ed766771 audiorenderworker: fixed potential false positive in assert 2020-02-24 02:02:08 +11:00
itsmattkc 412ea9cede ffmpegdecoder: fixed bug with frame identification 2020-02-24 02:01:42 +11:00
itsmattkc 8f5a92af9c ffmpegframecache: removed unnecessary debug line 2020-02-24 02:01:21 +11:00
itsmattkc ff516b6202 audiorenderworker: added assert for problematic audio behavior that could
corrupt the heap
2020-02-23 22:20:01 +11:00
itsmattkc 6956e159e6 ffmpegdecoder: remove debug messages 2020-02-23 22:18:59 +11:00
itsmattkc d3bc12b2f5 ffmpegdecoder: use stricted memory interval 2020-02-23 22:18:10 +11:00
itsmattkc c7cb227abb ffmpegdecoder: fixed memory leak introduced in previous commit 2020-02-23 21:24:07 +11:00
itsmattkc b1cb8489df memory: try caching frameptrs instead of avframes so we have more control 2020-02-23 21:20:33 +11:00
itsmattkc 48cdb3a6dd memorymanager: rewrote entire memory management system 2020-02-23 20:29:51 +11:00
itsmattkc 3a90e76fec viewerglwidget: don't check for file exists since OIIO will do that for us 2020-02-23 13:48:02 +11:00
itsmattkc c2d518c681 audiorenderworker: fixed bad memcpy that would corrupt the heap 2020-02-23 13:46:28 +11:00
itsmattkc 813c2e411a rendercache/decodercache: moved qmutex that was only used by decodercache into
decodercache's derived class
2020-02-23 11:46:30 +11:00
itsmattkc 866db58965 taskmanager: use deleteLater rather than delete
This doesn't solve a known issue, but is probably cleaner/more robust code
regardless.
2020-02-23 11:45:16 +11:00
itsmattkc 7a95af7069 taskdialog: fixed issue that would sometimes kill a thread before it was
finished leading to a SIGABRT from qt
2020-02-23 11:44:30 +11:00
itsmattkc 0a74714f5d nodeview/nodepanel: implemented select all/deselect all functionality 2020-02-23 11:38:30 +11:00
itsmattkc 6facdc1f1b projectpanel/projectexplorer: added select all/deselect all functionality 2020-02-23 11:33:49 +11:00
itsmattkc f1f80c0a39 audiomanager: fixed segfault if olive is closed while the devices are getting
refreshed
2020-02-23 02:20:39 +11:00
itsmattkc 1c033e53d4 timeruler: fixed issue that caused dirty cache status to not appear sometimes 2020-02-22 20:08:28 +11:00
itsmattkc 0e7b051228 timelinewidget: show cache status in timeline too 2020-02-22 14:45:50 +11:00
itsmattkc 9cb04b0020 timelineview: simplified TrackRippleRemoveAreaCommand and fixed bug that
incorrectly calculated the splice copy's media in
2020-02-22 01:14:38 +11:00
itsmattkc c7a3906c97 timelineview: fixed bug that wouldn't invalidate all necessary regions of the
cache when using rippleremovearea
2020-02-22 00:49:57 +11:00
itsmattkc 65db108be2 openglcolorprocessor: renamed CreateOpenGL() to Create()
We hide ColorProcessor::Create() to create a derived class rather than the
base class and clear up confusion over the two functions existing.
2020-02-22 00:34:55 +11:00
itsmattkc acb107bd92 Merge branch 'master' of https://github.com/olive-editor/olive 2020-02-22 00:14:20 +11:00
itsmattkc 77c0c9d95a viewer: ported to openglcolorprocessor for simpler code and fixed bug that
snuck in breaking color managed display
2020-02-22 00:13:28 +11:00
itsmattkc 547990b920 ffmpegdecoder/memorymanager: fixed race condition in garbage collection 2020-02-21 23:15:09 +11:00
itsmattkc b0c9711974 ffmpegdecoder: fixed double mutex lock
Error() would call Close() getting stuck in a double mutex lock that could
stall workers. This commit fixes that.
2020-02-21 20:04:36 +11:00
itsmattkc 6c33e85162 decoder: don't start indexing any stream that doesn't need to be 2020-02-21 20:04:08 +11:00
itsmattkc 04759b88cf qt/opengl: fixed bug that caused black screen on some platforms 2020-02-21 18:21:07 +11:00
itsmattkc 5602b6a88b importtool: add "don't ask again" option on "no active sequence" dialog
In the previous commit, we added a dialog to give users options when dropping
footage on a sequence-less timeline panel. However some users will have a
preferred behavior that they'd want every time without having to go through
the messagebox, so we add a "don't ask again" option that stores the setting
in the application config.
2020-02-21 18:07:54 +11:00
itsmattkc 8f86fdd16e importtool: add user option for creating a sequence on drop
If there was anything that 0.1.x taught me, it was that a substantial number of
users did not understand that a new sequence was being made by dropping footage
onto an empty timeline and wouldn't know what to do if they wanted parameters
that differed from the footage they dragged in. This dialog makes the operation
clear and gives users an option to set the parameters on drop for convenience.
2020-02-21 17:48:24 +11:00
itsmattkc bac33e3d16 importtool: create a sequence automatically from dropped footage if one isn't
open already
2020-02-21 17:28:17 +11:00
itsmattkc 042c4616c7 Merge branch 'master' of https://github.com/olive-editor/olive 2020-02-21 14:55:50 +11:00
itsmattkc e149fc0117 memorymanager: updated system calls for linux 2020-02-21 14:51:47 +11:00
itsmattkc dcedf12dbe ffmpegdecoder: stop clear_timer on deconstruction 2020-02-21 14:25:27 +11:00
itsmattkc 78556c1511 audiomonitor: use QTimer::singleShot rather than connecting timeout() to stop()
Minor code improvement.
2020-02-21 14:22:53 +11:00
itsmattkc befaf34a4c oiiodecoder: use QStringLiteral()
Minor code improvement/optimization.
2020-02-21 14:21:53 +11:00
itsmattkc f769e88e6d taskmanager: restore one task per thread at idlepriority 2020-02-21 14:21:32 +11:00
itsmattkc e74c4c2d1c global: implemented rudimentary memory manager to use available system memory
without forcing the OS to page swap
2020-02-21 14:20:57 +11:00
itsmattkc 2e38e7e3fb indexmanager: moved files 2020-02-21 10:47:41 +11:00
itsmattkc 7797bf4971 ffmpegdecoder: added helper functions for memory handling 2020-02-21 01:18:21 +11:00
itsmattkc 3cffffdcee viewer: use vsync for updates rather than a timer
Improves viewer appearance and performance. Rather than using a timer roughly
set to the sequence's frame rate to update the viewer, the viewer synchronizes
itself to the display's refresh rate resulting in much smoother playback.
2020-02-21 00:42:46 +11:00
itsmattkc 4532c3884e ffmpegdecoder: fixed cast issue on gcc 2020-02-21 00:21:31 +11:00
itsmattkc 94f1d997ad slider: don't use prefix and suffix in text entry
UX improvement, ensures the text entry doesn't include anything that the slider
can't resolve back into a value.
2020-02-21 00:11:54 +11:00
itsmattkc 2299fda73a ffmpegdecoder: handle media that starts at a non-zero pts 2020-02-21 00:09:45 +11:00
itsmattkc 162c91ec52 ffmpegdecoder: allow probe duration pickup to be cancelled 2020-02-20 23:54:40 +11:00
itsmattkc bc2be7a2a4 ffmpegdecoder: use simpler loop to find duration if the container doesn't
provide one
2020-02-20 23:52:23 +11:00
itsmattkc 4c61abbbf0 preferencesdisktab: use cache clear button to provide user feedback rather than
a messagebox

A slightly more subtle way to provide feedback.
2020-02-20 23:35:50 +11:00
itsmattkc 73e639757e ffmpegdecoder: fix bug that slowed down low fps footage unnecessarily 2020-02-20 23:34:49 +11:00
itsmattkc be6fbfecdb videorenderworker: fixed improper QString::arg() usage 2020-02-20 19:44:48 +11:00
itsmattkc 9faa303368 viewerglwidget: fixed destroy function used with OIIO 1.x 2020-02-20 19:41:52 +11:00
itsmattkc 3bd1c885cf decoder: round double to int 2020-02-20 19:24:59 +11:00
itsmattkc b231720398 viewer: prevent shuttle left/right from ever pausing
If the speed ever goes from 1 or -1 to 0, it'll in/decrease the speed one more
so it doesn't pause.
2020-02-20 19:12:14 +11:00
itsmattkc 5a070f14de general: use IdlePriority rather than LowPriority
Fixes a number of playback stuttering and general UI lag issues by setting all
background tasks to IdlePriority rather than LowPriority. While it was assumed
LowPriority tasks would always get scheduled below NormalPriority (e.g. main
thread) tasks, it turns out this is not always the case. If the background tasks
start consuming a lot of CPU cycles, the scheduler may use "dynamic scheduling"
to schedule them above the main thread regardless leading to UI lag. This is
apparently the case for all thread priorities apart from IdlePriority, which
is allegedly a special case where threads are *only* scheduled when other
threads aren't busy ensuring the main thread stays responsive.
2020-02-20 17:48:50 +11:00
itsmattkc 054281596e videorenderer: use qmutexlocker in more cases
Minor code cleanup.
2020-02-20 17:48:28 +11:00
itsmattkc 8cb74a8218 functiontimer: created convenience class to help when profiling functions 2020-02-20 17:47:33 +11:00
itsmattkc e373c40853 ffmpegdecoder: handle eof in retrieve 2020-02-20 16:50:03 +11:00
itsmattkc 1e2f0220a2 viewerglwidget: use OIIO::ImageInput rather than OIIO::ImageBuf
Gives us better control over the file I/O (using ImageBuf would fail to
release file handles sometimes).
2020-02-20 16:39:30 +11:00
itsmattkc 654b679658 nodeview: set drop_edge to null after placement
Fixes segfault placing more than one node.
2020-02-20 16:39:04 +11:00
itsmattkc 4914182206 stroke: fixed duplicate id 2020-02-20 16:38:46 +11:00
itsmattkc 3e776b62e1 oiiodecoder: added new mutex structures 2020-02-20 16:38:23 +11:00
itsmattkc 1cce8abd85 frame: added bool function returning whether the frame is allocated or not 2020-02-20 16:37:43 +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 d1a9a29c5e indexmanager: removed some unused debugging code 2020-02-20 02:22:15 +11:00
itsmattkc 4754ec384f taskview: actually corrected taskviewitem order
An earlier commit addressed faulty TaskViewItem ordering by changing
insertWidget to addWidget. Turns out this was the wrong strategy since the
insert was used to get widgets above the stretch. The correct strategy is
using insert(count()-1) instead of insert(0)
2020-02-20 02:20:16 +11:00
itsmattkc 95ca19d547 ffmpegdecoder: began work on the index process working in tandem with the
retrieval process
2020-02-20 00:06:20 +11:00
itsmattkc e68e89c40b renderer/decoder: use same background mechanism to conform audio as well 2020-02-19 16:45:34 +11:00
itsmattkc 5166f6a54a taskview: fix bug that inserted taskviewitem widgets in the wrong order 2020-02-19 16:44:44 +11:00
itsmattkc 77de011509 cmake: added ConformTask source files 2020-02-19 12:46:05 +11:00
itsmattkc a719618b31 waveinput: better handling of WAV data sections 2020-02-19 12:45:21 +11:00
itsmattkc 56adf5005f decoder: provide conform progress signal 2020-02-19 12:45:01 +11:00
itsmattkc 4bcbe290f4 task: Created ConformTask so audio conforming can be done as a background
process
2020-02-19 12:44:29 +11:00
itsmattkc 08e6c6ffc0 decoder: move conform function to base class
There's no reason the Conform() function can't live in the base class since its
functionality isn't necessarily specific to FFmpeg.
2020-02-19 12:28:37 +11:00
itsmattkc 53551246da decoder: signal indexing progress
Better UI interactions, actually shows the progress of the index function in
the task manager now.
2020-02-19 12:19:42 +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 5e75e9b3b0 waveinput/output: allowed external access to data length value 2020-02-19 11:40:54 +11:00
itsmattkc f63106b2d6 stream: wrote indexing data into the stream classes rather than having them
in the decoders
2020-02-19 11:40:05 +11:00
itsmattkc 4c4b91afd6 viewerglwidget: fix bug that didn't clear the viewport correctly on empty frames 2020-02-19 11:34:21 +11:00