Commit Graph

9459 Commits

Author SHA1 Message Date
Martin Pulec
febff7d093 Revert "vcomp/lavc libsvtav1: do not set pred_struct=1"
This reverts commit fa8bb8ca8e.

Actually this worsened the behavior significantly by increasing the
latency in the order of 100 frames (depending on properties). This
(currently) disallows setting the bitrate, using CRF/CQP is only possible
because the FFmpeg plugin isn't able to set CBR for now.
2024-07-09 14:56:26 +02:00
Martin Pulec
c445c6fd5e vcomp/lavc: set CRF=35 for libsvtav1 by default
This will allow running libsvtav1 with pred_struct=1.
2024-07-09 14:53:53 +02:00
Martin Pulec
5281fbc4a8 vcomp/lavc: set forced-idr directly
set_forced_idr function was unnecessary - the error handling can now
do chec_av_opt_set(). Moreover it prints out the setting to std output
even when succeeded.
2024-07-09 12:30:43 +02:00
Martin Pulec
7b0c7f3224 vcomp/lavc: use check_av_opt_set for svtav1-params
it also prints value set in UG output (and handles errors as well)
2024-07-09 10:14:38 +02:00
Martin Pulec
89b173ba2b AppImage: option --ug-help for UG help
If run from within the AppImage, -h shows help of the AppImage wrapper
itself, not the one of UltraGrid. So add --ug-help as an alternative for
`-o uv -h`.

First considered was a shortopt -H, but this is currently mapped by UG
for --full-help (which can be used directly), so keep the long variant
in order not to make it confusing.
2024-07-09 09:27:19 +02:00
Martin Pulec
446fac2b0d Win 10 term warn: don't print if stdout isn't tty
The terminal warning is neadlessly printed eg. in the GUI.
2024-07-08 16:45:38 +02:00
Martin Pulec
e9eceebbcc vdisp/gl: print actual GL version in verbose 2024-07-08 16:45:38 +02:00
Martin Pulec
4654300cab pixfmt_conv: fixed clang warnings
alignment + loop not vectorized
2024-07-08 16:45:38 +02:00
Martin Pulec
cf87430666 keyboard_control: improved including 2024-07-08 16:45:38 +02:00
Martin Piatka
af4090a305 capture/dshow: Add workaround for OBS virtual camera 2024-07-08 16:04:21 +02:00
Martin Piatka
8f6c5fb81e CI Win: Install VC 2010 Redist 2024-07-08 16:04:21 +02:00
Martin Piatka
2f601f5ccd CI Win: Dependencies for screen capture 2024-07-08 16:04:20 +02:00
Martin Pulec
e52dffac5e src/audio/playback/alsa.c: todo for get_sched_latency_ns
returns now always -1, suggesting removal
2024-07-08 10:21:01 +02:00
Martin Pulec
855c0e850f audio_decoders: ensure fec decode length
CID 464486
2024-07-08 10:21:00 +02:00
Martin Pulec
bc68c877e4 vdisp/deck: fixed CID 464484 2024-07-08 10:21:00 +02:00
Martin Pulec
3b47570f61 vcomp/rtdxt: s/DXT1/DXT1_YUV
Doesn't matter, anyways, because the value is the same for both but just
to be nicer and fix CID 464479.
2024-07-08 10:21:00 +02:00
Martin Pulec
4e4afe8496 module.c dump_tree: unlock the mutex
this fixes CID 464474

Although quite serious, this didn't exhibit problem so far, because:

1. dump_tree is not so much often called
2. the mutex is recursive (doubtfull if it won't be better if they
weren't), so that this will be tolerant to re-locking from the same thread
2024-07-08 10:21:00 +02:00
Martin Pulec
e3a2f81264 vdisp/file: fixed correctly the lock problem
Fixed correctly the problem that was incorrectly attempted by the
previous commit revert. should_exit doesn't need to be checked with the
main while loop because it is done by the inner one.
2024-07-08 10:21:00 +02:00
Martin Pulec
0484544105 Revert "display/file: fixed CID 424197/1"
This reverts commit 517bef3dd1.

The fix was incorrect, causing also new CID 464471.
2024-07-08 10:21:00 +02:00
Martin Pulec
6311f3f196 slightly reordered keyboard_control to make Coverity happy
refers to CID 464439

Actually not much important - the m_started variable is not shared across
threads but should be used only from within the main thread (start()
stop() member functions).
2024-07-08 10:20:49 +02:00
Martin Piatka
84993c4fd9 screen_win: Print error msg when library fails to load 2024-07-04 15:40:08 +02:00
Martin Pulec
46b2c0ee64 AppRun: restore TIO with sighandler
Restore TIO always - the firejail doesn't always let UG exit gracefully
(seems like there is some timeout), so restore this with the wrapping
script.
2024-07-03 09:33:18 +02:00
Martin Pulec
54daba57e6 vcomp/cineform: fixed a crash witn unint frame
It is actually a bug of cineform, which can be also reproduced with:
`-t testcard:c=RGB:pattern=noise -c cineform`, this is a workaround.
2024-07-02 16:47:49 +02:00
Martin Pulec
54286c20bc vc_copylineRGBtoRGBA: fixes
- avoid potential out-of-bound src access (if not padded)
- fixed wrong condition for rgb shifts 16,8,0
2024-07-02 16:46:26 +02:00
Martin Pulec
87d1db3b57 added vc_copylineBGRAtoRGB + use
\+ use vc_copylineBGRAtoRGB where it should have been used (not ABGR)
- tested for both screen_osx and screen_x11
2024-07-02 16:39:38 +02:00
Martin Pulec
17dfd6eb86 vc_copylineABGRtoRGB: fixed wrong shifts
actually was for BGRA
2024-07-02 16:39:38 +02:00
Martin Pulec
0d3a15d7b1 vc_copyline{ABGR,RGBA}toRGB: shifts clarification
Replace _source_ r,g,b magic numbers and variables with new constants
indicating that the shift applies on input (not output as usual for the
rgb shifts in fnction declaration /for out RGBA only/).
2024-07-02 16:39:38 +02:00
Martin Pulec
b53a98ffc4 vc_copyline{ABGR,RGBA}toRGB: do not write out-of-bounds
Written is 16 bytes but the required allocate buffer is guaranteed only
12 bytes. Although there is a padding for the conversions in general,
it shouldn't be relied on, especciall when the rest is computed without
the vector instruction (needless if we rely on the fact that there is
additional space in buffer - we could then do one more iteration if not
aligned on the blk instruction boundaries).
2024-07-02 16:39:37 +02:00
Martin Pulec
d5824e2dc1 pixfmt_conv ->RGB fixes
- guard vc_copylineRGBAtoRGBwithShift() with #ifndef __SSSE3__ (otherwise not used)
- moved the UNUSED() to common part (readibility - to indicate that the
value doesn't matter in either #ifdef branch)
- fixed computing last words (dereferenced uchar but should have been uint32_t)
2024-07-02 16:39:30 +02:00
Martin Pulec
ef0b63feaa fixed some Coverity bugs
Fixed CID 464432
2024-07-02 16:36:13 +02:00
Martin Pulec
4e63c0ce8b vcomp/lavc: use fast-decode=1 for libsvtav1
set fast-decode as suggested by SVT AV1:
```
Svt[warn]: If you are using tiles with the intent of increasing the
decoder speed, please also consider using --fast-decode 1, especially if
the intended decoder is running with limited multi-threading capabilities.
````
2024-07-02 16:36:12 +02:00
Martin Pulec
fa8bb8ca8e vcomp/lavc libsvtav1: do not set pred_struct=1
currently it causes following error:
```
Svt[error]: VBR Rate control is currently not supported for SVT_AV1_PRED_LOW_DELAY_B, use CBR mode
```

Setting the CBR mode is currently not possible with current FFmpeg patch
- only possibility is to set rc_max_rate=bit_rate ([1] but this triggers
another error:
```
Svt[error]: Instance 1: Max Bitrate only supported with CRF mode
Svt[error]: CBR Rate control is currently not supported for SVT_AV1_PRED_RANDOM_ACCESS, use VBR mode
```

It is also not clear if the pred-struct set to SVT_AV1_PRED_LOW_DELAY_B
has some impact in situation when UG does not use B frames.

[1]: 5d54a25eea/libavcodec/libsvtav1.c (L224)
2024-07-02 16:36:10 +02:00
Martin Piatka
76e3db8029 pixfmt_conv.c: Fix undeclared x when building without SIMD 2024-07-02 16:17:32 +02:00
Martin Piatka
6618547e22 pixconv_fmt.c: Fix another typo 2024-07-02 16:05:31 +02:00
Martin Pulec
bee8b925e0 vcomp/cineform: fixed crashing RGB
Together with the previous revert commit fixes CID 464437.

In addition to incorrect change to unsigned, also parenthesis around
(height - 1) were missing.
2024-07-02 14:41:07 +02:00
Martin Pulec
2b5a23f87e Revert "Cineform: Windows warning fix"
This reverts commit 45d0bfb615.
2024-07-02 14:41:07 +02:00
Martin Piatka
ab49c978e4 pixfmt_conv: Fix compilation without SSE 2024-07-02 12:58:42 +02:00
Martin Piatka
b2c79c2fda tools/Makefile: Remove sse4.1 flag
So that compilation on ARM keeps working
2024-07-02 12:56:57 +02:00
Karel Šebela
3cde2f1ba0 pixfmt_conv.c: RGB <-> RGBA SIMD
Reduces time per 4k frame from 9 ms to about 5 ms.
2024-07-02 12:56:16 +02:00
Martin Pulec
b10cbf5c1c export: small simplification
use pares_options always (even with NULL)
2024-07-01 13:53:29 +02:00
Martin Pulec
894bd3afa6 export: allow opts without directory name
allow `uv --record=limit=3:exit_on_limit` (using autmoatic directory export.<date>)
2024-07-01 13:48:35 +02:00
Martin Pulec
0a0b14e2c6 video_rxtx: don't unregister callb. if not regist.
Do not unregister the should_exit callback if not registsterd. This
occurs eg. when invalid host was entered, like: `uv blah`.
2024-06-28 10:01:02 +02:00
Martin Pulec
b4bf412a7a print RR more briefly
The line was needlessly chatty and thus harder to read. Currently,
it is a bit more techical but (IMO) somehow easier to read. Since
  it is printed in VERBOSE mode or higher, there should be no problem.
2024-06-26 14:33:36 +02:00
Martin Pulec
e6473a01dd AppRun Firejail: allow Avahi over D-bus
needed for NDI discovery
2024-06-26 14:33:24 +02:00
Martin Pulec
3685805e68 vcap/testcard2: try also Monaco.dfont as mac font
Some macs doesn't have Monaco.ttf, in which case Keyboard.ttf is usually
selected, which is not monospace and doesn't have a symbol for ':'.

The mac, where Monaco.ttf is missing usually have Monaco.dfont, that
can be directly used, so added it to font_candidates.
2024-06-26 11:14:24 +02:00
Martin Pulec
bb24cb5c54 vcap/testcard2: improved font err msg
error was printed instead of font name - print both now
2024-06-26 11:14:24 +02:00
Martin Pulec
11f502cf46 vcap/testcard2: print used font
\+ print (unsuccessfully) tried fonts in verbose
2024-06-26 11:13:49 +02:00
Martin Pulec
be8ef1c9d9 configure: summary - in-sort DRM, Pipewire 2024-06-26 10:52:45 +02:00
Martin Pulec
477103ef9d vcap/testcard2: fixed including
do not include config_*.h (but config.h still - needed for HAVE_ macros)
2024-06-26 10:48:22 +02:00
Martin Pulec
154cf15a04 configure: print presence of sdl[2]_ttf 2024-06-26 10:26:22 +02:00