Commit Graph

11408 Commits

Author SHA1 Message Date
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
Martin Pulec
0e846d57a6 from_planar: int for width/height
The change to unsigned is rather new and it may be safer actually to
use int (to_planar already uses that) - eg. in the constructiosn where
iterating over multiple lines and then computing the rest, if there is
less than so that we do not wraparound to `UINT_MAX - something`.
2026-03-04 09:04:52 +01:00
Martin Pulec
1c33a5bc34 to_planar: small changes
- uyvy_to_nv12: move width before the loop (clang is complaining)
- r12l_to_gbrpXXle: drop ALWAYS_INLINE+OPTIMIZED_FOR - for GCC/Intel we
get the same performance but for Clang/M1 it is something like 15 % faster
(eg. keeping OPTIMIZED_FOR without ALWAYS_INLINE worsens the performance
on other hand)

except r12l_to_gbrpXXle and derived, we don't have now a benchmark for
2026-03-04 09:04:52 +01:00
Martin Pulec
1d4754b681 tools/Makefile: compat - use :=
GNU Make 3.81 as in macOS 14 doesn't support the new ::= syntax, use
the legacy one.

(the ::= syntax is quite new, defined by POSIX v8 in 2024)
2026-03-04 09:04:52 +01:00
Martin Pulec
2c7bacb65d to_planar: switch to api with data struct 2026-03-04 09:04:52 +01:00
Martin Pulec
f5f3274f51 conversions: remove BYTE_SWAP
The initial use was incorrect - it assumed that on big endian, the bytes
b0,b1,b2,b3 need to be swapped so value b[0] would be what was b[3]
on little-endian which is not true (writting bytes)

This mistake has then spread across UltraGrid.
2026-03-04 09:04:52 +01:00
Martin Pulec
a22bc8f7e9 moved to_planar conversion from pixfmt_conv
this follows the recent similar change for from_planar
2026-03-04 09:04:52 +01:00
Martin Pulec
3aab9e93ab vcomp/cmpto_j2k: do not use else branch after if-return
+ unlock before notify_one
2026-03-04 09:04:52 +01:00
Martin Pulec
06e8278ca8 vcomp/cmpto_j2k: return vcomp_pop_retry
instead of using goto to make the stuff simpler
2026-03-04 09:04:52 +01:00
Martin Pulec
bb95d964fe vcomp/jpegxs: release the bufs in case of error
otherwise we the limited number of buffers can exhaust
2026-03-04 09:04:51 +01:00
Martin Pulec
1e750c5540 vcomp/jpegxs: uses tile API, not frame
The compression compresses just one tile so mark it as using tile API,
not frame API.

The multi-tile frames are seldom, anyways (stereoscopic 3D etc).
2026-03-04 09:04:51 +01:00
Martin Pulec
da3b297bd7 video_compres: rename async_consumer
to async_frame_consumer

While for the tiles async API async_tile_consumer is used, make the
naming consistent.
2026-03-04 09:04:51 +01:00
Martin Pulec
76593184af vcomp/jpegxs: remove out_queue + thread
Dispatch the decompressed frames directy in _pop callback - this is more
convenient, the separate thread doesn't make much sense.

To video_compress API, added a pseudo frame vcomp_pop_retry (maybe not
nicest solution so far) that allows the _pop callbacks return the an
"error" frame that is not processes without the need to handle this
internally (shared_ptr<video_frame{} cannot be returned because it is
the poison pill).
2026-03-04 09:04:49 +01:00
Martin Piatka
995668e058 Move in_addr_t, caddr_t and msghdr to compat/net.h
Used in net_udp.c
2026-03-03 14:10:46 +01:00
Martin Piatka
6144f91f84 net_udp.c: Update comment referencing config_unix.h 2026-03-03 14:10:45 +01:00
Martin Piatka
c7c440c870 compat/net.h: include config.h for HAVE_IPv6 2026-03-03 14:10:44 +01:00
Martin Piatka
50f87b09db rtp.c: Remove config includes 2026-03-03 14:10:44 +01:00
Martin Piatka
f7910bfad6 hd-rum-translator: Fix missing alarm 2026-03-03 14:10:44 +01:00
Martin Piatka
fe076c6c40 rtp/net_udp: Remove config includes 2026-03-03 14:10:44 +01:00
Martin Piatka
cf985d37b3 compat/net.h: Add MAXHOSTNAMELEN 2026-03-03 14:10:44 +01:00
Martin Piatka
3472e80063 hd-rum-decompress.cpp: Code quality improvements 2026-03-03 14:10:44 +01:00
Martin Piatka
cae185534c hd-rum-recompress: Avoid copying shared_ptr 2026-03-03 14:10:43 +01:00
Martin Piatka
6a5678b9f1 hd-rum-recompress.cpp: Add missing zero initializers 2026-03-03 14:10:43 +01:00
Martin Piatka
8fa39a7e99 hd-rum-recompress.cpp: Remove config includes 2026-03-03 14:10:43 +01:00
Martin Piatka
b85c17bc0b hd-rum-decompress: Add missing assert include 2026-03-03 14:10:43 +01:00
Martin Piatka
a79fbfee9d hd-rum-recompress.h: Remove config includes 2026-03-03 14:10:43 +01:00
Martin Piatka
e417b4c970 video_rxtx/sage: Remove config includes 2026-03-03 14:10:43 +01:00
Martin Piatka
e528314e3b video_rxtx/loopback: Remove config includes 2026-03-03 14:10:43 +01:00
Martin Piatka
37fae7eb44 video_rxtx/ihdtv: Remove config includes 2026-03-03 14:10:42 +01:00
Martin Piatka
eff2cbbc84 tools/ipc_frame_ug: Add copyright header 2026-03-03 14:10:42 +01:00
Martin Piatka
ae24fa6159 tools/ipc_frame_ug: Remove config includes 2026-03-03 14:10:42 +01:00
Martin Pulec
260798824d vdec/cmpto_j2k: adapt to updated probe API
pixfmt_desc::subsampling is now `enum subsampling`, not int
2026-03-03 11:29:25 +01:00
Martin Pulec
fb964ae47e vcomp/jpegxs: fix exitting when no frame sent
eg. `uv -c jpegxs` (only)

broken since 942a76725 (2026-02-24)

The `stop` var was actually needed this so revert this occurence but
improve to push to the encoder just if configured.
2026-03-03 09:03:09 +01:00
Martin Pulec
fa313a75b6 vcomp/jpegxs: properly end the queue
Do not bypass the queue by passing empty frame (poison pill) directly to
output queue but leave it passing normally through the pipeline ending
what is needed.

The output queue now can be 1 frame long.

This prevents accumulating frames when not being able to send the frame
at given pace (eg. `-l 10M` and bitrate=20M - this is just an approxmation,
clearly user won't set this but can occur eg. when coonected to 100M
link while the default bittrate is higher for FHD).
2026-03-03 08:52:29 +01:00
Martin Pulec
76223f8e7f vcomp/gpujpeg,jpegxs: improve msg on wrong config
if unknown parameter is passed, use more accurate err emssage

- also use ERROR in gpujpeg
- while IS_KEY_PREFIX is used, it can be also missing value to a known
parameter (eg. jpegxs:bitrate) so mention this as well
2026-03-03 07:54:50 +01:00
Martin Pulec
21fc584896 vcomp/jpegxs: parse_fmt: fix parsing value
fix 697d4bdb (2026-02-23), CID 900814

If parameter without value is passed, atoi(1) is called causing
crash. Currently, all of the parameters (except "help", which is already
handled) should have a value. But user may enter incorrectly a parameter
without value, eg. "blabla" causing the crash.
2026-03-03 07:47:06 +01:00
Martin Pulec
42fbe285eb configure.ac: --with-object-remove - example added 2026-03-03 07:39:04 +01:00
Martin Pulec
4e8e2fa652 decode_planar_parallel: add doxygen documenation
mainly important is the notice that decoding to planar formats (currently
to i420) should not be used
2026-03-03 07:38:51 +01:00
Martin Pulec
e667364445 vdec/jpegxs: configure_with: assert out_codec set
it is actually expected
2026-03-02 12:52:59 +01:00
Martin Pulec
8dd32d1515 vdec/jpegxs: subsampling strongly typed
+ removed the conditon comparing to 0 (should not be the case)
+ improved the message
+ remove no longer unused UNUSED()
2026-03-02 12:52:59 +01:00
Martin Pulec
76f5c60ccb pixfmt_desc: use the enum for subsampling
instead of just an int; the doxy documentation is no longer needed
(enum is documented by itself)
2026-03-02 12:52:59 +01:00
Martin Pulec
e366327553 configure.ac: set C standard to gnu2x for clang<17
to be able to compile normally without setting std in CFLAGS

+ remove it from macos-14 CI

clang 15 as in macOS 14 doesn't support c23 [[attributes]] such as
[[gnu::always_inline]]
2026-03-02 12:52:55 +01:00
Martin Pulec
bd353297ea from_lavc_vid_conv.c: mark one conversion as 02
(faster)
2026-02-27 16:07:15 +01:00
Martin Pulec
50a0fc05fb from_planar: revert back some optimizations
that seem to make a difference as for tool/benchmark_ff_convs (tested
again on x64 with gcc and arm64 with clang)

+ allow setting CFLAGS/CXXFLAGS from cmdline

most of the optimizations is applied just for clang (OPTIMIZED_FOR)

It is not necessary to apply the flags to all - some conversions seem
to be faster without, eg. gbrap->RGB(A).
2026-02-27 16:07:14 +01:00
Martin Pulec
cb5076b768 tools/Makefile: use pkg-config for libavcodec path
eg. when in non-system searched as on Mac with Homebrew
2026-02-27 16:07:14 +01:00
Martin Pulec
bd15860f0c OPTMIZED_FOR: update doc 2026-02-27 16:07:14 +01:00
Martin Pulec
9d2dcc36d1 build: do not use -Ofast
-Ofast is basically -O3 + -ffast-math

But from my measurements (x64 gcc and arm64 clang), it doesn't make
any difference as tested with `tools/convert benchmark`. Actually,
currently almost no conversion uses floating point math except of
vc_copylineUYVYtoRGBA, for which the -ffast-math didn't have any
performance impact.
2026-02-27 16:07:11 +01:00
Martin Piatka
8e1801ecdf disp/v4l2: Remove config includes 2026-02-27 13:09:54 +01:00