Commit Graph

10611 Commits

Author SHA1 Message Date
Martin Pulec
e0991e34ea set_thread_name: use Linux code also for FreeBSD
it happens to have pthread_set_name_np implemented in the same way
2025-05-30 08:10:32 +02:00
Martin Pulec
b2932247c6 configure.ac: use expr -- to handle "-value"
acutally mainly important for the CFLAGS but it is better anywhere

+ enclose the evalated var to "" if not already
2025-05-30 08:10:32 +02:00
Martin Pulec
99d3adaf45 Makefile: add POSTPROCESS_DEPS to manual rules 2025-05-30 08:10:32 +02:00
Martin Pulec
2f599f875d Makefile.in: improve POSTPROCESS_DEPS
In FreeBSD 14.2 Make, $*.d strips the path, eg. src/tst.o becomes tst.d
not src/tst.d.
2025-05-30 08:10:32 +02:00
Martin Pulec
a7f29db2aa net_udp: handle AI_V4MAPPED not being present
eg. OpenBSD - the behavior is then as before the commit e00b7b947
2025-05-30 08:10:31 +02:00
Martin Pulec
5724761356 support for non-Linux POSIX systems 2025-05-30 08:10:31 +02:00
Martin Pulec
db3cef984f Makefile: do not use $< in non-suffix rules
Using $< in a non-suffix rule context is a GNUmake idiom
2025-05-30 08:10:31 +02:00
Martin Pulec
38f134938f compat/net.h: include headers for sockaddr*
eg. sockaddr_storage used by rtp/pbuf.h
2025-05-30 08:10:30 +02:00
Martin Pulec
943492eeff Makefile: replace rule syntax from GNU to POSIX
replace the GNU pattern rule syntax with POSIX suffix rules
2025-05-30 08:10:30 +02:00
Martin Pulec
08f03b6218 confugre.ac: use -pthread for any BSD 2025-05-30 08:10:30 +02:00
Martin Pulec
d9ba59e442 Makefile: silence DLL_COPY
Since the previous commit, it is performed on all platforms but since
the variable is empty, do not spoil the stdout with irrelevant command.
2025-05-30 08:10:30 +02:00
Martin Pulec
90d755c076 Makefile: rewrite GNU Make-specific stuff 2025-05-30 08:10:28 +02:00
ATrivialAtomic
98e320fc69 vcomp/cmpto_j2k: ignore quality if lossless is selected
If a lossless cstream is requested, quantization isn't needed.  Notify the user that quality is ignored when :lossless selected.
2025-05-29 12:56:31 -04:00
ATrivialAtomic
6db36069ce vdec/cmpto_j2k: cstream ext info for lossiness information
If able to get the ext info, show J2K codestream lossiness type. Otherwise, throw a warning, but continue on since it shouldn't affect the ability to decode.
2025-05-29 12:52:45 -04:00
Martin Pulec
b9d6ed5a42 utils/opencl: include hdrs only if needed
much of the headers isn't needed when ndef HAVE_OPENCL
2025-05-29 14:37:13 +02:00
Martin Pulec
61e24613cd list_opencl_devices: error impl if not compiled
As openg_get_device has dummy implementation, do it in the same manner
for this fn.
2025-05-29 14:37:12 +02:00
Martin Pulec
55b239f09e utils/opencl: prefer GPU to CPU if unspec
prefer devices in this order (1st found used):
1. accelerator
2. GPU
3. CPU
4. any
2025-05-29 14:21:45 +02:00
Martin Pulec
c2869a093b utils/opencl: refactor
early exit if no device (param) requested/specified by user

pure refactor
2025-05-29 14:21:44 +02:00
Martin Pulec
a6356b2915 vcomp/cmpto_j2k: info about CL type spec 2025-05-29 14:21:44 +02:00
Martin Pulec
98075dac66 utils/opencl: possibility to specify device by type
cpu, gpu or accelerator
2025-05-29 14:21:40 +02:00
Martin Pulec
d7a293c58a utils/opencl: more device info in fullhelp 2025-05-29 13:44:14 +02:00
Martin Pulec
ec869695f9 vcomp/cmpto_j2k: separate tech-spec help with \n 2025-05-29 08:35:46 +02:00
Martin Pulec
21fffadbed vcomp/cmpto_j2k: print cl devices in help 2025-05-29 08:14:49 +02:00
Martin Pulec
0aa26a6e18 cuda_wrapper_print_devices_info: rm quotation m.
removed quotation marks - personally it looks better without (it was
ported as it was from GPUJPEG)

+ replace kB units with more correct KiB (already in GPUJPEG)
2025-05-28 09:27:14 +02:00
Martin Pulec
72f297acdf vcomp/cmpto_j2k: show cuda dev details in fullhelp
(fullhelp was added)
2025-05-28 09:19:25 +02:00
Martin Pulec
594e3f06db vcomp/cmpto_j2k: print cuda devices in help 2025-05-28 09:11:47 +02:00
Martin Pulec
cd313a7fc6 vcomp/cmpto_j2k: print CUDA info only if relevant
print it only if the codec supports CUDA
2025-05-28 08:45:33 +02:00
Martin Pulec
eb26dab805 utils/opencl: check errors+print name 2025-05-28 08:28:27 +02:00
Martin Pulec
4846ed4bbf vcomp/cmpto_j2k: add experimental support for OCL 2025-05-28 08:28:07 +02:00
Martin Pulec
8dcce666a0 vcomp/cmpto_j2k: merge get_technology w. _default_
merge get_technology() and get_default_technology()

- availability of valid technology is now verified by get_technology()
- priority list of technologies is now allowed (eg. "cuda,cpu" (default)
and "cpu,cuda")
- placeholder for GUI set to "cuda", not "gpu"
2025-05-27 08:28:27 +02:00
Martin Pulec
1d5d55c484 vcomp/cmpto_j2k: free state if no tech
clean up if failed to set technology (default or user-specified)

If failed print the reason in get_default_technology() not _init()
(it is also so in get_technology()).
2025-05-26 14:22:59 +02:00
Martin Pulec
159ce3f8ae vcomp/cmpto_j2k: j2k_compress_init improvements
- avoid goto - call _done + return NULL instead
- use std::string as a container for cfg instead of alloca
- in j2k_compress_done, mod must be cast directly to the state (priv_data
not set at that point)
2025-05-26 14:22:53 +02:00
Martin Pulec
ec21f45a52 vdec/cmpto_j2k: missing space (MOD_NAME) 2025-05-23 15:30:24 +02:00
Martin Pulec
5b2882d89d vdec/cmpto_j2k: fix limit=# (->4)
+ print in with single command
2025-05-23 15:30:24 +02:00
Martin Pulec
495461f29b vdec/cmpto_j2k: remove uneeded code
The (re)initialization is now in _reconfigure - no need to initialize
it prior to. But move the informative MSG() to reconfigure.

Also removed duplicite headers.
2025-05-23 15:30:23 +02:00
Martin Pulec
e73bee0910 vdec/cmpto_j2k: throw if no technology
- when no technology at all - it would fail later, anyways
- remove the informative message (just for CPU but not in the opposite
case) - the used device type will then be printed out, anyways
- also assume in _reconfigure that we have valid technology
2025-05-23 15:29:25 +02:00
Martin Pulec
2121650aa7 Merge branch 'ATrivialAtomic-wip-cmpto-j2k-cpu' 2025-05-23 12:27:27 +02:00
Martin Pulec
4be56c4326 vcomp/cmpto_j2k: add lossless option 2025-05-21 13:43:06 +02:00
Martin Pulec
f8adbd0972 vcomp/cmpto_j2k: if bitrate not set, print unset, not unsetbps 2025-05-21 13:43:06 +02:00
Martin Pulec
9adce8fec8 vcomp/cmpto_j2k: print tech name in status 2025-05-21 13:43:06 +02:00
Martin Pulec
9106f862f3 vcomp/cmpto_j2k: hint that q=1 is best 2025-05-21 13:43:06 +02:00
Martin Pulec
3a5eda3180 vcomp/cmpto_j2k: set img_limit=0 + separate opt
- add separate opt img_limit (from tile_limit) but basically does the same
- set the img_limit to 0 by default
2025-05-21 13:43:05 +02:00
Martin Pulec
c2c3a6a789 vcomp/cmpto_j2k: help improve (bin prefixes) 2025-05-21 13:43:05 +02:00
Martin Pulec
70e3865592 vcomp/cmpto_j2k: opt names in desc
Do not print just eg <q> for quality, because now 't' is initial letter
for both tile_limit and technology.
2025-05-21 13:43:05 +02:00
Martin Pulec
37c6ed0267 cmpto_j2k: default mem_limit in the desc struct 2025-05-21 13:43:05 +02:00
Martin Pulec
e1ad16d7ef cmpto_j2k: added thread_cnt option 2025-05-21 13:43:05 +02:00
Martin Pulec
762d330849 vcomp/cmpto_j2k: support for CPU backend 2025-05-21 13:43:04 +02:00
Martin Pulec
971b1463da vcap/ximea: IWYU 2025-05-21 13:42:50 +02:00
Martin Pulec
96fc3a5d79 vcap/ximea: avoid gcc warning
```
ultragrid/src/video_capture/ximea.c:100:27: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
  100 |                 char path[strlen(XIMEA_LIBRARY_PATH) + 1 + strlen(XIMEA_LIBRARY_NAME) + 1];
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```

Both XIMEA_LIBRARY_PATH and XIMEA_LIBRARY_NAME are actually char[]
defined in config.h.
2025-05-21 13:01:18 +02:00
Martin Pulec
02db6ee2d6 INSTALL: typo + copyright date
but the file is vastly obsolete (eg. the DVS)
2025-05-20 14:05:40 +02:00