Commit Graph

6740 Commits

Author SHA1 Message Date
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 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
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
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
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
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
f64f05a3c7 vcap/ndi: DNS-SD is required for NDI discovery (msg)
To be preciese, not mDNS but DNS-SD is required to NDI discovery,
i.e. avahi-daemon is required in Linux, although systemd-resolved is
mDNS capable.
2024-06-25 15:58:54 +02:00
Martin Pulec
e0f1bc8b0b vcap/ndi: usage - print help on separate line
The ":help" was printed out twice, anyways - first mixed together with
other options and then with extra_ip (to enforce sender ip adddr to
source listing).
2024-06-25 15:24:30 +02:00
Martin Pulec
8d9c9391f9 ndi_common: increment USE_NDI_VERSION to 6
just a default value

Actually, not much is influenced by that change, since it has been 5 (by
default) and the version 6 keeps v5 API, so that the entrypoint remains
`const NDIlib_v5* NDIlib_v5_load(void);` (not 6).

Only functional change is updated fallback path in MSW.
2024-06-25 15:08:30 +02:00
Martin Pulec
1a153c22d5 vcap,disp/ndi: print version in init 2024-06-25 15:08:29 +02:00
Martin Pulec
91a9e020dd ndi: do not include config*.h 2024-06-25 15:08:29 +02:00
Martin Pulec
09eb5411ed print NDI ver: use NDIlib_version()
Note that the printed now is the runtime version, while in the previous
version it wash the version used (just) for the compilation. Current
inmplementation seem to be better, anyways.
2024-06-25 15:08:29 +02:00
Martin Pulec
3c7a75f486 ndi_common: do not call dlerror() second time
Do not call dlerror() second time - the function actually clears the
error status, so that the second call returns NULL (printing with '%s'
is actually UB).
2024-06-25 15:08:29 +02:00
Martin Pulec
11887dd946 updated NDI copyright
Updated copyright as per current version at:
<https://docs.ndi.video/docs/sdk/licensing>
2024-06-25 15:08:29 +02:00
Martin Piatka
07ed6ce45c audio: Make it clear that channel map applies only to receiver 2024-06-25 13:48:45 +02:00
Martin Piatka
141832b1f0 audio_decoders: Print error when remapping nonexistent audio ch. 2024-06-25 13:48:45 +02:00
Martin Pulec
9e0575239b vcomp/cmpto_j2k: mct opt parse fix
Fixed the commit 27bfe2fc (2020-05-29) which added option nomct, but
switched the meaning of nomct and mct by mistake.
2024-06-17 11:03:43 +02:00
Martin Pulec
e494106bba moved strdupa from compat/misc to strings
\+ missing include guard
2024-06-12 14:26:34 +02:00