Commit Graph

10867 Commits

Author SHA1 Message Date
Martin Piatka
c4e20cf044 lavc: Fix r12l_to_gbrp12le conversion 2025-11-18 10:33:23 +01:00
Martin Pulec
7cc5726470 UltraGrid 1.10 v1.10 2025-11-14 16:30:31 +01:00
Martin Pulec
f4f54fdae9 partially revert 194cb695
The REST API returned 4xx on unknown object but valid JSON body. As
written originally, valid JSON was assumed (result queried on null).

So revert back the original curl calls where acquiring JSON.
2025-11-14 16:30:28 +01:00
Martin Pulec
c833d1adfa updated NEWS+splashscreen for next release 2025-11-14 13:47:05 +01:00
Martin Pulec
fc5ff25315 CI PCP: simplified
- '|| true' no longer needded
- CFLAGS also doesn't seem to be required
- remove --disable-shared - when possible, linkling dynamic library may
be rather preferred than the contrary
2025-11-14 13:47:04 +01:00
Martin Pulec
17eb5a0f3a CI Mac: fail if SDK_NONFREE_PATH but no delta SDK
Co not continue if SDK_NONFREE_PATH is set but deltacast
SDK not present there. At this time, this will fail later in
.github/scripts/install-common-deps.sh, anyways. Also the DELTACAST
SDK remains the last non-free SDK so it doesn't make sense to define
SDK_NONFREE_PATH GH variable while not having that SDK.
2025-11-14 13:47:04 +01:00
Martin Pulec
64f3595238 jpeg_reader: SPIFF: port changes from GPUJPEG
GPUJPEG commit 06f18868b message:
````
    gpujpeg_reader spiff: directory read fix+updates

    - FIXED: skipping content the dir entries other than EOD (+ early returns)
    - pass the complete length, not -2 (it is misleading)
    - length check - increase from 6 (4+2) to 8 - T.84 says ELEN should be at
    least 8 (seems that EDATA should be at least 2 bytes)
```
2025-11-14 13:47:04 +01:00
Martin Pulec
d803eb5ed8 data/README.md: use MarkDown sections 2025-11-14 13:47:04 +01:00
Martin Pulec
c68ba8d4e3 utils/string.c: msvc compat 2025-11-14 13:47:04 +01:00
Martin Pulec
10342c15ff utils/string.h: nodiscard attribute instead of GNU
use C23/C++17 standard attribute instead of GNU attribute extension
2025-11-14 13:47:03 +01:00
Martin Pulec
ba0d897c50 replace vidcap_params_set_capture_filter with _add_
Improves the commint 4682cf65 (2024-08-19) allowing also the capture
filter to be specified both before and after the vcap (if only one
used), eg.  `-F flip -t testcard -F mirror`.
2025-11-14 10:35:04 +01:00
Martin Pulec
eed2cd4f32 video_capture_params.cpp: IWYU 2025-11-14 10:04:49 +01:00
Martin Pulec
38681a79be lavc: set bitrate only if >0
Set the bitrate only if >0. Do not set if neither set explicitly nor by
the codec preset - eg. for APV avg_bpp is intentionally set to 0. The
libopenapv uses CQP by default and setting the bitrate explicitly
disables that.

Note that this setting doesn't do anything important - setting the
AVCodecContext::bitrate to 0 does nothing. This change is avoid displaying
"Setting bitrate to 0.0 bps." message.
2025-11-13 14:42:22 +01:00
Martin Pulec
a25392bade vcomp/lavc: add setparam for liboapv
This fixes the situations when selected AVPixelFormat is not
AV_PIX_FMT_YUV422P10.

closes <https://github.com/CESNET/UltraGrid/issues/472>
2025-11-13 14:10:56 +01:00
Martin Pulec
2ebd7d6e3e vcomp/lavc: lavc_opts - pass setparam a copy
setparam callback is free to alter the copy, which is then used for the
actual setting.

blacklist_opts is therefore no longer needed - the formerly blacklisted
option can now be erased from the lavc_opts copy directly.
2025-11-13 11:42:23 +01:00
Martin Pulec
9652fbc0b5 to_lavc_vid_conv: add convs R12L->yuv422p1Xle 2025-11-13 11:08:54 +01:00
Martin Pulec
c7ed5a15c0 vcap/testcard: make default format 1080p24
Use internaced format no longer - it is perhaps obsolescent in 2025. Also
if setting sizes like s=2160p, 50i was retained which is perhaps weird.
2025-11-13 09:38:51 +01:00
Martin Pulec
8cfe1af9c3 CI Win PCP: removed the patch
accepted in upstream
2025-11-12 10:13:40 +01:00
Martin Pulec
cc5ff8417d CI: move cineform patch to patches/ subdir 2025-11-12 08:15:14 +01:00
Martin Pulec
bfbaddb2f0 CI Win: unpin libpcpnatpmp
but the code still needs to be patched

this roughly reverts the commit 382f2fc26b
2025-11-11 16:19:57 +01:00
Martin Pulec
89c3ed6f2c mark some more compat headers as IWYU export
not all compat/ headers are marked as exporting, 2 reasons:
- some compat define own symbols, like platform_semafore or aligned_malloc
(not _alloc as in C11)
- some headers are too generic to export all symbols, eg. unistd.h
or windows.h
2025-11-10 15:56:22 +01:00
Martin Pulec
8896b87b44 compat/strings.h: IWYU export strings.h
The includer needs no longer use IWYU pragmas for strcasecmp in *NIX.

In Windows, _stricmp is defined in string.h, which is not currently
exported (it contains more symbols so it isn't specific enough, in
contrary to POSIX strings.h which contains just strcasecmp and ffs
family).
2025-11-10 15:56:22 +01:00
Martin Pulec
23e014b3de vcomp/gpujpeg: IWYU
(removed initilizer_list)
2025-11-10 15:56:21 +01:00
Martin Pulec
af1f6e493c usage: remove exec_path parameter
Unneeded, ug_argv and ug_argv[0] already set so the nullptr check is
also unnecessary.
2025-11-10 15:56:21 +01:00
Martin Pulec
8c0a79cba6 main usage: fix GCC 15 warning
fix the warning:
```
/usr/include/c++/15.2.1/bits/new_allocator.h:172:66: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘__result’ with nonzero offset 32 [-Wfree-nonheap-object]
  172 |         _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
```

full warning:
<https://gist.github.com/MartinPulec/976f020990831e40de4dc206f2cebf30>

Most likely false positive.
2025-11-10 15:56:05 +01:00
Martin Pulec
0fa5186ba4 deltacast_dvi: utilize DELTA_PRINT_ERROR
(+ MSG where we don't use VHD Result)
2025-11-07 16:48:11 +01:00
Martin Pulec
35bed52e95 deltacast_dvi: adjust with VHD 6.32 DP sample
consult with Sample_RX_DisplayPort
2025-11-07 15:50:25 +01:00
Martin Pulec
689436bec8 deltacast_dvi: squash DVI_D and HDMI branch
those are doing mostly the same...
2025-11-07 13:41:35 +01:00
Martin Pulec
ccbe130d5e deltacast_dvi: improve code flow for HDMI boards
The original sample code uses cascadding if-ladder evaluating Result. The
derived code was just slightly derived but it was maybe even worse because
the error handling (message) was coupled in one if/else with subsequent
API call.

This is mostly a refactor but:
1. two-times VHD_DV_SP_REFRESH_RATE removed
2. perhaps fixed misaligned error message prints to wrong calls, eg. when
board type was not HDMI, the error was print even though the previous
call didn't fail (but continued, anyways)
2025-11-07 13:41:35 +01:00
Martin Pulec
8b6825b554 delta compat with 6.00 2025-11-07 13:41:32 +01:00
Martin Pulec
c2784ee4c7 delta_board_type_is_dv changes
- delta_board_type_is_dv takes the VHD_BOARD_TYPE now
- to acquire the type from board index, delta_get_board_type() is now
externally linked
- delta_board_type_is_dv: handle types with switch (compiler warns about
unhandled enum values)
- changed compat macros a bit (works at least for VHD 5.19, 6.{19,20,21,30,32})
2025-11-07 11:21:26 +01:00
Martin Pulec
83a5a8e8ad delta_board_type_is_dv: distinguish mixed IF
For the deltacast (SDI) probe also mixed interfaces were skipped which
shouldn't be.
2025-11-07 09:22:18 +01:00
Martin Pulec
a4a7211368 deltacast_dvi: add more presets types 2025-11-06 16:12:05 +01:00
Martin Pulec
09e1a721e0 vcap/delta: another compat with SDK 6.21+ 2025-11-06 15:55:51 +01:00
Martin Pulec
9c34035bf4 delta_board_type_is_dv: compat with SDK 6.13
the version there is a bit random (> 6.13)
2025-11-06 15:39:36 +01:00
Martin Pulec
61c62434e0 vcap/delta: notice about deltacast-dv
HDMI/DP devices are listed in the card list (and vice versa - SDI in
deltacast-dv) but are not handled so make at least a notice about that.
Doesn't seem to be necessary for deltacast-dv (from the namw the
specialization is more clear).

+ removed excess NL after card listings
2025-11-06 11:46:04 +01:00
Martin Pulec
930c4c5485 deltacast probes: filter by dev type + better name
- do not return SDI devices with deltacast_dv and vice versa
- use better names by delta_get_model_name
- vcap/deltacast: early return
2025-11-06 11:11:19 +01:00
Martin Pulec
00da8d20a8 vcap/deltacast: set device count=0 by default
If the subsequent VHD call fails, *count is not set, which should be
unconditionally.
2025-11-06 10:44:47 +01:00
Martin Pulec
1a4b4d6811 delta: get_model_name - add card ID unconditionally
we can have more instances of the same card, resulting name is eg.:
"DELTA-h4k-elp 20 #0"
2025-11-06 10:44:47 +01:00
Martin Pulec
67dd16ff23 vcap/deltacast: hint to use deltacast_dv 2025-11-06 10:44:47 +01:00
Martin Pulec
709d2abd34 delta VHD_GetBoardModel improved
instead of "UNKNOWN" return type + index, eg.:
"DELTA-h4k/hdmi board type #0"
2025-11-06 10:44:44 +01:00
Martin Pulec
cee546df28 delta stat: use also in DV capture + no final print
- enable also for deltacast_dv
- do not print the summary - if there is no signal (on capture) or init
fails, the queried values are junk
2025-11-06 10:17:23 +01:00
Martin Pulec
d055c82830 delta statistics printout improve
- add to vidcap in the same way as to capture (via common function)
- in both display and vidcap use generic indicator
- increase the report interval to 20 seconds - 5 s is perhaps to
much disturbing if the card is dropping all the time
2025-11-05 15:00:21 +01:00
Martin Pulec
11c9223258 vdisp/deltacast: improved SDK compat
- handle also new channel types like VHD_CHNTYPE_12GSDI[_ASI]
- moved the above to common fn (used also in vcap)
- handle (print) dropped frames
- use dedicated function for FPS printout (although not a generic FPS
indicator yet)
2025-11-05 15:00:16 +01:00
Martin Pulec
1e048502d6 disp/deltacast: small improvements
- uint:1 to bool
- do not zero already zero-initialized struct members
- set play_audio in one expression
- use DELTA_PRINT_ERROR for better printout (textual err representation)
- magic is now FourCC
2025-11-05 12:22:09 +01:00
Martin Pulec
5e2ff3e76f deltacast_common: fix Win warnings (printf fmt str) 2025-11-03 16:48:43 +01:00
Martin Pulec
5c7615da18 delta VideoMasterHD 5.19 compat 2025-11-03 16:48:43 +01:00
Martin Pulec
485469385e delta: print more device information
according to SDK PrintBoardInfo
2025-11-03 16:48:43 +01:00
Martin Pulec
71e59e13af vcap,disp/delta: fix typo
(wrong gram. article 'an') + use MSG() now
2025-11-03 16:48:42 +01:00
Martin Pulec
e0ef3fb143 delta: print_board_info: updates
- board index rn s/i/BoardIndex/; s/board/board_type/
- s/NULL/nullptr/
- use DELTA_PRINT_ERROR
- close board handle if returning prematurely
- use color_printf instead of col() and LOG->MSG (personal taste)
2025-11-03 16:48:42 +01:00