Commit Graph
33 Commits
Author SHA1 Message Date
itsmattkc e4e797c901 proxy: cleaned up, re-use the render cache's disk save system for proxies, multithreaded compression 2020-05-04 00:29:26 +10:00
itsmattkc e4c3b6bf7b renderer/decoder: simplified audio PCM transcode
Turned the two-step PCM transcode into one step and simplified/removed much of
the unnecessary infrastructure that supported it. This makes the code cleaner
and generally improves the code paths.
2020-05-03 16:07:10 +10:00
itsmattkc 2d0e5322f2 oiiodecoder: fixed namespace issue 2020-05-02 22:55:45 +10:00
itsmattkc 3e57cdac1d use linesize workaround for setting OIIO pixels as well as getting 2020-05-02 22:51:29 +10:00
itsmattkc e7400adabc oiiodecoder: added compatibility for OIIO 1.x 2020-05-01 18:19:08 +10:00
itsmattkc 472030f8f0 oiiodecoder: implemented workaround for oiio stride bug in versions < 2.1.12 2020-05-01 01:38:31 +10:00
itsmattkc 4490b10032 oiiodecoder: fixed broken reference 2020-04-23 03:58:38 +10:00
itsmattkc 0f825cbc44 oiiodecoder: updated to handle frame linesizes 2020-04-22 16:57:18 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10: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 84aab543ca oiiodecoder: always add 1 frame to image sequences so the end frame is shown 2020-03-28 11:29:51 +11:00
itsmattkc fdfe53c700 oiiodecoder: check for sequential images in sequence heuristic 2020-03-13 16:49:59 +11:00
itsmattkc 2d57f22f3a oiiodecoder: implemented heuristic to auto-detect start and end index 2020-03-09 20:08:05 +11:00
itsmattkc 965242cb29 oiiodecoder: set flag on image sequences to identify them as such 2020-03-09 19:55:35 +11:00
itsmattkc d12a0dca23 oiiodecoder: fixed mistake when using OIIO 1.x 2020-03-06 17:02:51 +11:00
itsmattkc d7f5584374 oiiodecoder: various improvements
Use start_time in VideoStream to determine the starting number of an image
sequence and use ImageBufAlgo::resample instead of ImageBufAlgo::resize for
faster image processing (since the quality with a divider is always expected
to be draft quality).
2020-03-02 14:32:36 +11:00
itsmattkc de5955b403 oiiodecoder: implemented rudimentary image sequence support 2020-03-02 14:06:44 +11:00
itsmattkc 83c5cd2bc1 oiiodecoder: made line backwards compatible with OIIO < 2.1.x 2020-02-27 16:03:56 +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 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 befaf34a4c oiiodecoder: use QStringLiteral()
Minor code improvement/optimization.
2020-02-21 14:21:53 +11:00
itsmattkc 3e776b62e1 oiiodecoder: added new mutex structures 2020-02-20 16:38:23 +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 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 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 22046535ca various: added hooks so that various lengthy functions could be cancelled from another thread 2020-02-17 02:10:12 +11:00
itsmattkc 5d58479f0a oiiodecoder: fixed erroneous processing of extension_list 2020-01-26 14:43:45 +11:00
itsmattkc 490a634473 oiiodecoder: fixed segfault caused by some OIIO decoders if they received
unexpected data

When "probing" footage, Olive runs it past all of its decoders until one
responds that it can decode this file. However this caused issues when some
OIIO decoders would erroneously pick up incompatible files, try to read them
and segfault the entire app (notable OpenJPEG with MPEG-4 and RLA with WAVE
audio). We now use the file extension to check with OIIO if it "should" be
compatible before actually testing if it is.

This is not a "perfect" solution (i.e. someone could recreate the segfault by
renaming an MPEG-4 file to an image extension like .JPG), but is probably as
much as can be done Olive-side and should filter out all segfaults under normal
circumstances.
2020-01-26 11:54:49 +11:00
itsmattkc 8b0c7edfec OIIO: added support for OIIO 1.x
OIIO 2.x uses std::unique_ptr while 1.x uses raw pointers. Olive can now handle
both, manually destroying the raw pointers when necessary if running on OIIO
1.x.
2020-01-26 11:33:45 +11:00
itsmattkc 75a9291cd2 refactored import function for greater robustness
The import function was written early on in the rewrite as a multithreaded
background task that was considered somewhat flawed. While it worked for the
most part, there were possibilities of race conditions that could have
potentially been fatal, particularly since media could theoretically be
deleted while the import/probe tasks were running in the background.

With the save/load functions coming in, it became even more complicated as
projects may include metadata about the footage that can't be implemented
easily when the footage is imported/probed in the background. Making importing
a modal task fixes all of these issues, it's still done in a background thread
to not hang the GUI thread, but the GUI thread can be briefly "paused" in a
user friendly way so that all these functions can be safer.
2020-01-15 15:19:14 +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 ee31da9e71 merged encoder and decoder code into one folder since they can share quite a bit of code 2019-12-21 20:03:25 +11:00