Commit Graph
50 Commits
Author SHA1 Message Date
itsmattkc 94c0914e50 codec system rework
Codecs are now much cleaner and thread safe by design.
2020-11-10 11:23:25 +11:00
itsmattkc 1e6208517f decoder: fixed regression in image handling in OIIO decoder
Fixes #1277
2020-10-27 12:36:55 +11:00
itsmattkc bc60c74562 finalized very, very basic OTIO support
Ironed out various project and footage loading issues, and a single
cache invalidation issue.
2020-10-23 01:26:17 +11:00
itsmattkc 6db591e89f footage: merge video and image streams and improve image sequence import process
Image streams were initially separated from video streams, but they're now
joined with a parameter defining if they're a still image, image sequence,
or regular video. The image sequence import process has also improved so
that if images from the same sequence are imported too, they'll either be
ignored or the user won't be asked again for those if they should be an
image sequence (fixes #1193). Also shifts decoder "probe" process to return
an item, useful if the decoder returns a non-footage item.
2020-09-26 19:45:07 +10:00
itsmattkc 7bdaf78af8 oiio: assume it's not an image sequence if the dimensions aren't equal 2020-09-21 12:21:17 +10:00
itsmattkc e42ba3f9d4 corrected compile issues on xenial (should fix linux CI) 2020-08-30 13:35:00 +10:00
itsmattkc d9851dc329 decoders: mild refactoring and code cleanup
Just making things a little bit nicer.
2020-08-18 03:17:01 +10:00
itsmattkc 4f1e7ea4ef oiio: fixed incorrect version namespace 2020-08-10 02:54:03 +10:00
itsmattkc 28dcff10c0 various: implement sequence pixel aspect ratios and interlacing settings
Implements the following:
- Sequences have pixel aspect ratios that work in tandem with footage PARs
  to render footage correctly. Viewer and export also acknowledge PARs
- Sequences can have interlacing settings. This doesn't do anything yet,
  eventually the renderer will need to interlace/deinterlace/reinterlace
  appropriately in order to conform all the footage to the sequence. Export
  acknowledges interlacing, but this only affects metadata, not the image.
2020-08-10 01:47:26 +10:00
itsmattkc df14c2aaa7 cache: better implemented changing disk cache folders
Not complete yet, but getting there.
2020-08-07 02:31:46 +10:00
itsmattkc fb05594b50 various: allow setting footage aspect ratios
We had support for detecting aspect ratios and respecting them in the
render, but this allows people to not only see the aspect ratio in use,
but also override it with their own.
2020-07-25 00:58:01 +10:00
itsmattkc b456b6b0f6 oiiodecoder: make sure spec is used instead of basetype
Fixed issue with image alpha handling.
2020-06-17 19:53:21 +10:00
itsmattkc a871c5081b nodeparamtable: bare bones table view for node inputs 2020-06-17 17:48:07 +10:00
itsmattkc 9095dfa463 project: replaced proxy with pre-cache
Removed proxy task and replaced with a true honest-to-god pre-cache for
footage. This footage is pre-cached to a sequence and therefore 100% ready
for use in it once the task is done.
2020-06-08 23:17:51 +10:00
itsmattkc 430561e2ac sequence: made divider a sequence parameter rather than a viewer parameter
Doing this makes the preview resolution an explicit project setting rather
than a temporary UI setting. This will allow more consistency when caching.
2020-06-08 14:41:35 +10:00
itsmattkc fb625cb76e nodes: removed XML infrastructure 2020-05-06 15:06:37 +10:00
itsmattkc 2b1640ac04 frame/texture: use dividers when allocating buffers
Allows render pipeline to know the "real" and "simulated" resolution of a
divided buffer.
2020-05-04 01:08:46 +10:00
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