Commit Graph

7684 Commits

Author SHA1 Message Date
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
663f5d8a81 vdisp/gl: fix wrong pointer passed with help
Fixes the commit 9c597ae1 (yesterday) - after the move, the ptr must
have been replaced for tok, otherwise passing 2 or more options to gl,
like `-d gl:fs:cursor`, causes segfault.
2025-05-20 10:29:53 +02:00
Martin Pulec
c54e9d4d59 vdisp/sdl3: fixed running with size=
When pixel format changes - which is almost always if CS doesn't match
the splashscreen and some conversion is needed, the cs_data member needs
to be updated to contain curremt conversion data).
2025-05-19 15:13:42 +02:00
Martin Pulec
1fb1fbe877 vdisp/sdl2,sdl3: accept mode name for size
_but_ size= doesn't seem to work with sdl3 for YCbCr formats (does for RGB)
2025-05-19 15:13:42 +02:00
Martin Pulec
10db49b68b vdisp/sdl2,sdl3: fix typo in "size" (was "siz")
+ remove trailing '=' - although it works, IS_KEY_PREFIX is meant to be
called without it
2025-05-19 15:12:37 +02:00
Martin Pulec
0953b8cf76 vdisp/gl: accept also mode names for size= 2025-05-19 15:01:33 +02:00
Martin Pulec
9c597ae19d vdisp/gl: gl_show_help only if :[full]help
Be more restrictive when parsing the help option - do not print the
master help eg. on size=help.
2025-05-19 15:01:33 +02:00
Martin Pulec
32bdfed7f0 get_video_desc_from: accept <W>x<H>[@<FPS>[<suff>]]
accept the syntax in format <W>x<H>[@<FPS>[<suff>]]

this requires also some changes in parse_fmt, namely:
1. parse the suffix
2. parse fps with strtod - this format should allow 1920x1080@59.94i
3. related with the point 2. - do not adjust 59->59.94 if the above
format used - compared to BMD modes like Hi59, there the 59.94 mode
should be written in full (so 1920x1080@23 will be 23 FPS, indeed)
2025-05-19 15:01:33 +02:00
Martin Pulec
dcbdc046f0 video.cpp: IWYU 2025-05-19 15:01:33 +02:00
Martin Pulec
f708ce71bc get_video_desc_from_string: hint for fullhelp 2025-05-19 15:01:32 +02:00
Martin Pulec
5fc338cffb get_video_desc_from_string: interl. unless progr.
all interlacing modes are actually interlaced except PROGRESSIVE
2025-05-19 15:01:15 +02:00
Martin Pulec
af2981758b coreaudio: add alloc assertions 2025-05-07 10:13:06 +02:00
Martin Pulec
5a32d7c601 deltacast_common.hpp: fix inverted condition
today's change; just a warning fix
2025-05-06 15:42:36 +02:00
Martin Pulec
454eb7bf6a deltacast: warn if compiling with VideoMaster 6.20
It can be alos 6.19, for which this won't compile, -DVHD_IS_6_20 can be
used to silence the warn for 6.20.
2025-05-06 12:30:42 +02:00
Martin Pulec
2db3abf8f9 vdisp/decklink: do not set pfpr=false
Do not set bmdDeckLinkConfigOutput1080pAsPsF ('pfpr') to false by
default. Most likely not needed and user may configure the device by
itself according to the needs.
2025-05-06 12:28:30 +02:00
Martin Pulec
319cfdeef6 decklink: deprecate PsF in/out options
Since now the options can be specified generically by FourCC 'cfpr' (capture) and 'pfpr'
(display), there is no need to have this explicitly.

Also it doesn't seem to be much useful (at least with the PsF stream from
XDCAM, the stream is detected to be interlaced, not progressive, even
though decklink reports BMDDeckLinkSupportsAutoSwitchingPPsFOnInput=yes).
2025-05-06 12:28:30 +02:00
Martin Pulec
0bc1215c7f acap/coreaudio: fix outputting empty frames
a race condition

Prior to e511f898 (2024-11-14) and still in the stable branch, it
produces:
[Audio decompress] 2 empty channel(s) returned!
2025-05-05 13:54:00 +02:00
Martin Pulec
19f19c300a from_lavc_vid_conv: fix -Wcast-align (clang) 2025-05-05 12:59:36 +02:00