Commit Graph
247 Commits
Author SHA1 Message Date
itsmattkc 15ac7f0e9d renderer: removed old signal that isn't used anymore 2020-02-28 15:49:02 +11:00
itsmattkc f9a54ebdb6 renderer: remove frames from hash map as well when the diskmanager deletes
them
2020-02-27 17:46:49 +11:00
itsmattkc 735e180d5a pixelservice: use more widely supported OIIO function in image buffer
conversions
2020-02-27 17:19:59 +11:00
itsmattkc 273522f28a diskmanager: don't fail disk cache clear if the files simply don't exist
QFile::remove() will return false if the file doesn't exist, but
for our purposes that's as good as the file having been deleted.
2020-02-27 17:19:07 +11:00
itsmattkc a64f066e2e renderer: don't upconvert to RGBA if the source image is only RGB 2020-02-27 17:18:39 +11:00
itsmattkc a0f37ef827 pixelformat: added missing <memory> include for non-windows systems 2020-02-27 15:49:15 +11:00
itsmattkc d87b4fde8c renderer/decoder: use divider at the footage level
Optimizes rendering if a divider is being used.
2020-02-27 15:47:08 +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 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 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 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 08ed766771 audiorenderworker: fixed potential false positive in assert 2020-02-24 02:02:08 +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 48cdb3a6dd memorymanager: rewrote entire memory management system 2020-02-23 20:29:51 +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 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 e149fc0117 memorymanager: updated system calls for linux 2020-02-21 14:51:47 +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 be6fbfecdb videorenderworker: fixed improper QString::arg() usage 2020-02-20 19:44:48 +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 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 e68e89c40b renderer/decoder: use same background mechanism to conform audio as well 2020-02-19 16:45:34 +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 139127ed3c Merge branch 'master' of https://github.com/olive-editor/olive 2020-02-17 13:06:09 +11:00
itsmattkc 33a85aa059 audiobackend: fixed issue where audio would be appended rather
than overwritten on some platforms

Despite the fact we don't actually do any reading here, using
QFile::WriteOnly on its own will truncate the file to 0 bytes which is
undesirable. The documentation says QFile::ReadOnly, Append or NewOnly
will prevent this. NewOnly won't work and reads are unnecessary, so
Append was used initially. However on some platforms, Append will _only_
allow writing at the end of the file (ignoring the seek() function)
meaning bytes won't be written where they're meant to be (this behavior
happens on Linux and not on Windows, the platform discrepancy is likely
a Qt bug). Using ReadWrite instead, despite not reading anything,
prevents truncation and allows for writing not at the end of the file.
2020-02-17 11:17:21 +11:00
itsmattkc 21affd4e58 renderers: add early functions for cancelling long render processes 2020-02-17 02:15:28 +11:00
itsmattkc ceb70a1870 viewer: use internal texture to allow viewer to control texture as part of its
context

More intuitive code flow and allows the user to undock the viewer (which
forcibly destroys and recreates the context) and the viewer will handle
creation of the new texture in said new context.
2020-02-16 18:24:49 +11:00
itsmattkc 24c926e769 renderer: use ocio config in hash as well
Fixes potential bug where the same named colorspace in a different config
would pull old/likely inaccurate cached frames.
2020-02-16 00:14:46 +11:00
itsmattkc 53106e1847 opengl: remove locks from texture
These are not used anymore and are therefore unnecessary.
2020-02-15 14:02:00 +11:00
itsmattkc b0e7ae34ba videorenderworker: improve download code 2020-02-14 14:51:40 +11:00
itsmattkc f36c635b05 openglbackend: call base function in CloseInternal() 2020-02-14 14:51:11 +11:00
itsmattkc d66425c324 prepared gl improvements for merge 2020-02-14 02:35:10 +11:00
itsmattkc 6a47b05ab8 work on oslworker 2020-02-14 02:13:38 +11:00
itsmattkc 422e447f13 oslworker: comment accelerated node function to allow compiling for now 2020-02-13 15:38:54 +11:00
itsmattkc 888e688385 work towards implementing osl as a renderer 2020-02-12 15:13:51 +11:00
itsmattkc 5e5be50959 cmake: find OSL 2020-02-08 00:14:13 +11:00
itsmattkc 1e71c0e7f5 oslbackend: began new backend classes 2020-02-05 14:49:55 +11:00
itsmattkc 91f1be90a9 opengl: isolate all functions to one thread 2020-02-03 18:14:58 +11:00
itsmattkc 776cfd87c8 renderer: minor code improvements 2020-02-03 12:41:20 +11:00