Commit Graph

10746 Commits

Author SHA1 Message Date
Martin Piatka
e8171e2f97 decompress/cineform: Return null on failed init 2025-10-15 11:29:45 +02:00
Martin Piatka
15bdf0be85 decompress/cineform: Add missing initializers 2025-10-15 11:26:31 +02:00
Martin Piatka
6c9c238f43 decompress/cineform: Remove unused field 2025-10-15 11:21:37 +02:00
Martin Pulec
92b19f0f42 suppress CID 896356 2025-10-14 13:17:10 +02:00
Martin Pulec
09f82871f4 compat/endian: sync with GPUJPEG
ported changes from GPUJPEG, mostly cosmetic

For Win32 implementation, winsock2 is not used at all - Windows stdlib.h
contains _byteswap_* family so it is better to use these and not pull
the whole winsock2.h header struff (and also the winsock library but this
is irrelevannt for UG because we need to link with it unconditionally).
2025-10-14 13:17:10 +02:00
Martin Piatka
f3f7f5885e compress/cineform: Use string_view cfg parsing 2025-10-14 10:50:25 +02:00
Martin Piatka
495d6e7fb9 compress/cineform: Use MOD_NAME 2025-10-14 10:50:24 +02:00
Martin Piatka
d4e20f4823 compress/cineform: Use unique_ptr in init 2025-10-14 10:50:24 +02:00
Martin Piatka
1dc709cb13 compress/cineform: Add missing initializers 2025-10-14 10:50:24 +02:00
Martin Piatka
86988b1a3e disp/unix_sock: Various code quality improvements 2025-10-14 10:50:24 +02:00
Martin Piatka
bc0a1e068a acap/pipewire: Add missing zero initializers 2025-10-14 10:50:23 +02:00
Martin Piatka
8d39d3148c aplay/pipewire: Add missing zero initializer 2025-10-14 09:33:05 +02:00
Martin Piatka
48cb1aded0 afilter/discard: Remove unused include 2025-10-14 09:30:39 +02:00
Martin Piatka
20b51fbc13 vdisp/pipewire: Remove unused include 2025-10-14 09:29:42 +02:00
Martin Pulec
c3fd68a449 testcard: accept sym. col names for other patterns 2025-10-08 15:47:52 +02:00
Martin Pulec
2833130910 testcard pattern blank: supp for sym names 2025-10-08 15:47:51 +02:00
Martin Pulec
41d3e1902f configure.ac: if file not foud, print missing lib 2025-10-08 15:47:31 +02:00
Martin Pulec
434d23ddd6 color.{c,h}: rename to color_space
color is too much general - the declarations relate to color spaces
2025-10-08 15:19:36 +02:00
Martin Pulec
b939d38cd9 vulkan format_info: return value instead of ref
do not tackle with references - needlessly making this more complex

With returning the variable, no static variables needed, just the
references need to be explicitly const (which were previously as well,
although implicitly).
2025-10-08 15:18:06 +02:00
Martin Pulec
cbf4269ccd vulkan format_info: static data constexpr
Mark the returned variables as constexpr. Having inline function that
returns reference (although const) to non-const static variable perhaps
disallow inlining. Some caller maight have issued const_cast<> to a
non-const reference and modify the value which may be allowed (the)
static value is non-const.

Setting the vars to non-const should solve the problem. Using constexpr
is just nicer (requires avoiding std::string). Returning the value
directy instead of reference should be OK as well.
2025-10-08 10:47:40 +02:00
Martin Pulec
4c8eec8273 vulkan: rename Y416 and VUYA vkd counterparts
Y416 was called UYVA16_422(_conv) which is incorrect, since the codec
subsampling is 4:4:4:4 (444 with alpha).

VUYA8 - added 4444 for the consistency (all YCbCr formats contain
subsampling).
2025-10-08 10:31:53 +02:00
Martin Pulec
082a189c1f fix CID 896222
not important at all
2025-10-08 08:56:58 +02:00
Martin Pulec
088e2308de vcap/file: fix locking
The fix commit 8c19440a (2025-10-01) locked in flush_capture_data(),
which was ok when called from rewind_file(). But that function is
called also from vidcap_file_process_message() which is called with
mutex already held (CID 896223).

So moving the lock from flush_captured_data() up to rewind_file().

Also CID 896221 is fixed - subsequent s->new_msg was called seemingly
without lock (double lock + 1x unlock considered unlocked). Now in this
context one pair lock/unlock was removed which means that the lock is
still held.

fixes CID 896221, CID 896223, commit 8c19440a
2025-10-08 08:56:50 +02:00
Martin Pulec
43e33e1399 vulkan: support VUYA
with shader
2025-10-07 16:01:56 +02:00
Martin Pulec
0dcedcb4a1 vulkan_sdl2: use correct log module prefix 2025-10-07 13:43:58 +02:00
Martin Pulec
aa9e886fc3 vulkan: format_info: do not use std::array
The metadata array was actually positionally indexed, which was error prone.

Use rather switch - the advantage is that also a warning is issued if
some enum member not handled and also solves the above.
2025-10-07 11:31:31 +02:00
Martin Pulec
dec438c8e3 vulkan_display: remove is_yCbCr_format
identically defined in vulkan_context.hpp
2025-10-07 11:16:10 +02:00
Martin Pulec
0486fa49af keycontrol: do not use operator>>(video_desc)
Similarly as in previous codec - parsing to std::string and then printing
back is unnecessary. Consider rather removing the operator>>.
2025-10-06 10:47:22 +02:00
Martin Pulec
840ed1faf0 keycontrol: print Transmitted vfmt + in codec
- s/Captured/Transmitted/ video format (has compressed codec)
- print the input codec in brackets
- do not parse the format from istringstream and print directly
2025-10-06 10:26:41 +02:00
Martin Pulec
a98c7dee24 ultragrid_rtp: IWYU 2025-10-06 09:46:28 +02:00
Martin Pulec
3b77220f23 vcap/testcard2: remove unused variable
unneeded since generic FPS ind. used
2025-10-06 09:32:11 +02:00
Martin Pulec
0ce208d026 video_rxtx: process SENDER_MSG_QUERY_VIDEO_MODE
moved from RTP - allows processing for all video_rxtx now

Note that (as just like previously), on the console if 'i' is pressed, the
compressed format is print, not Captured (as indicated by the message).
2025-10-06 08:56:03 +02:00
Martin Pulec
0921b1d30b CI Linux FFmpeg: build own dav1d
current FFmpeg code requires dav1d >1.0.0 but in Ubuntu 22.04 is just 0.9.2
2025-10-03 15:57:09 +02:00
Martin Pulec
3f0d98a18f CI Linux FFmpeg: update libde265 patch
the original version no longer applied so the UG/FFmpeg build failed
2025-10-03 15:19:58 +02:00
Martin Pulec
e119f56b06 decklink: codec/connection listing in/out spec
Specify explictly that the supported input/output codec/connection
is for input or output (it can differ for direction, see prev commit).
2025-10-03 12:22:04 +02:00
Martin Pulec
e7873a6a44 vcap/decklink: capture 10b if 12-bit input not sup
4K Extreme supports 12 bit on output but not in input. Those devices
correctly detect 12-bit input but the captured buffer is scrambled.

So enforce 10-bit capture if 12 bit input is detected but not supported.
2025-10-03 12:22:04 +02:00
Martin Pulec
4517c15526 testcard patt=bars: annotate font sz in pt
multiples of base font bitmap font height is used
2025-10-03 12:22:03 +02:00
Martin Pulec
71fb7e8ac6 vdisp/decklink: fix pixel format change handling
Since the commit 443fe59d (2023-04-11), the sole CS change was not
handled.

There can be 2 cases:
1. bit-depth change (without color-space), which was not handled
2. CS changed was even more harmful because no signal was detected then

The above cases should be handled. The bit-depth handle should be
ignored just if codec= is explicitly specified, in which case the depth
is taken from the argument (specified codec CS is not honored - YUV must
be captured as YUV, RGB similarly).
2025-10-03 12:22:03 +02:00
Martin Pulec
b31b19a433 vcap/deck: set configuredCsBitDepth earlier
if used as a cache, we will need unaltered value

the original commit is perhaps 3595802a3 (2020-07-27)
2025-10-03 12:22:03 +02:00
Martin Pulec
f320b3f792 vcap,vdisp/decklink: mode listing more dense
More dense lines (reduce spaces) - when terminal is narrow, less likely
wraps to next line. For display it even has <= 80 rows, for capture it
may be more (mode FourCC is print so there is less spare space).
2025-10-03 12:22:03 +02:00
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