Commit Graph

7152 Commits

Author SHA1 Message Date
Martin Pulec
6bc837726d misc: removed unneeded MIN definition (already in misc.h) 2023-01-17 16:08:18 +01:00
Martin Pulec
fc0c6adae0 macOS: fixed Vulkan shader bundling/loading 2023-01-17 14:25:09 +01:00
Martin Pulec
41273b39da removed GUI dependency on fs.cpp
Now it would transitively depend on at least utils/{color_out,text},
which is perhaps not worth including.
2023-01-17 14:25:09 +01:00
Martin Pulec
e83fdcadb3 configure: link with libMoltenVK on macOS
+ install MoltenVK with CI
2023-01-17 14:25:09 +01:00
Martin Pulec
6c205e47e2 replaced special last_delim with generic strrpbrk
The latter one (variant to standard strpbrk but in a reverse order) can
be sed also in other code.
2023-01-17 14:25:06 +01:00
Martin Piatka
d3871758eb CI/Linux: Use 2.x branch for SDL_mixer
The master branch is now SDL3 and among other changes it now uses cmake
instead of autotools.
2023-01-17 13:31:54 +01:00
Martin Piatka
897fddad65 GUI: Fix crash when refreshing capabs while codec settings are open 2023-01-17 13:24:34 +01:00
Martin Pulec
21cc7be8c7 CI Linux: enable Vulkan
enabled Vulkan build on U18.04 runner
2023-01-17 08:56:32 +01:00
Martin Pulec
2688625746 Vulkan: replace std::byte with unsigned char
again, compat with U18.04
2023-01-17 08:56:31 +01:00
Martin Pulec
bf19c64b02 Vulkan: compat - do not use from_chars 2023-01-17 08:56:25 +01:00
Martin Pulec
d83ce18adc fixed data dir lookup (Vulkan)
In Windows, uv.exe is directly in top-level directory, not in "bin"
subdirectory. Thus, cut "bin" suffix only if there is any.

This fixes Vulkan shaders not being found - eg. "C:\UltraGrid\uv.exe"
resulted in shaders being searched in "C:\shaders"
(UltraGrid/../shaders).
2023-01-17 08:39:44 +01:00
Martin Pulec
789a4ad72b vulkan: accept "integate" and "discrete" for gpu
Currently, discrete GPU is always chosen if available but when display
is connected through a different GPU and the discrete card is NVIDIA,
colors are swapped as in #274. Detecting GPU with connected display is
not trivial and requires VK_KHR_display, which is not widely supported
by graphic drivers.

This is a small usability change that helps to workaround the problem by
allowing `:gpu=integrated` instead of passing the numeric index of the
card.
2023-01-16 12:32:55 +01:00
Martin Pulec
16584c3cf2 vulkan_sdl2: color output without rang.hpp 2023-01-16 12:32:48 +01:00
Martin Pulec
6105e7c3e5 lavc: set interlaced DCT for QSV
+ (re-)added option to enable interlaced DCT for NVENC (disabled by
  default because NVIDIA dropped the support for Ampere cards and above)
2023-01-16 10:50:57 +01:00
Martin Pulec
680ee52ebd lavc: enable interlaced DCT for libx264
Now it doesn't seem to increase frame variance as it used to with
current x264 and parameter set. On contrary, it improves visual quality
when there are motion and reduces compressed pictures' sizes on average.
2023-01-16 10:50:57 +01:00
Martin Pulec
535cb706d6 GL: do the deinterlacing in shaders
Deinterlacing now will be HW accelerated - this means lower latency and
increase of performance for codec for which the computation is complex,
like v210 and R10k.
2023-01-16 10:50:57 +01:00
Martin Pulec
a6ca815e9c GL: unified handling of DXT GLSL programs
Handle DXT-related (YUV->RGB) programs in the same way as the rest of
the shader programs.
2023-01-16 10:50:54 +01:00
Martin Piatka
c62f97c76f double_framerate: Fix build with -Werror=format-security
This flag is present when building the AUR package on Arch
2023-01-16 10:45:34 +01:00
Martin Piatka
ebee5aa583 capabilities: Remove unneeded cout flag and precision restoring
Flags and precision were set when reporting compression presets, but
that got removed.
2023-01-16 10:45:33 +01:00
Martin Pulec
481cc66821 video_pattern_generator: log "Fill rect" as debug
+ use logger where there hasn't been

The messages are not particulary useful and produce higher number of
lines on init so it would be better to use debug level.
2023-01-13 16:24:48 +01:00
Martin Pulec
7e0c77c434 print display mode by disp. module
Printout by video decoder might have been incorrect if there is a
postprocessor that changes properties, eg.:

    uv -t testcard:fps=50i -d gl -p double_framerate

printed 50i but display was actually set to 50p.
2023-01-13 15:53:37 +01:00
Martin Pulec
c4aa64c800 do not deinterlace progressive
until option "force" is given, do not deinterlace progressive video
2023-01-13 15:52:56 +01:00
Martin Pulec
13bdf14157 double-framerate: ported computation optimizations
ported optimizations from commit 3c1d075 below
2023-01-13 14:18:49 +01:00
Martin Pulec
b56897ed0d vo_postprocess: use logger 2023-01-13 14:17:59 +01:00
Martin Pulec
191c59512a deinterlacers: added (cmdline) documentation 2023-01-13 14:17:59 +01:00
Martin Pulec
0aa83eb334 vc_deinterlace_ex: optimize R10k, v210, R12L
At least a little optimization for slow codecs - these have fixed number
of iterations per pixel block so we can give a compiler an oppurtunity
to unroll and optimize.

speedup on i9-9820X - v210, R10k 8%; R12L 12%
2023-01-13 14:17:59 +01:00
Martin Pulec
755c6d1330 vc_deinterlace_ex: improved quality
instead of just interpolating between 2 lines and writing result to
both, average everytime line N with N+1 and write result to N:

    1 1 1 1        1A1A1A1A
    A A A A        A2A2A2A2
    2 2 2 2   ->   2B2B2B2B
    B B B B        B3B3B3B3
    3 3 3 3        3C3C3C3C
    C C C C        3C3C3C3C  (last 2 lines are the same)

Performance assessment - for SSE optimized pixel formats (8-bit ones)
the impact is small (5% on i9-9820X) - it is perhaps memory-bound and
adjacent lines stays in cache (each loop re-reads one used in previous
iteration). For v210, R10k and R12L the situation is worse and the
slow-down is around 90%.
2023-01-13 14:17:59 +01:00
Martin Pulec
52a8b1e821 vc_deinterlace_ex: added debug timer 2023-01-13 14:17:59 +01:00
Martin Piatka
26f51c2857 Update NEWS 2023-01-13 13:22:32 +01:00
Martin Piatka
6b08932038 capabilities: Remove old unused preset reporting 2023-01-13 13:12:22 +01:00
Martin Piatka
3563baa615 GUI: launch preview on ug exit 2023-01-13 12:20:07 +01:00
Martin Piatka
cc18861111 GUI: available_setting: Remove unused functionality 2023-01-13 12:20:06 +01:00
Martin Piatka
cddcfe9330 GUI: query capabilities line by line 2023-01-13 12:20:06 +01:00
Martin Piatka
0dfec28849 GUI: Fix codec settings refresh 2023-01-13 12:20:06 +01:00
Martin Piatka
bd2c7c9d17 GUI: Don't block on capabilities querying 2023-01-13 12:20:05 +01:00
Martin Piatka
63e7af8fc6 GUI: Rewrite launch manager using lambdas 2023-01-13 12:20:05 +01:00
Martin Piatka
900cd8fe9f jack: Do not automatically start jack server in probe
Jack does not wait for the server to exit completely on client_close(),
which causes a race condition when running uv with `--capabilities`:
when the jack playback device is probed right after probing the jack
capture device, jack still sees the terminating server and tries to
connect to it unsuccessfully 5 times in a row.

This changes reduces the time it takes for --capabilities to run by ~7
seconds, greately reducing the GUI startup time.
2023-01-13 12:20:05 +01:00
Martin Pulec
23e4c6ae7f deinterlace bob, linear: simplified + fixed 2023-01-13 10:09:39 +01:00
Martin Pulec
c35bfaf19a added deinterlace_linear
+ fixes for deinterlace_bob
2023-01-13 10:09:38 +01:00
Martin Pulec
4ddbda613d added deinterlace_bob 2023-01-13 10:09:38 +01:00
Martin Pulec
808b3de382 av_log_ug_callback: fixed incremental printout
FFmpeg doesn't always use to logger for whole lines, resulting in
smoething like:

    [lavc libx264 @ 0x6e93f000b280] Possible tunes:[lavc libx264 @ 0x6e93f000b280]  film[lavc libx264 @ 0x6e93f000b280]  animation[lavc libx264 @ 0x6e93f000b280]  grain[lavc libx264 @ 0x6e93f000b280]  stillimage[lavc libx264 @ 0x6e93f000b280]  psnr[lavc libx264 @ 0x6e93f000b280]  ssim[lavc libx264 @ 0x6e93f000b280]  fastdecode[lavc libx264 @ 0x6e93f000b280]  zerolatency[lavc libx264 @ 0x6e93f000b280]

So we should prefix only the line after <nl>.
2023-01-13 10:09:01 +01:00
Martin Pulec
3ebacd0eb0 deinterlace pp: rename to deinterlace_blend
to differentiate from other deinter modes
2023-01-12 16:25:56 +01:00
Martin Pulec
5d8e84fe06 vc_deinterlace_ex: support for R12L 2023-01-12 11:43:55 +01:00
Martin Pulec
8efdce2337 CI: fixed Windows natpmp build error
Fixes failed run  https://github.com/CESNET/UltraGrid/actions/runs/3894640814/jobs/6648919900.

cmd.exe script for unknown reason ceased to work, copied appropriate
parts of script to our script.

+ use shell debug flag for the script
2023-01-12 10:50:47 +01:00
Martin Pulec
94f51003f1 vc_deinterlace_ex: support for R10k 2023-01-11 17:17:58 +01:00
Martin Pulec
3154de0595 vc_deinterlace_ex: support for v210
+ fixed indexes for 16-bit codecs (used bytes but should use
  element-sized indices)
2023-01-11 16:51:49 +01:00
Martin Pulec
bab27db915 double_framerate fix
see 694b226 (1st point)
2023-01-11 16:38:50 +01:00
Martin Pulec
1affef29b7 vc_deinterlace_ex: support for other 8-bit and 16-bit pixfmts 2023-01-11 15:36:27 +01:00
Martin Pulec
ecb20902b7 SSE optimized vc_deinterlace_ex
now faster than vc_deinterlace

+ fixed possible error that has there been perhaps always when dst_pitch
  > src_linesize - after inner cycle, dst was incremented by
  (dst_pitch+src_linesize), not 2xdst_pitch
2023-01-11 14:51:03 +01:00
Martin Pulec
35eda1f7fa deinterlace pp.: removed wrong memcpy
The memcpy was there left after changing vc_deinterlice for
vc_deinterlace_ex but not only that it is not needed since it converts
directly to output buffer but also the output would get rewritten by the
input.
2023-01-11 14:03:00 +01:00