Commit Graph

10667 Commits

Author SHA1 Message Date
Martin Pulec
ffaeadb737 add vcf/noise
Similar idea as "noise" in testcard2 (to add entropy for compression
testing when using artificial source).
2025-09-17 10:44:44 +02:00
Martin Pulec
126df18cd0 vcap/testcard2: refactor
- integer constants to enum
- usage and parse_fmt as separate functions
- DEFAULT_FORMAT as a compound literal
2025-09-17 08:25:14 +02:00
Martin Pulec
3cc66760cf vcap/testcard2: add noise option
For testing - as testcard2 is being also used to measure latency, adding
a noise to increase complexity for compression.
2025-09-17 08:10:21 +02:00
Martin Pulec
e63988478d compat/alarm: include unistd.h if not Win
If not using the Windows compat, include unistd.h that declares alarm()
according to the POSIX.
2025-09-16 15:32:20 +02:00
Martin Pulec
763089ed57 main: valildate some params
Issue a warning eg. when -c option used without -t, in which case the
compression does nothing.  This avoids either omitting an option by
mistake (here `-t`) or vice versa passing an extra parameter (either by
accident or not knowing that not usable in the context).
2025-09-16 15:30:11 +02:00
Martin Pulec
849929b3cb vo_pp/split: fix crash when no args given 2025-09-16 15:30:11 +02:00
Martin Pulec
bc05c72e0d main: IWYU 2025-09-16 15:29:48 +02:00
Martin Pulec
81a7c22291 autogen.sh: simplify a bit
Do not use $DEBUG to add --enable-debug - needless, moreover $DEBUG is
too general and the user may have it defined by accident for a different
purpose.

Remove cd to $ORIG_DIR, that has already been performed.
2025-09-16 08:21:59 +02:00
Martin Pulec
2a315d4a22 CI libajantv2 macOS fix
CMAKE_OSX_SYSROOT is empty by default since CMake 4 [1] so make a workaround

MSCOS_SDK_VERSION_MAJOR and _MINOR seems to be unused but are derived
from MACOS_SDK_VERSION which is conversly derived from MACOS_SDK_NAME,
which can be now eg. /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
(`xcrun --sdk macosx --show-sdk-path`) - not containing the version
string in expected form.

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html
2025-09-15 12:39:24 +02:00
Martin Pulec
95180fa86e CI: build dynamic version of Cineform
doesn't need to be patched

Also, the dynamic version may be slightly better because it is separated
from UG, eg. also because the uv binary and reflector both link with
this so not linking twice (increasing overall size).
2025-09-15 12:35:04 +02:00
Martin Pulec
42afa5642e [vulkan_]sdl3: handle positioning errors
- return on errors
- do not set the position when neither display/x/y was set (prevent
Wayland errors)
- check that the only x/y or display was set (not both position and
display)
2025-09-15 11:30:28 +02:00
Martin Pulec
c5f38fe2ff vulkan_sdl3: cstoi: add description if failed
Add amendment that parsing the number was the problem (originally was
just "Wrong option: <opt>" which is just the same as if passing unknown
option).
2025-09-15 11:30:27 +02:00
Martin Pulec
f6d4b87508 vulkan_sdl3: fix cstoi
The lenght check was not functional for eg. pos=5,6 - the first number
was rejected because endpos was 1 but lenght of the string 3.

broken since 2025-09-05 (with the commit 4290a298)
2025-09-15 11:30:27 +02:00
Martin Pulec
42302507d7 module: print db not empty warn to stdout
Do not use logger. Dump tree uses plain stdout so make this the same
(the warning is currently displayed multiple times, for every ancestor
in tree and so the logger issues that the message is repeated n-times
which gets messed with the plain printfs).
2025-09-15 11:30:27 +02:00
Martin Pulec
e9d29cd842 [vulkan_]sdl3: do not set pos if not req
if neither of display/x/y is set, do not set the window position
2025-09-15 11:30:27 +02:00
Martin Pulec
2fd4d2e418 sdl3 Wayland display w/o fs: print SDL error
+ print the SDL_SetWindowPosition in verbose mode also in
Wayland (currently always an error - we are calling it with
x/y=SDL_WINDOWPOS_CENTERED_DISPLAY(0) if nothing is specified).
2025-09-15 11:30:24 +02:00
Martin Pulec
cf20aea586 vcomp/lavc: libsvtav1: old FFmpeg compat
default preset doesn't with some quite old FFmpeg (4.4.6, from MacPorts)
2025-09-05 16:22:07 +02:00
Martin Pulec
38fb6f9c42 vulkan_sdl2: fix gpu=integrated|discrete 2025-09-05 15:59:15 +02:00
Martin Pulec
4290a298d1 vulkan_sdl3: use IS_KEY_PREFIX
The parsing made more C-string based (because IS_KEY_PREFIX expects
that). It can be made more string_view using again later but it seems
to be more short now).

this also fixes gpu=integrated|discrete
2025-09-05 15:58:47 +02:00
Martin Pulec
d7191a7d65 vulkan_sdl2: check some SDL calls 2025-09-05 14:28:23 +02:00
Martin Pulec
2c2dcc215d sdl3/vulkan_sdl3: allow ID for display
This is a bit tricky because the ID seems to be a (small) ordinal and may
potentially clash with the index... Index is considered first, this
approach may bbe re-evaluated (eg. letters for the indexes?).
2025-09-05 14:28:23 +02:00
Martin Pulec
14e6920417 configure.ac: add -ldl as JACK lib
dlopen + family is used so ensure that -ldl is used

this fixes currently failing ARM CI builds
2025-09-05 14:27:32 +02:00
Martin Pulec
e2941ccbab configure.ac: test fix
not sure why `if [ test $4 ... ]` worked... (excess [], which are possibly
consumed/erased by m4)

- check that $4 is set and avoid splitting on spaces (should not happen)
- use -eq instaead of = (should be 0 or 1)
2025-09-05 11:40:00 +02:00
Martin Pulec
7e42cb9f91 sdl2, vulkan_sdl2: validate parameters
similar to [vulkan_]sdl3
2025-09-05 11:12:09 +02:00
Martin Pulec
b96080ee0b vulkan_sdl3: chech display_idx spec only with fs
In Wayland, the display/position specification is not possible. The
display can be specified when having fullscreen.

see also vdisp/sdl3
2025-09-05 11:02:32 +02:00
Martin Pulec
fc20578250 vulkan_sdl3: fix setting display ID 2025-09-05 10:48:21 +02:00
Martin Pulec
e22cf9d8e3 vulkan_sdl3: fix (initial) fs setting 2025-09-05 10:46:47 +02:00
Martin Pulec
09c47b73ed sdl3: handle SDL_SetWindowPosition errors
- :fs hint in Wayland
- print error otherwise if fails
- rename get_display_id_to_idx to get_display_id_from_idx
2025-09-05 10:46:41 +02:00
Martin Pulec
9084609ef8 fs: get_data_path: fix inverted cond + rename
fixed inverted condition

rename to get_ug_data_path
2025-09-05 08:53:41 +02:00
Martin Pulec
3a178455a4 vulkan_sdl3: check SDL return values
and print error if something gets wrong (ported from vdisp/sdl3)

also fixes CID 894258
2025-09-05 08:43:40 +02:00
Martin Pulec
b4e18389f9 vulkan_sdl3: do not dereference NULL on fail
not critical

CID 894257
2025-09-05 08:22:54 +02:00
Martin Pulec
09674dc1ce sdl3: fix a leak when unable to lock texture
not likely to occur and even if so, it occurs just once (and init fails)

CID 894256
2025-09-05 08:20:02 +02:00
Martin Pulec
3aa3a22cae fs: generalize dir_exists to file_exists + use
+ use with src/playback
2025-09-04 16:39:09 +02:00
Martin Pulec
96b5986f28 playback: IWYU 2025-09-04 16:38:38 +02:00
Martin Pulec
ffa79acdc5 vcomp/cuda_dxt: improve error print
- use logger
- print CUDA error string
2025-09-04 11:23:55 +02:00
Martin Pulec
193c8d5ab1 minor fixes
- coverity-scan.yml: typo
- configure.ac: misleading message if SDL not found -> do not mention
version at all, it was perhaps meant "didn't found any version" but it
might have also been that did't found specified version...
- configure.ac: removed sdl_mixer from summary
2025-09-04 10:40:22 +02:00
Martin Pulec
0578d809c1 default sountfont: use original name
The name default.sf3 is no longer required, the soundfont name is resolved
directly so use the original name. It is TimGM6mb derivative with just
piano downloaded from:
<https://musical-artifacts.com/artifacts/2642>
2025-09-04 09:25:44 +02:00
Martin Pulec
4357452c32 move soundfont to shared + always install
This simplifies things a bit at the expense that the soundfont is always
included/installed (91 kB).

Added get_data_path() function for generic handling the path to common
data (eg. /usr/local/share/ultragrid if installed). The idea is to catch
all cases - installed (run with absolute or relative path) or run from
inside the source directory in one place.
2025-09-03 16:42:28 +02:00
Martin Pulec
faf95598ad get_exec_path: return bool + fixes
return true

fix FreeBSD and generic variant - the logic was inversed to the definition,
returning 0 on success and !0 otherwise
2025-09-03 16:07:41 +02:00
Martin Pulec
f806f01428 fs: get_exec_path: static + consolidate 2025-09-03 15:08:57 +02:00
Martin Pulec
d1667f8187 snprintf_ch: discard return value from fprintf
clang-tidy complains about the unused return value of fprintf, which is
mostly useless here
2025-09-03 14:35:11 +02:00
Martin Pulec
7fc5380d18 Coverity CI: use own caches
Coverity CI uses ubuntu-latest but C/C++ CI ubuntu-22.04, so that the
builds won't be compatible.
2025-09-03 09:49:34 +02:00
Martin Pulec
28e8ca872b Coverity CI: do not check coverity_token in every step
This reverts 960d2315 (2022-02-21) because the commit 18f049608
(2022-04-20) already restricts the scheduled run to CESNET Git repository
or manual push.

So that the token unavailability should be considered error and thus the
condition doesn't need to be re-iterated in every step.
2025-09-03 09:13:58 +02:00
Martin Pulec
a3906013e1 Coverity CI: sync with master YAML 2025-09-03 08:58:18 +02:00
Martin Pulec
8d15eb58a3 vulkan_sdl3: use common func for FPS pretty printout
A common way would be to use generic FPS indicator. But a slight problem
is that _putf return value isn't entirely reliable for this module,
since the frame may be dropped later doe to insufficient performance.

Because of the above, do not use the generic indicator, at least
for now. But use the common function to make the output "prettier"
(bold/color and if not performing well also use a color for FPS).
2025-09-01 11:06:09 +02:00
Martin Pulec
2169772063 remove sdl_mixer
should be replaced altogether with fluidsynth - add alias there

+ removed typo in fluidsynth pkg name  ARM CI bootstrap.sh
2025-09-01 10:22:18 +02:00
Martin Pulec
44788b71ce CI Linux install_sdl.sh: ensure features
ensure required features explicitly on
2025-09-01 09:17:27 +02:00
Martin Pulec
d473bc00d0 CI Linux: fix wrong token name for cache
not a big problem - hash of appropriate fie included in the key
2025-09-01 08:45:24 +02:00
Martin Pulec
517f47ec7e create_appimage.sh: fix missing $
The excludelist was not applied for arm64 (used x86 instead)? Currently
excluded was just ld-linux-aarch64.so.1 but it may cause problems...
2025-08-29 12:33:38 +02:00
Martin Pulec
2ae0eee190 excludelist.local.x86: disable also libgdk-3.so.0
Not tested but trivially, libgdk-3.so.0 from (build) Ubuntu 22.04
should not be incompatible when running on the  same distro.

This is not known to cause issues but better to remove this since it
the original use case seem no longer being valid. Track just the
excludelist from AppImage creator.
2025-08-29 12:16:05 +02:00