]> git.sesse.net Git - nageru/log
nageru
6 years agoMake the analyzer UI responsive.
Steinar H. Gunderson [Thu, 11 May 2017 21:46:40 +0000 (23:46 +0200)]
Make the analyzer UI responsive.

6 years agoFix issues with shutdown happening without a context.
Steinar H. Gunderson [Wed, 10 May 2017 19:32:38 +0000 (21:32 +0200)]
Fix issues with shutdown happening without a context.

Should also be cleaner with not having to delete and recreate
the Analyzer all the time.

6 years agoFix crashes on exit.
Steinar H. Gunderson [Wed, 10 May 2017 18:14:59 +0000 (20:14 +0200)]
Fix crashes on exit.

6 years agoGive the analyzer window a close button and such.
Steinar H. Gunderson [Wed, 10 May 2017 17:54:06 +0000 (19:54 +0200)]
Give the analyzer window a close button and such.

6 years agoFix the initial histogram display.
Steinar H. Gunderson [Wed, 10 May 2017 17:39:52 +0000 (19:39 +0200)]
Fix the initial histogram display.

6 years agoImplement the RGB histograms in the frame analyzer.
Steinar H. Gunderson [Wed, 10 May 2017 17:36:04 +0000 (19:36 +0200)]
Implement the RGB histograms in the frame analyzer.

Requires QCustomPlot.

6 years agoMake the sublabel under the grabbed frame a bit more dynamic.
Steinar H. Gunderson [Tue, 9 May 2017 20:07:30 +0000 (22:07 +0200)]
Make the sublabel under the grabbed frame a bit more dynamic.

6 years agoUpgrade to a version of bmusb with fixed FakeCapture colors.
Steinar H. Gunderson [Tue, 9 May 2017 07:37:39 +0000 (09:37 +0200)]
Upgrade to a version of bmusb with fixed FakeCapture colors.

Found using the new analyzer, actually :-)

6 years agoMake it possible to hover over the grabbed image to get out RGB values.
Steinar H. Gunderson [Tue, 9 May 2017 07:37:26 +0000 (09:37 +0200)]
Make it possible to hover over the grabbed image to get out RGB values.

6 years agoAdd a display of the grabbed frame to the analyzer window.
Steinar H. Gunderson [Mon, 8 May 2017 22:20:31 +0000 (00:20 +0200)]
Add a display of the grabbed frame to the analyzer window.

6 years agoAdd a preview display to the frame analyzer window.
Steinar H. Gunderson [Mon, 8 May 2017 21:58:02 +0000 (23:58 +0200)]
Add a preview display to the frame analyzer window.

6 years agoStart working on a frame analyzer.
Steinar H. Gunderson [Mon, 8 May 2017 17:55:30 +0000 (19:55 +0200)]
Start working on a frame analyzer.

The idea is that this will be able to show a histogram and a
color picker. So far, we have some logic to grab a frame,
and that's it.

6 years agoExpose the video input signals to the theme, so that they can ask for connection...
Steinar H. Gunderson [Sat, 29 Apr 2017 21:21:30 +0000 (23:21 +0200)]
Expose the video input signals to the theme, so that they can ask for connection status etc.

6 years agoWhen we get an FFmpeg error, send a blank frame to tell the theme about the disconnec...
Steinar H. Gunderson [Sat, 29 Apr 2017 21:01:32 +0000 (23:01 +0200)]
When we get an FFmpeg error, send a blank frame to tell the theme about the disconnection.

7 years agoSupport other audio sample rates than 48000 Hz from bmusb.
Steinar H. Gunderson [Fri, 28 Apr 2017 23:45:51 +0000 (01:45 +0200)]
Support other audio sample rates than 48000 Hz from bmusb.

7 years agoGive the x264 thread a name.
Steinar H. Gunderson [Sun, 23 Apr 2017 18:38:56 +0000 (20:38 +0200)]
Give the x264 thread a name.

7 years agoFix an assertion failure when moving an input from non-interlacing to interlaced.
Steinar H. Gunderson [Sat, 22 Apr 2017 18:12:34 +0000 (20:12 +0200)]
Fix an assertion failure when moving an input from non-interlacing to interlaced.

7 years agoAdd an option to record to another directory than the current one.
Steinar H. Gunderson [Sat, 22 Apr 2017 10:52:22 +0000 (12:52 +0200)]
Add an option to record to another directory than the current one.

7 years agoInitialize FFmpeg networking correctly.
Steinar H. Gunderson [Fri, 21 Apr 2017 22:57:28 +0000 (00:57 +0200)]
Initialize FFmpeg networking correctly.

7 years agoFix an issue where RGBA videos would flicker.
Steinar H. Gunderson [Fri, 21 Apr 2017 22:55:17 +0000 (00:55 +0200)]
Fix an issue where RGBA videos would flicker.

The issue would be that the preview chains and the live chain would often
have different sRGB texture needs, and they'd run at the same time and thus
have a race condition. Solve this by using a sampler object instead, which
overrides the texture state.

7 years agoChange from RGBA to BGRA; slightly more Intel GPU-friendly, and Caspar uses that...
Steinar H. Gunderson [Fri, 21 Apr 2017 18:19:00 +0000 (20:19 +0200)]
Change from RGBA to BGRA; slightly more Intel GPU-friendly, and Caspar uses that format.

7 years agoDon't crash on invalid frame rates from FFmpeg.
Steinar H. Gunderson [Thu, 20 Apr 2017 22:16:28 +0000 (00:16 +0200)]
Don't crash on invalid frame rates from FFmpeg.

7 years agoMove some common FFmpeg utilities out into a shared file, instead of having them...
Steinar H. Gunderson [Fri, 14 Apr 2017 23:52:05 +0000 (01:52 +0200)]
Move some common FFmpeg utilities out into a shared file, instead of having them in ImageInput.

7 years agoSupport changing video files underway, just like images.
Steinar H. Gunderson [Fri, 14 Apr 2017 17:27:07 +0000 (19:27 +0200)]
Support changing video files underway, just like images.

7 years agoFactor out rewinding code in its own member function.
Steinar H. Gunderson [Fri, 14 Apr 2017 16:12:27 +0000 (18:12 +0200)]
Factor out rewinding code in its own member function.

7 years agoMake some more sleeps interruptable.
Steinar H. Gunderson [Fri, 14 Apr 2017 15:03:02 +0000 (17:03 +0200)]
Make some more sleeps interruptable.

The pattern has now been encapsulated into a class of its own.

7 years agoRemove a now obsolete comment.
Steinar H. Gunderson [Fri, 14 Apr 2017 10:20:31 +0000 (12:20 +0200)]
Remove a now obsolete comment.

7 years agoAdd support for changing the playback rate.
Steinar H. Gunderson [Fri, 14 Apr 2017 10:19:23 +0000 (12:19 +0200)]
Add support for changing the playback rate.

7 years agoAdd a Lua function to rewind the video.
Steinar H. Gunderson [Thu, 13 Apr 2017 23:04:32 +0000 (01:04 +0200)]
Add a Lua function to rewind the video.

7 years agoAdd support for FFmpeg inputs.
Steinar H. Gunderson [Wed, 12 Apr 2017 17:06:48 +0000 (19:06 +0200)]
Add support for FFmpeg inputs.

This has a variety of uses; most notably to play video, but it can
also be used to feed a CasparCG feed into Nageru. For this reason,
it uses RGBA as a format (for now), not Y'CbCr. There are some
limitations, but hopefully we can figure them out eventually.

7 years agoMake search_for_file() understand URLs.
Steinar H. Gunderson [Wed, 12 Apr 2017 17:04:46 +0000 (19:04 +0200)]
Make search_for_file() understand URLs.

7 years agoReplace the is_fake_capture parameter with a more descriptive and flexible enum.
Steinar H. Gunderson [Tue, 11 Apr 2017 21:36:19 +0000 (23:36 +0200)]
Replace the is_fake_capture parameter with a more descriptive and flexible enum.

7 years agoMake sure our uploaded RGBA textures can deal with being asked for linear gamma.
Steinar H. Gunderson [Tue, 11 Apr 2017 19:53:00 +0000 (21:53 +0200)]
Make sure our uploaded RGBA textures can deal with being asked for linear gamma.

They still are not used for anything, though.

7 years agoMove NonBouncingYCbCrInput into its own header file.
Steinar H. Gunderson [Tue, 11 Apr 2017 19:40:46 +0000 (21:40 +0200)]
Move NonBouncingYCbCrInput into its own header file.

7 years agoAdd support for RGBA frame types.
Steinar H. Gunderson [Sat, 8 Apr 2017 22:52:33 +0000 (00:52 +0200)]
Add support for RGBA frame types.

Nothing produces such frames yet, but now, we would be capable of
receiving them.

7 years agoGive frames a pixel format.
Steinar H. Gunderson [Sat, 8 Apr 2017 20:52:18 +0000 (22:52 +0200)]
Give frames a pixel format.

This is preliminary work towards supporting frames with alpha.
It generally reduces the dependency on the global --10-bit-input
flag a bit, which is also a good thing.

7 years agoMake search_for_file() understand absolute paths.
Steinar H. Gunderson [Wed, 12 Apr 2017 16:58:28 +0000 (18:58 +0200)]
Make search_for_file() understand absolute paths.

7 years agoMake search_for_file (in ImageInput) available to the rest of the code.
Steinar H. Gunderson [Wed, 12 Apr 2017 16:53:26 +0000 (18:53 +0200)]
Make search_for_file (in ImageInput) available to the rest of the code.

7 years agoRemove the declaration of a nonexisting member function.
Steinar H. Gunderson [Mon, 10 Apr 2017 19:10:56 +0000 (21:10 +0200)]
Remove the declaration of a nonexisting member function.

7 years agoComment LiveInputWrapper slightly better.
Steinar H. Gunderson [Sat, 8 Apr 2017 15:50:19 +0000 (17:50 +0200)]
Comment LiveInputWrapper slightly better.

7 years agoRelease Nageru 1.5.0. 1.5.0
Steinar H. Gunderson [Wed, 5 Apr 2017 21:27:04 +0000 (23:27 +0200)]
Release Nageru 1.5.0.

7 years agoSpelling fix.
Steinar H. Gunderson [Mon, 3 Apr 2017 21:31:07 +0000 (23:31 +0200)]
Spelling fix.

7 years agoMake the mixer much less noisy when dealing with frame rate mismatches.
Steinar H. Gunderson [Wed, 5 Apr 2017 20:14:24 +0000 (22:14 +0200)]
Make the mixer much less noisy when dealing with frame rate mismatches.

7 years agoMake a friendlier error message if OpenGL initialization fails.
Steinar H. Gunderson [Sat, 1 Apr 2017 18:30:06 +0000 (20:30 +0200)]
Make a friendlier error message if OpenGL initialization fails.

7 years agoMovit 1.5.0 is released.
Steinar H. Gunderson [Wed, 22 Mar 2017 17:03:10 +0000 (18:03 +0100)]
Movit 1.5.0 is released.

7 years agoFix secondary output from TimecodeRenderer; it was not updated for RGBA updates going...
Steinar H. Gunderson [Fri, 17 Mar 2017 19:03:31 +0000 (20:03 +0100)]
Fix secondary output from TimecodeRenderer; it was not updated for RGBA updates going away. It somehow worked by accident, though.

7 years agoFix timecode rendering for 10-bit output.
Steinar H. Gunderson [Fri, 17 Mar 2017 18:59:42 +0000 (19:59 +0100)]
Fix timecode rendering for 10-bit output.

7 years agoIf not using VA-API zerocopy, don't write extra copy textures.
Steinar H. Gunderson [Thu, 16 Mar 2017 18:43:11 +0000 (19:43 +0100)]
If not using VA-API zerocopy, don't write extra copy textures.

Saves some precious memory bandwidth.

7 years agoSupport CRF for x264, similar to the CQP mode we already use in Quick Sync Video.
Steinar H. Gunderson [Wed, 15 Mar 2017 22:55:06 +0000 (23:55 +0100)]
Support CRF for x264, similar to the CQP mode we already use in Quick Sync Video.

7 years agoSupport 4:2:2 v210 (10-bit) output for DeckLink.
Steinar H. Gunderson [Wed, 15 Mar 2017 22:07:24 +0000 (23:07 +0100)]
Support 4:2:2 v210 (10-bit) output for DeckLink.

This again requires compute shaders; my GTX 950 needs a bit under 0.1 ms
to convert a 720p frame from the 16-bit planar representation. It replaces the
flag for 10-bit x264.

v210 is, as far as I understand, pretty much the native format for the DeckLink
cards, but I believe the conversion happens in hardware, so there shouldn't
be any significant speed gains to be have.

7 years agoSupport 10-bit x264 output.
Steinar H. Gunderson [Mon, 13 Mar 2017 22:55:11 +0000 (23:55 +0100)]
Support 10-bit x264 output.

Requires a 10-bit-compiled x264. Probably breaks DeckLink output for now.

7 years agoSupport loading 10-bit x264 dynamically.
Steinar H. Gunderson [Mon, 13 Mar 2017 20:55:02 +0000 (21:55 +0100)]
Support loading 10-bit x264 dynamically.

7 years agoAdd support for recording the x264 video to disk.
Steinar H. Gunderson [Mon, 13 Mar 2017 18:05:37 +0000 (19:05 +0100)]
Add support for recording the x264 video to disk.

This makes recording entirely independent on Quick Sync Video
(or VA-API, if you wish). There's no way of running two separate
x264 encodes, though; you get the same as for the stream.

7 years agoRemoved an obsolete TODO.
Steinar H. Gunderson [Sat, 11 Mar 2017 15:47:15 +0000 (16:47 +0100)]
Removed an obsolete TODO.

7 years agoFix a fence that was not waited on correctly in the DeckLink output.
Steinar H. Gunderson [Fri, 10 Mar 2017 21:12:55 +0000 (22:12 +0100)]
Fix a fence that was not waited on correctly in the DeckLink output.

7 years agoSupport switching Y'CbCr coefficients midway, which will allow doing the Right Thing...
Steinar H. Gunderson [Wed, 8 Mar 2017 22:54:46 +0000 (23:54 +0100)]
Support switching Y'CbCr coefficients midway, which will allow doing the Right Thing(TM) (BT.601 when you can for greater stream compatibility, BT.709 when you must for HDMI/SDI output) automatically.

7 years agoDisplay a copy of the Y'CbCr images instead of an RGB565 copy.
Steinar H. Gunderson [Wed, 8 Mar 2017 00:11:35 +0000 (01:11 +0100)]
Display a copy of the Y'CbCr images instead of an RGB565 copy.

This is both higher-quality (the 16-bit artifacts were getting rather
annoying), more true to what's actually being output, _and_ higher performance
(well, at least lower memory bandwidth; I haven't benchmarked in practice),
since we can use multi-output to make extra copies on-the-fly when writing
instead of doing it explicitly. Sample calculation for a 1280x720 image; let's
say it is one megapixel for ease of calculation:

  GL_565:  2 MB written (565 texture), 2 MB read during display = 4 MB used
  Y'CbCr:  1.0 + 0.5 MB written (Y' texture plus half-res dual-channel CbCr texture),
           same amount read during display = 3 MB used

We could have reused the full-resolution CbCr texture, saving the 0.5 MB
write, but that make the readback 3 MB instead of 1.5 MB, so it's a net loss.

Ideally, we'd avoid the copies altogether, cutting the writes away
and getting to 1.5 MB, but interactions with VA-API zerocopy seemingly
made that impossible.

7 years agoRemove a dead code line.
Steinar H. Gunderson [Wed, 1 Mar 2017 19:25:17 +0000 (20:25 +0100)]
Remove a dead code line.

Found by Coverity Scan.

7 years agoMake the API for begin_frame()/end_frame() in VideoEncoder a bit more sensible.
Steinar H. Gunderson [Mon, 27 Feb 2017 22:18:24 +0000 (23:18 +0100)]
Make the API for begin_frame()/end_frame() in VideoEncoder a bit more sensible.

7 years agoCorrect a comment.
Steinar H. Gunderson [Mon, 27 Feb 2017 22:06:30 +0000 (23:06 +0100)]
Correct a comment.

7 years agoMake QuickSync surfaces be allocated dynamically.
Steinar H. Gunderson [Sun, 26 Feb 2017 22:24:01 +0000 (23:24 +0100)]
Make QuickSync surfaces be allocated dynamically.

Instead of specifying that frame N always uses surface N % 16,
we allocate dynamically from a pool. This both makes a lot more
sense, and also allows us to hold onto surfaces for other reasons
(like that we want to render _from_ them) in a future patch.

This also necessitated explicit usage tracking of reference frames
in order to avoid display corruption (you can't reuse a surface
before its dependent frames are also done rendering); I'm unsure
if this actually was correct before, but it's possible that the
implicit serialization made sure it actually was, because I've
run the existing code pretty hard before without seeing reference
frame corruption.

7 years agoIn QuickSyncEncoderImpl, make RefPicList* local variables; no need to hold permanent...
Steinar H. Gunderson [Sun, 26 Feb 2017 21:28:21 +0000 (22:28 +0100)]
In QuickSyncEncoderImpl, make RefPicList* local variables; no need to hold permanent state for them.

7 years agobmusb 0.6.0 is in experimental.
Steinar H. Gunderson [Sat, 25 Feb 2017 10:03:28 +0000 (11:03 +0100)]
bmusb 0.6.0 is in experimental.

7 years agoFix an issue where our v210 texture would be too narrow, since there are two differen...
Steinar H. Gunderson [Sun, 26 Feb 2017 17:14:41 +0000 (18:14 +0100)]
Fix an issue where our v210 texture would be too narrow, since there are two different conventions for the width.

7 years agoUnbreak 10-bit input on NVIDIA.
Steinar H. Gunderson [Sun, 26 Feb 2017 15:50:23 +0000 (16:50 +0100)]
Unbreak 10-bit input on NVIDIA.

7 years agoFix an issue where the v210 input texture would have an inefficient width.
Steinar H. Gunderson [Sun, 26 Feb 2017 15:47:50 +0000 (16:47 +0100)]
Fix an issue where the v210 input texture would have an inefficient width.

7 years agoMake sure we do not ask for sRGB backbuffers when rendering to screen.
Steinar H. Gunderson [Sun, 26 Feb 2017 15:18:00 +0000 (16:18 +0100)]
Make sure we do not ask for sRGB backbuffers when rendering to screen.

7 years agoDo not try to stop and restart on DeckLink mode switch if we are not running.
Steinar H. Gunderson [Sun, 26 Feb 2017 15:17:45 +0000 (16:17 +0100)]
Do not try to stop and restart on DeckLink mode switch if we are not running.

7 years agoAdd a copy of the right-click HDMI/SDI output video menu on the main menu bar.
Steinar H. Gunderson [Sat, 25 Feb 2017 09:36:50 +0000 (10:36 +0100)]
Add a copy of the right-click HDMI/SDI output video menu on the main menu bar.

7 years agoSupport 10-bit capture, both on bmusb and on DeckLink drivers.
Steinar H. Gunderson [Tue, 21 Feb 2017 17:42:26 +0000 (18:42 +0100)]
Support 10-bit capture, both on bmusb and on DeckLink drivers.

7 years agoRemove an assert that no longer holds.
Steinar H. Gunderson [Tue, 21 Feb 2017 16:48:58 +0000 (17:48 +0100)]
Remove an assert that no longer holds.

7 years agoRefactor upload_func by splitting out some helper functions.
Steinar H. Gunderson [Sun, 19 Feb 2017 16:45:15 +0000 (17:45 +0100)]
Refactor upload_func by splitting out some helper functions.

7 years agoSet num_levels correctly on the input format.
Steinar H. Gunderson [Sun, 19 Feb 2017 15:59:26 +0000 (16:59 +0100)]
Set num_levels correctly on the input format.

7 years agoMake DeckLinkCapture work with non-interleaved buffers.
Steinar H. Gunderson [Sun, 19 Feb 2017 15:56:42 +0000 (16:56 +0100)]
Make DeckLinkCapture work with non-interleaved buffers.

7 years agoMake ImageInput shutdown immediate, instead of waiting for the sleep to time out.
Steinar H. Gunderson [Sun, 12 Feb 2017 19:11:23 +0000 (20:11 +0100)]
Make ImageInput shutdown immediate, instead of waiting for the sleep to time out.

7 years agoFix so one can use images with other resolutions than 1280x720.
Steinar H. Gunderson [Sun, 12 Feb 2017 19:03:21 +0000 (20:03 +0100)]
Fix so one can use images with other resolutions than 1280x720.

7 years agoIf we get a buffer underrun on resampling, reset the loop filter, since it probably...
Steinar H. Gunderson [Sun, 12 Feb 2017 18:36:56 +0000 (19:36 +0100)]
If we get a buffer underrun on resampling, reset the loop filter, since it probably contains bad data.

7 years agoAdd a switch for writing a timecode to the stream; useful for latency debugging.
Steinar H. Gunderson [Sun, 12 Feb 2017 18:23:08 +0000 (19:23 +0100)]
Add a switch for writing a timecode to the stream; useful for latency debugging.

7 years agoFix --input-mapping= crashing on startup.
Steinar H. Gunderson [Sat, 11 Feb 2017 18:41:21 +0000 (19:41 +0100)]
Fix --input-mapping= crashing on startup.

7 years agoFix an issue with the correction factor locking to 0.95.
Steinar H. Gunderson [Sat, 11 Feb 2017 18:22:36 +0000 (19:22 +0100)]
Fix an issue with the correction factor locking to 0.95.

Basically what was happening is that if the master card lost
or corrupted a frame, which we didn't set a timestamp on,
causing it to have steady_clock::time_point::min(). This would
in turn cause us to assume a latency of trillions of seconds,
throwing off the filter and essentially making it be 0.95 forever.

The fix is twofold; we always set timestamps, but also make
ourselves robust to the ones that are way off (negative uptime).

7 years agoIgnore data from MIDI through; it causes us to basically go into an infinite loop.
Steinar H. Gunderson [Sat, 11 Feb 2017 18:22:18 +0000 (19:22 +0100)]
Ignore data from MIDI through; it causes us to basically go into an infinite loop.

7 years agoIn the MIDI mapper, handle lost events without exiting the thread.
Steinar H. Gunderson [Sat, 11 Feb 2017 18:15:54 +0000 (19:15 +0100)]
In the MIDI mapper, handle lost events without exiting the thread.

7 years agoFix a compiler warning.
Steinar H. Gunderson [Fri, 10 Feb 2017 23:51:22 +0000 (00:51 +0100)]
Fix a compiler warning.

7 years agoFix a variable name.
Steinar H. Gunderson [Fri, 10 Feb 2017 23:51:16 +0000 (00:51 +0100)]
Fix a variable name.

7 years agoAllow adjusting the maximum input queue length by a command-line flag.
Steinar H. Gunderson [Fri, 10 Feb 2017 19:58:50 +0000 (20:58 +0100)]
Allow adjusting the maximum input queue length by a command-line flag.

7 years agoAdd a missing OPTION_ prefix to some enums.
Steinar H. Gunderson [Fri, 10 Feb 2017 18:49:14 +0000 (19:49 +0100)]
Add a missing OPTION_ prefix to some enums.

7 years agoWhen the output card is active, disable the controls to change the master clock ...
Steinar H. Gunderson [Fri, 10 Feb 2017 23:45:05 +0000 (00:45 +0100)]
When the output card is active, disable the controls to change the master clock -- it is locked anyway.

7 years agoRefactor QueueLengthPolicy.
Steinar H. Gunderson [Fri, 10 Feb 2017 00:07:24 +0000 (01:07 +0100)]
Refactor QueueLengthPolicy.

In particular, dropped frames are now counted as part of the queue length.

7 years agoDefault to SMPTE Level A if possible; Level B is uncommon and has problems with at...
Steinar H. Gunderson [Wed, 8 Feb 2017 21:05:44 +0000 (22:05 +0100)]
Default to SMPTE Level A if possible; Level B is uncommon and has problems with at least my SDI->HDMI converter on 3G-SGI video formats.

7 years agoMake it possible to choose the DeckLink output video mode through the GUI.
Steinar H. Gunderson [Wed, 8 Feb 2017 20:38:12 +0000 (21:38 +0100)]
Make it possible to choose the DeckLink output video mode through the GUI.

7 years agoSmall optimization.
Steinar H. Gunderson [Tue, 7 Feb 2017 17:41:16 +0000 (18:41 +0100)]
Small optimization.

7 years agoOn first input, special-case too large queue, not just too small.
Steinar H. Gunderson [Mon, 6 Feb 2017 23:48:22 +0000 (00:48 +0100)]
On first input, special-case too large queue, not just too small.

Fixes problems with low delay and an output timer that starts pretty
slowly (e.g. the HDMI/SDI output timer).

7 years agoRework the audio/video sync algorithm.
Steinar H. Gunderson [Thu, 2 Feb 2017 23:03:58 +0000 (00:03 +0100)]
Rework the audio/video sync algorithm.

It turns out I've been misunderstanding parts of Fons' paper;
my estimation is different, and although it works surprisingly well
for something that's hardly supposed to work at all, it has some
significant problems with edge cases like frame rates being _nearly_
off (e.g. 59.94 Hz input on a 60 Hz output); the estimated delay
under the old algorithm will be a very slow sawtooth, which isn't
nice even after being passed through the filter.

The new algorithm probably still isn't 100% identical to zita-ajbridge,
but it should be much closer to how the algorithm is intended to work.
In particular, it makes a real try to understand that an output frame
can arrive between two input frames in time; this makes it dependent
on the system clock, but that's really the core that was missing from
the algorithm, so it's really more a feature than a bug.

I've made some real attempts at making all the received timestamps
more stable; FakeCapture is a bit odd still (especially at startup)
since it has its thing of just doing frames late instead of dropping
them, but it generally seems to work OK. For cases of frame rate
mismatch (even pretty benign ones), the correction rate seems to be
two orders of magnitude more stable, i.e., the maximum difference
from 1.0 during normal operation is greatly reduced.

7 years agoUpgrade bmusb to get more stable FakeCapture timestamps.
Steinar H. Gunderson [Wed, 1 Feb 2017 23:49:13 +0000 (00:49 +0100)]
Upgrade bmusb to get more stable FakeCapture timestamps.

7 years agoDo not try to adjust the audio timer during HDMI/SDI output preroll.
Steinar H. Gunderson [Sun, 29 Jan 2017 00:08:06 +0000 (01:08 +0100)]
Do not try to adjust the audio timer during HDMI/SDI output preroll.

7 years agoFix so setting of output cards from the command line works again.
Steinar H. Gunderson [Thu, 26 Jan 2017 19:29:11 +0000 (20:29 +0100)]
Fix so setting of output cards from the command line works again.

7 years agoAdd a menu entry to go to the online manual.
Steinar H. Gunderson [Wed, 25 Jan 2017 23:49:54 +0000 (00:49 +0100)]
Add a menu entry to go to the online manual.

7 years agoAdd a beginning UI to switch HDMI/SDI outputs live.
Steinar H. Gunderson [Wed, 25 Jan 2017 23:34:01 +0000 (00:34 +0100)]
Add a beginning UI to switch HDMI/SDI outputs live.

7 years agoWhen switching output cards, do it from the mixer thread.
Steinar H. Gunderson [Wed, 25 Jan 2017 22:45:02 +0000 (23:45 +0100)]
When switching output cards, do it from the mixer thread.

This is a _lot_ easier to reason about (and also much more stable
in practice), but we're still having some issues with delays
on disabling video input.

7 years agoName the ImageInput update threads, too.
Steinar H. Gunderson [Wed, 25 Jan 2017 18:25:44 +0000 (19:25 +0100)]
Name the ImageInput update threads, too.