Commit Graph
365 Commits
Author SHA1 Message Date
itsmattkc ec8b046f02 viewer: implemented basic deinterlace
Implements a very basic GLSL deinterlace that simply halves the vertical
resolution and then interpolates between the fields. This can be toggled
on or off.

The reasons for being so basic is:
- Speed, very quick code running in OpenGL
- It would seem the highest quality deinterlacers are temporally based
  which doesn't make much sense for the viewer, particularly since we can't
  double the frame rate since our timecode is fixed to the frames.

Higher quality interlacing/deinterlacing will be present in the actual
renderer.
2020-08-11 02:02:50 +10:00
itsmattkc 75b4bfe57e viewer: clear current render queue before creating next queue
Hilariously, the queue was being cleared right after it was being set
thus cancelling the whole operation out. This has now been fixed.
2020-08-11 01:02:14 +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 edeeed49ba various: enabled config saving 2020-08-08 02:44:39 +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 07a53d45f0 renderer: updated audio waveform generated for new cache overhaul 2020-08-05 22:32:24 +10:00
itsmattkc c8def73b95 cache: mild auto-cache overhaul
Shifted from CacheTask to functionality built into RenderBackend. It was
a lot easier to control behavior this way without having to juggle a ton
of threads and race conditions.

Could likely be multithreaded further.
2020-08-05 02:19:04 +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 efd90d5c8f renderer: use shared backend when caching
I think there was an earlier commit with a similar name but turns out
I'd only done foundational work in that commit and never actually
properly set it up. Of course once I did, there were several issues that
needed fixing to make it work correctly, but now it works as expected.

Heavily optimizes larger projects by allowing cache jobs to only copy
what has changed.
2020-07-10 18:39:47 +10:00
itsmattkc e681b87988 curve/param/panels: leave curve panel open and have option for timebasedwidget to auto-set timebase 2020-06-23 05:22:58 +10:00
Thomas Wilshaw 389f230050 Properly fix translation errors in viewer
Original fix was wrong, this sorts it out I think. Delta values had to
be doubled as we're in Clip space (I think) and the matrix
multiplication order had to be swapped around.

Updated one of the signla/slot pairs to be simpler as we no longer need
to pass the zoom percentage back and forth.
2020-06-16 16:57:38 +01:00
Thomas Wilshaw 7617ddabe3 Fix translation bugs
The translation needs to be scaled relative to the zoom percentage so
we get sensible movement when dragging. Dragging is also disabled when
the image is smaller than the container widget.

Re-orders the initialisation of some variables to stop a compile
warning on Travis.
2020-06-16 11:53:37 +01:00
Thomas Wilshaw f6c70f583f Panning now only works if the viewier is zoomed 2020-06-16 11:53:36 +01:00
Thomas Wilshaw 2174100342 Add basic tranlation functionality to the viewer
Had to separate zoom and translate matrices to stop the zoom being
applied to itelf. This also required adding separate get/set functions
for each matrix and a GetcombinedMatrix() funtion.

Added those functions ot other files where needed ut may be wrong. Need
to look at export.cpp

Also changed the mouse move and press events to make translation work.
2020-06-16 11:53:34 +01:00
itsmattkc cf17bbc80b viewer: removed unnecessary background cache triggers
This was extremely aggressive and led to cache tasks that would return
even if you cancelled them. This should work a lot better.
2020-06-16 04:07:55 +10:00
itsmattkc cc463c7c60 viewer: allow temporarily suspending the auto-cache
While the auto-cache will always default to on, there are cases where the
user may not want the viewer to barrel ahead caching something (footage
viewer for instance or if the user is making a lot of changes in a short
amount of time).
2020-06-15 18:28:11 +10:00
itsmattkc 95dbeac8a5 viewer: don't show playback queue warning if past the video's end point 2020-06-15 15:42:49 +10:00
itsmattkc c80f72481d viewer: shortened re-cache wait interval 2020-06-12 03:31:49 +10:00
itsmattkc aa11fd2d04 viewer: cancel all render tickets when displaying a null texture
Fixes a race condition if a frame is requested shortly before moving to
the end of the timeline.
2020-06-11 21:26:49 +10:00
itsmattkc a9a13c4b0c framehashcache: remove code for saving integer-based frames to cache
Since we don't allow non-float cached frames now, there's no need to have
this code complicating the codebase.
2020-06-10 14:12:26 +10:00
itsmattkc 71ec148e76 renderer: moved all shader code into one solidified function
Makes texture-based optimizations easier when they're all in one place.
2020-06-10 01:54:02 +10:00
itsmattkc 52ca18d5e1 viewer: moved cached frame loading code so that more classes have access to it 2020-06-09 02:35:13 +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 550d30ed8f viewer: rewrote playback code for stability
The viewer playback used to rely primarily on the vsync, which was
extremely smooth, but had issues when there was only audio or the viewer
was hidden. This was bodged by attaching to the audio in these scenarios,
but still not perfect.

Now we run a timer in tandem with vsync for the best of both worlds.
Playback is no longer wholly reliant on vsync, yet the viewer can remain
as smooth as possible using vsync.
2020-06-06 00:20:06 +10:00
itsmattkc 2fd897c380 viewer: keep track of viewer length
Useful for determining if the view should be updated from a length change.
2020-06-05 04:31:44 +10:00
itsmattkc cc34f0e251 viewer: ensure view is updated if the cache is shifted
Also moves "ForceUpdate" to a queued connection so it occurs as soon as
the rest of the processing is done. This ensures the viewer isn't updated
too early.
2020-06-03 03:49:39 +10:00
itsmattkc 2e85197f6e viewer: round divider rather than ceil it
Improves default divider.
2020-06-01 04:46:43 +10:00
itsmattkc c1ed84b90e viewer: receive audio invalidation signal
Invalidates and runs cache task correctly even if there are no video
nodes connected.
2020-05-30 02:50:30 +10:00
itsmattkc 55cfae784b viewer: set automatic divider on connection
Probably not a permanent solution, but will aid performance for the
time-being.
2020-05-27 04:28:57 +10:00
itsmattkc 14ac1ada6e various: adding files missing in last commit
Oddly some files didn't commit previously. This commit adds those.
2020-05-27 03:24:37 +10:00
itsmattkc c907114b17 renderer: optimizing and fixing code paths
Re-introducing some old concepts for the new structure.
2020-05-26 22:40:54 +10:00
itsmattkc 85a7cae3ee cache: improved cache behavior when updating values or render parameters 2020-05-25 03:04:03 +10:00
itsmattkc efdf56acf8 cache: improved code pathways for cache
Viewers are now more aware of each other and can pause each others' cache tasks
when one of them plays, as well as wait for other viewers' cache tasks to
finish before starting their own.
2020-05-24 18:10:38 +10:00
itsmattkc 89ae6e026f cache: reimplemented auto-caching
Implemented a smarter auto-cache that's context sensitive. Caching will
automatically pause when playback begins or values are being changed and resume
when inactive.
2020-05-24 15:20:35 +10:00
itsmattkc 5b28070ed8 viewer: reimplemented playback queue warning
Not really sure why this was removed, must have been lost in the rewrite work.
2020-05-23 02:33:25 +10:00
itsmattkc 34fade9d81 cache: attempt to automatically re-match hashes on invalidate
This code is slow and unoptimized. Will require some more work.
2020-05-21 16:49:02 +10:00
itsmattkc cb72736f52 viewer: keep track of request order and ignore old requests
Prevents visual confusion with frames that were requested before the most recent
but arrived after.
2020-05-21 03:09:39 +10:00
itsmattkc d5766489e4 export: fixed audio exporting with new renderer system 2020-05-21 02:18:52 +10:00
itsmattkc 0dc548a97e viewer: fixed bugs in playback queue
Fixed issue that caused playback queue to desync and fallback to much slower
live playback.
2020-05-20 12:52:47 +10:00
itsmattkc 87e7564222 cache: heavily reworked exporting for new system
Also cleans up cache in general and moves it to the Task infrastructure.
2020-05-19 23:35:17 +10:00
itsmattkc 558773538d cache: fixed audio with new system 2020-05-18 17:16:28 +10:00
itsmattkc 814bbe8c22 fixed various segfaults in decoder and renderer 2020-05-18 02:40:58 +10:00
itsmattkc 53a2956350 cache: added cache task that can be manually invoked 2020-05-15 18:36:02 +10:00
itsmattkc 7c2280944b timeruler: reworked and improved cache status 2020-05-15 16:15:24 +10:00
itsmattkc 2039067fdc renderer/viewer: fixed playback and live updates from value changes 2020-05-15 15:02:30 +10:00
itsmattkc 8795e51452 renderer: massive overhaul to move to a vastly simplified threading system 2020-05-15 00:52:45 +10:00
itsmattkc 863ae1b913 a first attempt at a new render system 2020-05-14 14:43:03 +10:00
itsmattkc c5dfddff0d renderer: weaved out various unnecessary InvalidateVisible functions 2020-05-13 23:04:15 +10:00
itsmattkc 6ad5076160 viewer: added debug message if playback queue falls behind 2020-05-10 04:05:08 +10:00
itsmattkc 20ef7b1c21 viewer: fixed issue that would cause playback queue to stall 2020-05-09 16:21:03 +10:00