Commit Graph

7742 Commits

Author SHA1 Message Date
Martin Pulec
994c8ea693 get_video_desc_from_string: fix 4k modes (3840 wide) 2025-09-29 15:53:06 +02:00
Martin Pulec
1dddfdf18d vcap/tescard2: draw scale the non-TTF drawn font 2025-09-29 14:44:33 +02:00
Martin Pulec
9420b20ddf utils/text: draw_line - separate draw_letter 2025-09-29 14:44:33 +02:00
Martin Pulec
5f16cb11fc vdisp/gl: help: platform above "footnote" 2025-09-29 14:44:33 +02:00
Martin Pulec
7b120d0302 vcap/testcard2: fallback without ttf 2025-09-29 14:44:33 +02:00
Martin Pulec
dcdeb23eed vcap/declink: unclutter help
- in short (default) help, offer the most often used options only
- print the available codecs/connections inline
- print opts "one-line" (or multiple line but with description starting
on the line); this makes it compatible with vdisp/decklink
- hide old positional syntax (shown in full-help), :help not red
2025-09-29 09:40:15 +02:00
Martin Pulec
c257c36d32 blackmagic: connections more terse (one line) 2025-09-29 08:11:39 +02:00
Martin Pulec
90b6ec7bbe from_lavc_vid_conv: supporess unused fn warn 2025-09-29 08:10:39 +02:00
Martin Pulec
3a108863e6 cf/noise,vcap/testcard2: decrease noisiness
The original noisiness 30 seem to be too much to be default - with default
compression JPEG or H.264 it produces high-bitrate stream. The new value
200 may better approximate real-life complexity video.
2025-09-26 15:49:37 +02:00
Martin Pulec
ad3e25fb66 vcap/decklink: hint to set half-duples for 8K Pro 2025-09-26 15:35:05 +02:00
Martin Pulec
4f8f24c0a3 vcap/decklink: rm unused attribute 2025-09-26 14:40:30 +02:00
Martin Pulec
08972b36b6 testcard2: add_noise regardless TTF
it was inside the SDL_TTF guarded block by mistake
2025-09-26 14:11:06 +02:00
Martin Pulec
e15adb9d92 video_compress: for frame debug size, use delim
If the frame sizes become big, let say >1 MB, it is really hard to see
the order of magnitude visually.

This slightly hardens parsing the dumped frame sizes in batch but it
shouldn't a big problem (tr(1) or sed(1) will remove them).
2025-09-22 11:09:07 +02:00
Martin Pulec
93da71e07d vcomp/cineform: pretty-print help 2025-09-22 11:03:05 +02:00
Martin Pulec
258414bfd9 vcomp/cineform: IWYU 2025-09-22 07:51:47 +02:00
Martin Pulec
048581eba0 testcard2/noise: use ug_rand
not much importatnt but rather for the tools (clang-ticy, perhaps also
Coverity) not to complain about use of rand()

also use (UCHAR_MAX + 1) instead of 256 (for warning fix only)
2025-09-17 10:44:46 +02:00
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
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
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
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