Commit Graph

10706 Commits

Author SHA1 Message Date
Martin Pulec
06eb30d2f3 testcard patt=bars: allow bigger font
+ print the usage in pattern=help (not just patt=bars=help)
2025-10-03 12:21:42 +02:00
Martin Pulec
518344b4ba VulkanDisplay::window_parameters_change: early ret
If noop (no change or minimized), return early. Ths also doesn't re-render
the last frame (intentionally).
2025-10-02 14:17:44 +02:00
Martin Pulec
e710c4ae66 vulkan: re-render last frame
When no video is arriving, the resized window doesn't have defined
content.

Moreover, if using Wayland, the window change of fullscreen is not
applied at until next refresh (new frame in this case).
2025-10-02 14:17:44 +02:00
Martin Pulec
c69d5e315a vdisp/vulkan_sdl3: fix driver settting
driver= option was not applied since forking the code from SDL2 - the
hint must be applied before SDL_InitSubSystem(SDL_INIT_VIDEO).
2025-10-02 14:17:43 +02:00
Martin Pulec
00898f90fa from_lavc_vid_conv bench tool compat
Fix the benchmark tool build when src/config.h present and CUDA
conversions enabled there. The appropriate CUDA files will be required
if HAVE_LAVC_CUDA_CONV is defined.
2025-10-02 14:15:47 +02:00
Martin Pulec
a8683ee701 configure.ac: fix SDL_ttf not present
Recent changes enforce #SDL_TTF_LIBS to be set but it isn't when the
SDL TTF library is not found with pkgconf.
2025-10-01 14:07:48 +02:00
Martin Pulec
1dd00d0879 vcap/file: set FPS from avg_frame_rate
The [file] (URL few commits below) has actually set r_frame_rate as
1/1200k, which causes the libavcodec JPEG decoder crash (received is
something like 1792i due to overflow). avg_frame_rate contains 1/25.
2025-10-01 13:58:28 +02:00
Martin Pulec
b3b504da64 vcomp/file: do not run avio_seek normally
Prior to the commit 9891f19a (HEAD~3) avio_seek was called prior to
avformat_seek_file. This worked fine for normal containers (eg. MP4). But
after this was swapped, avio_seek after that broke that.

In order to work properly, run avio_seek() just if avformat_seek_file
fails (fixes temporarily broken .mp4 loop). Only case remaining is
JPEG/MJPEG file loop, which returns 0 for the avformat_seek_file() call.
This is handled ad hoc (I don't have any better solution now).
2025-10-01 13:56:16 +02:00
Martin Pulec
8c19440aa4 vcap/file: missing lock
When playing single JPEG, the s->video_frame_queue got corrupted (.size()
returned UINT_MAX).
2025-10-01 12:18:02 +02:00
Martin Pulec
a5067c367b configure.ac: wrong variables used for file check 2025-10-01 11:18:54 +02:00
Martin Pulec
9891f19a71 vcap/file: fix raw HEVC rewinding
Rewinding the file (:loop option) doesn't work using raw HEVC like with
the [file].

avformat_seek_file retrurns EPERM, which was handled as an error, so
stopped the worker.

avio_seek seems to do the job but must be performed _after_ (unsuccessful)
avformat_seek_file.

[file]:
https://ultravideo.fi/video/ReadySetGo_3840x2160_120fps_420_8bit_HEVC_RAW.hevc
2025-10-01 11:06:23 +02:00
Martin Pulec
1f1505ab12 AppRun: another updates 2025-10-01 10:20:19 +02:00
Martin Pulec
9b635b5a84 AppImage Firejail: no disable-mnt for symlinks 2025-10-01 09:47:21 +02:00
Martin Pulec
85e16c7808 vcap/testcard2: use gneric FPS indicator 2025-09-30 15:57:14 +02:00
Martin Pulec
15f38f2c3a hd-rum-translator: stats: another small changes
Use fixed width second precision - looks better when the stat lines are
below each other (if the order of magnitude matches, the same alignment).

Use B instead of bytes (shorter, also likely won't exceed 80 rows).
2025-09-30 14:45:56 +02:00
Martin Pulec
b6bead2398 hd-rum-translator: printout: delimit byte count
use comma delimiting thousands for better readibility
2025-09-30 14:45:56 +02:00
Martin Pulec
5c379c8d60 AppRun: add --mk-symlinks for symlinks create
for convenience to allow uv/hd-rum-transcode normally
2025-09-30 14:45:54 +02:00
Martin Pulec
a4097ba394 hd-rum-recompress: fix final crash
steps to reproduce the fixed behavior:
1) run `hd-rum-transcode 8M 7000 100::`
2) press Ctrl-C

There is compress_done() called once - once by the now commented out
line and then also with compress_state_deleter::operator().

This problem technically occurs since 2ca38e7c (16th Jun 2025) when
module_done() was replaced with compress_done(), which doesn't allow double
call (in cotrary to module_done(), which does). The root of the problem
is perhaps the commit 7460563 (2022-01-18).
2025-09-30 12:57:26 +02:00
Martin Pulec
fb4420ea52 compress_done: add assertion
`./bin/hd-rum-transcode 8M 5004 100::` seem to be crashing due to wrong
state (assert it)`
2025-09-30 12:30:02 +02:00
Martin Pulec
2ff0bd5c19 AppRun: allow running with symlinks
resolve tool from $APPIMAGE ($0; progname)

This allows running the reflector with just `hd-rum-transcode` if
symlinked with that name.
2025-09-30 12:17:51 +02:00
Martin Pulec
994c8ea693 get_video_desc_from_string: fix 4k modes (3840 wide) 2025-09-29 15:53:06 +02:00
Martin Pulec
4715de7aef configure.ac: replace some unescaped [] occurences
[ and ] are m4 tokens, to pass the braces literally to the output @<:@ and @:>@
2025-09-29 14:52:16 +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
5de91b212f configure: testcard-extras - move to testcard2
The sdl_mixer audio capture has gone and there remains just TTF, which
can be considered as an optional feature for testcard2.
2025-09-29 14:44:28 +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
a2c94dc2c7 Makefile.in: datarootdir->datadir for sf3
mostly harmless - datadir almost always set to datarootdir
2025-09-18 09:22:52 +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
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