This matches cpu_allocator naming and helps to be explicit about what allocator is being used during video_frame_pool creation during `bool state_video_compress_j2k::initialize_j2k_enc_ctx()`
Remove #ifdef HAVE_CUDA
j2k_decompress_platform now uses CMPTO_TECHNOLOGY_{CPU,CUDA} instead of 1, 2
bool supports_cmpto_technology(int) function created for checking if supported technology version is supported on system
j2k_compress_platform now uses CMPTO_TECHNOLOGY_{CPU,CUDA} instead of 1, 2
bool supports_cmpto_technology(int) function created for checking if supported technology version is supported on system
Added NoCmptoTechnologyFound exception for error reporting
Added option "simplex" in a fasshion of "half-duplex" and "full-duplex",
which are informal shortcuts for device profiles.
Here, simplex refers to bmdProfileOneSubDeviceHalfDuplex (1dhd) for 8K
Pro, which basically sets device to a mode that is capable to use all
four connectors for the signal, effectively allowing quad-link input
(eg. 8K).
Latest MSVS 2022 17.10.34928.147 (MSVC v14.40.33807) in GH runner
20240603.1.0) is no longer compatible with CUDA 11.8.0.52206. CUDA refuses
to compile because of unsupported compiler. Previous version 17.9.34902.65
(GH runner 20240514.3.0) was OK.
As MSVS 2022 is supported by CUDA 11.8 in general, we can pass
-allow-unsupported-compiler flag.
If explicit setting of profiles fail, it should be handled as an
error. Unsure if implit setting with stereo should not proceed but if so,
it could be fixed later.
Also advertise (only) the key/value syntax in usage.
\+ removed Macros from clang-tidy suggestion in CONTRIBUTING.md -
doesn't seem to perform better as for the changed line in this commit
(color_printf)
The pointer ifa_addr in struct ifaddrs can be NULL and indeed it occurs
(perhaps with interfaces without assigned addrs?). Steps to reproduce:
```
uv -x sdp -t testcard -c lavc:subs=420
````
Acually there is quite a few that can be set:
1. default compression (witout RC) works quite good
2. bitrate as well (if the bitrate isn't too low)
3. quality controlled RC doesn't seem to work good
Slice considerations:
- 32 (default) triggers a warning for FullHD and OpenH264 will use
16 -> this is OK
- slices=0 would disable multithreading
- setting max_nal_size (with slices=0) would help as well, but it is
not clear what is the "good" value
Not yet added to CI (libopenh264 is included in Ubuntu 22.04, now using
20.04 for the build).
CQP just for number validity (not sure about the reange now), CRF also
the ranged (0-63 - 63 for 10-bit H.264, otherwise 51 /also for higher
bit depth HEVC).
Allow the MOD_NAME to be a variable (like (constexpr const char *)). Using
non-standard extension, the standard one would be __VA_OPT__. Although
it is supported with MSVC 2019/2022, it requires the compiler flag
/Zc:preprocessor.
This version doesn't require that so use it for now. The MSVC is used to
compile the CUDA code and AJA wrapper so not to complicate the things now.
This syntax is supported for both GNU and MSVC:
1. https://stackoverflow.com/a/78185169
2. https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
refer to GH-375
Set automatic number (== 0) of threads if codec advertises
AV_CODEC_CAP_OTHER_THREAD implicitily, with exceptions:
1. AOM AV1, rav1e - seems not to set the number automatically
2. libx26* - allow setting but enables frame threading internally
(which is undesirable)
the current setting applies not just to libvpx* but also to
eg. libopenh264.
Warn if requesting input encoder pixel formats but the encoder is
not specified explicitly, eg. for
`uv -c lavc:codec=H.264 --param lavc-use-codec=help`
we cannot know, whinch encoder will be used in the
end (usually libx264 for YCbCr and libx264rgb for RGB pixel formats).
Although not required for platforms other than Linux, it doesn't hurt
if we use this always (reduce script size and complexity).
\+ also removed setting CC/CXX for Win - perhaps no longer needed but
the second is now overriden, anyways (CPLUSPLUS_COPILER is set to CXX
by default but we override it)
Since we must now build the new libajantv2, which takes some 3 minutes,
cache the build in order not to increase the build time.
Also use libajantv2 path for the SDK instead of AJA (doesn't require
unneeded rename), which will be Windows specific.
Only do it in MSW, since the build is slowest. But it can be easily used
also for other platforms.
Use libajantv2 + switch the build system to the new lib at the same time
(it is easier and there is perhaps not a big advantage to splitthis to
2 steps).