Commit Graph

11455 Commits

Author SHA1 Message Date
Martin Pulec
2f145378ef vcomp/lavc: prefer libvpx-vp9 for VP9
It doesn't seem that libsvt_vp9 is better even for AVX2+ processors.

From testing with i9-9820X and 9950X with `testcard2:noise:fps=200` we got
60 FPS for SVT and 72 for VPX in case of Intel and 153 and 128 for AMD.
In the SVT case, the frame was significatly (250 framees) delaysed with
default setting.

Also, while libsvt_vp9 supports just yuv420p, libvpx-vp9 offers up to
12 bit 4:4:4 subsampled both YUV and RGB pixel formats.

For the record, there has been a [patch](https://github.com/OpenVisualCloud/SVT-VP9/pull/67)
for libsvt_vp9 to support pre-AVX2, but it doesn't seem to make much sense
to use.
2026-03-11 10:34:39 +01:00
Martin Pulec
247f95e922 Makefile: copy license to macOS bundle 2026-03-11 10:34:27 +01:00
Martin Pulec
1f9e6d4050 vcomp/lavc: fix default VP9 encoder for non-avx2
the default - libsvt_vp9 - requires AVX2 instructions so if not present,
use the fallback.

broken by some weird mistake since the commit ff3e34ef (24th Oct 2025)
2026-03-10 16:43:59 +01:00
Martin Pulec
5fb266f6d5 remove unused video_rxtx_loader 2026-03-10 16:43:59 +01:00
Martin Pulec
388e87e847 video_capture API: const struct to init
the init should accept rather the ptr to  const struct with init params
2026-03-10 16:43:59 +01:00
Martin Pulec
81930ee494 vcap/switcher: early return 2026-03-10 16:43:58 +01:00
Martin Piatka
df1062132f capture/pipewire: Workaround for frames marked as non-readable
On Arch with wlroots-git, sway-git and nvidia 595.45.04 data buffers are not marked as SPA_DATA_FLAG_READABLE for some reason and PW mmaps them with no read access leading to segfaults.
2026-03-10 15:46:32 +01:00
Martin Piatka
d94b8231dd disp/pano_gl: Small code quality improvements 2026-03-10 13:07:10 +01:00
Martin Piatka
aab39bc036 display/pano_gl: Remove config includes 2026-03-10 12:32:33 +01:00
Martin Piatka
1e2f562d60 display/openxr_gl: Remove config includes 2026-03-10 12:32:23 +01:00
Martin Piatka
14e55bd8da capture/bitflow: Remove config includes 2026-03-10 12:29:53 +01:00
Martin Pulec
ef0840bcdc vdec/jpegxs: zero-init svt_jpeg_xs_bitstream_buffer_t
maybe not 100% required but it is a good practice

fixes CID 900815
2026-03-10 08:39:52 +01:00
Martin Pulec
deae5df22d vcomp/jpegxs: process the poison pill outside loop
Move processing outside to the main jpegxs_worker_send() loop to make
it shorter. One level of indention removed as a consequence.
2026-03-09 15:46:57 +01:00
Martin Pulec
44302a925c vcomp/jpegxs: improvements
- check return value of send_picture for poison pill or reconfigure msg
- if configure fails, continue, do not break - not sure if useful but it
may be able to continue further (user can interrupt, anyways). At least
not it could be terminated gracefully, when the thread is terminated it
won't (maybe then either abort or exit_uv will be more proper)
- warn if bitrate is lower than 7.5 Mbps - for getting packet we then
receive SvtJxsErrorEncodeFrameError
2026-03-09 15:15:23 +01:00
Martin Pulec
a46e711714 vcomp/jpegxs: simplify synchronization
Avoid counting frames for the consumer and instead pass a reconfigure message
and then wait for configured_consumer=false (with corresponding _cv).

Also removed the `configured` variable and set cleanup() to be idempotent.
2026-03-09 15:15:18 +01:00
Martin Pulec
572f2352ac vcomp/jpegxs: simplify producer reconf
- the actual configuration can be run once, with waiting for the consumer
thread if we are configured
- saved_desc can be just for the thread
2026-03-09 12:31:39 +01:00
Martin Pulec
2c354775da vcomp/jpegxs: small changes
- reenabloe bpp with decimal point after check for validity added
- change default bpp to 3/2 - it might be better suitable, eg. with
testcard:m=VGA there are observable artifacts with 0.7 but disappear with 1.5
2026-03-09 12:31:28 +01:00
Martin Pulec
15812d8c8f vcomp/jpegxs: when send fail, release the buffer
The error triggered <https://github.com/CESNET/UltraGrid/issues/492>
causes freeze on svt_jpeg_xs_frame_pool_get().

It doesn't work, anyways - perhaps incorrect handling in SVT-JPEG-XS. At least
when `enc_input.image.ready_to_release` is not set to 1, current impl of
svt_jpeg_xs_frame_pool_release() doesn't release anything. But even if
set to 1, it still doesn't help.

So at least fixing our use and hopefully it will get also fixed
upstram. This shouldn't happen, anyways, unless passwdd wrong parameters
as in the #492.
2026-03-09 11:52:15 +01:00
Martin Pulec
50c60f56bb jpegxs: print errors symbolic names
eg.:
```
[SVT JXS] Failed to send frame to encoder: 0x80001005 (SvtJxsErrorBadParameter)
````
(the value in parenthesis)
2026-03-09 11:52:15 +01:00
Martin Pulec
1041bf4b3f jpegxs_worker_send: fix misleading indention
only a refactor
2026-03-09 11:52:10 +01:00
Martin Pulec
1e30d6da46 vcomp/jpegx: fix setting bitrate
regressiong from fc0df372f

fixes <https://github.com/CESNET/UltraGrid/issues/492>
2026-03-09 09:19:18 +01:00
Martin Pulec
d9a8ea322a vcomp/jpegxs: bpp/bitrate - check trailing chars
This avoids error like swapping bpp and bitrate and using bpp=100M
or bitrate=2/3.
2026-03-09 08:41:40 +01:00
Martin Pulec
d5e6e3629a hd-rum-translator: add new_message callback
if no data is comming, the messages are not dispatched

Maybe not a big problem, it would be dispatched when some data arives. The
potential problem, however, can be if added huge number of participants
at that time, the queue may overflow and further message dropped. (Current
max queue len is 10 - maybe it can be extended later.)
2026-03-06 16:21:08 +01:00
Martin Pulec
01c6d4804f AppRun: print obsolescence in bold+red
To make it more visible to users that is advisable to upgrade - the
output may be easily overlooked eg. if more output follows.
2026-03-06 16:21:08 +01:00
Martin Pulec
30b0fc9c96 CI L/W/m: allow running by pushing to the branch 2026-03-06 16:21:08 +01:00
Martin Pulec
a1a16712d7 CI: split ccpp.yml per platforms
The advantages:
- shorter files and more transparent changes (eg. in Git)
- allowing running the job for one platform

This should be mostly a pure refactor - the platform jobs were split as
they were:
- the actual build jobs macOS/Linux/Windows moved to separate files
- the new workflows can (and are) triggered by worflow_call
- in ccpp.yml, the original jobs are now only dispatchedi with uses:
2026-03-06 16:21:01 +01:00
Martin Piatka
930bc29832 disp/vulkan_sdl2: Remove config includes 2026-03-06 13:40:12 +01:00
Martin Piatka
d75aa81263 Remove rtp/ptime
Never used throughout the whole git history + the only function declared in header is not defined
2026-03-06 13:35:41 +01:00
Martin Piatka
909e3f0e51 compat/vsnprintf: Remove config includes 2026-03-06 12:20:28 +01:00
Martin Pulec
1e13d3c938 Revert "CI: run on pull request"
Actually not sure why I've added this since there is no rationale.

Anyways, this seems not to be a good idea at least from the security
POV - can the pull requester modify the workflow files? If so, it can
steal GITHUB_TOKEN and/or do something nesty with the repo.

This reverts commit 656e6fa107.
2026-03-06 11:25:06 +01:00
Martin Pulec
8c4c0192d1 from_planar: make it more pretty
porting improvements from to_planar
2026-03-05 15:49:40 +01:00
Martin Pulec
20d6b5bb2a to_jpegxs_conv: run conversion from R12L parallel
The conversions from/to R12L might take 10-15 ms for 4K frame so make
it run parallel. This will slightly increase the latency and also allows
4K @60 R10L video encode on slower machines (shouldn't be much issue with
current CPU).
2026-03-05 15:49:40 +01:00
Martin Pulec
7155dd92df to_planar: add decode_to_planar_parallel
for parallel processing decode_buffer_func_t funcs
2026-03-05 15:49:40 +01:00
Martin Pulec
2d0afcad84 vcomp/jpegxs: help improves
- fix desc of threads (default now is nr of cores)
- hide pool_size - should not be needed otherwise by the user
2026-03-05 15:49:40 +01:00
Martin Pulec
60a23d31ba vcomp/jpegxs: set default pool size to 2
The value 2 should be sufficient - one as output buffer for video
conversion while the other being encoded. The original value 5 just
caused slower propagation of insufficient performance while increasing
the latency by 3 more frames.
2026-03-05 15:49:39 +01:00
Martin Pulec
fc0df372f6 vcomp/jpegxs: reduce default BPP=7/10
the value 3 seems to be very large as a default value

If the user omits the setting, it easily exceeeds 1 Gbps for
2160p60. Equivalent for JPEG Q=75 might be something like 0.5-0.7 so
using the upper bound.
2026-03-05 15:49:39 +01:00
Martin Pulec
113758e876 vcomp/jpegxs: set in_queue size 1
I don't see any particular advantage of having the size more than 1.
2026-03-05 15:49:39 +01:00
Martin Pulec
3b41cf2e93 vcomp/jpegxs: allow decimal number for bpp
allow eg. 0.5 in addtition to 2 or 3/4
2026-03-05 15:49:39 +01:00
Martin Pulec
b22631aa5a vcomp/jpegxs: print used bitrate + bpp 2026-03-05 15:49:39 +01:00
Martin Pulec
af317dcc35 vcomp/jpegxs: prevent race condition to dead-lock
Blocking svt_jpeg_xs_frame_pool_get is called with s->mtx held. If
there is no currently available buffer, it causes a dead-lock because
the consumer stops on wait on the lock.

Possible to reproduce (perhaps sometimes) with eg.
`-t testcard:patt=noise:size=3840x2160:fps=100:c=R12L` with the bitrate
exceeding egress iface speed when exitting.

Also removed a lock guarding nothing in _done - maybe it was kept there
to ensure the lock is lockable? If so, it is incorrect, anyways.
2026-03-05 15:49:36 +01:00
Martin Piatka
35d0f6df08 disp/dvs: Remove config includes 2026-03-05 15:16:15 +01:00
Martin Piatka
f1155e77d0 disp/sage: Remove config includes 2026-03-05 15:16:15 +01:00
Martin Piatka
8b3cc25e34 bluefish444: Remove config includes 2026-03-05 15:16:15 +01:00
Martin Piatka
2ab92aa3cb capture/gpustitch: Code quality improvements 2026-03-05 15:16:15 +01:00
Martin Piatka
c2900baee0 capture/gpustitch: Add missing zero initializers 2026-03-05 15:16:15 +01:00
Martin Piatka
1f06d7b97d capture/gpustitch: Remove config includes 2026-03-05 15:16:15 +01:00
Martin Pulec
a8b4dbf98b CI mac sign.sh: notarytool override with env var
allow environment variable notarytool (sic) overriding `xcrun notarytool`

(currently needed internally for alt builds to be able to use the sign.sh
script, because the notarytool is not in standard path /actually used
XCode 13 for higher macOS version/)
2026-03-04 15:11:59 +01:00
Martin Pulec
642c707dc1 install-common-deps.sh: rm MACOSX_DEPLOYMENT_TARGET
Seems no longer being needed and it is unclear why it was actually needed.

Run download_build_aja() in subshell (not added when the fn split to
download/install in 2024 with the commit 0ed7d449) to avoid leaking
exactly such variables that can influence further workflow.
2026-03-04 12:49:10 +01:00
Martin Pulec
c6f7c11ede install-common-deps.sh: set -x after help
We are using `set -x` so the output is a bit disturbing when using just -h.
But we can move it past the help (the beginning should not cause problems,
ideally).
2026-03-04 12:48:07 +01:00
Martin Pulec
4ebb13969e CI install-common-deps.sh: allow individual inst
Allow installing individual items in case that someone wants to use it
outsice of CI interactively. Also add help for this case.

This is already done so eg. in .github/scripts/macOS/install_others.sh.
2026-03-04 11:31:57 +01:00