Commit Graph

7021 Commits

Author SHA1 Message Date
Martin Pulec
970475c3f5 video_decoders: rm libavcodec/defs.h inc by mistake
Added unintentionally with IWYW but the older versions of
libavcoded didn't have the header (and had it included directly in
libavcodec/avcodec.h that is included later).
2024-09-24 08:11:00 +02:00
Martin Pulec
264d40af94 RTP: print bound ports in verbose
Until now, in verbose mode was printed the dynamically selected port
pair. But the knowledge should be useful also to ensure the ports where
it doesn't need to be clear, eg. in server mode or for receiver to see
that 5004 is indeed bound.
2024-09-23 14:11:08 +02:00
Martin Pulec
c572e20959 vdisp/sdl2: removed param sdl2-r10k
It didn't seem that R10k worked for anyone before 18th Sep (commit
3c9e2602) because bit shuffling is needed (r10k_to_sdl2()).

Also the negative meaning (=no), which has been added just in the last
week commit can be replaced with '--param decoder-use-codec='!R10k'`.
2024-09-23 14:11:07 +02:00
Martin Pulec
ccfbd9b03b video_decoders: allow display codec blacklist
using param decoder-use-codec with an exclamation mark
2024-09-23 14:11:07 +02:00
Martin Pulec
b52bf7b991 video_decoders: improved including 2024-09-23 14:11:07 +02:00
Martin Pulec
36d5affe8e video_decoders: use PADDING not MAX_PADDING
But set the padding as the maximum of AV_INPUT_BUFFER_PADDING_SIZE
(if there is include) and MAX_PADDING (both are currently 64).

Use __has_include() instead of HAVE_LIBAVCODEC_H.
2024-09-23 14:11:03 +02:00
Martin Pulec
e1b37950ca vcap/aggregate: improved includes
avoid including config*.h
2024-09-20 16:09:41 +02:00
Martin Piatka
2798cfb5f8 capabilities: Report placeholder text for codec options 2024-09-20 15:33:22 +02:00
Martin Pulec
be0b38e647 vdisp/sdl2: handle R10k as other pixfmts 2024-09-18 16:03:43 +02:00
Martin Pulec
3a238de998 vdisp/sdl: R10k conversion optimized
Create inner loop with fixed amount of iterations (16). This will allow
the compiler to unroll the inner loop and vectorize (16 iterations per
4 bytes is 512b allowing up to 512b instructions).

The eventual rest (%16 != 0) is computed per pixel as it used to be..
2024-09-18 14:35:48 +02:00
Martin Pulec
70e169db3f utils/misc: improved including 2024-09-18 14:35:48 +02:00
Martin Pulec
3c9e260240 vdisp/sdl2: enable R10k
Seem to be working now (but requires a byte swap for the R10k pixels
values).

refer to GH-412
2024-09-18 14:34:57 +02:00
Martin Pulec
7b3953615b vdisp/sdl2: putf - early return on poison pill 2024-09-18 10:30:56 +02:00
Martin Pulec
78fa125ff8 vdisp/sdl2: if [WAYLAND_]DISPLAY undef, use KMSDRM
If neither DISPLAY nor WAYLAND_DISPLAY environment variable is defined,
set driver=KMSDRM by default in Linux.
2024-09-17 14:37:51 +02:00
Martin Pulec
e2ff36750e vdisp/sdl2: accept opt prefixes 2024-09-17 12:07:09 +02:00
Martin Pulec
5546f5c904 vdisp/sdl2: accept (and prefere) renderer name
Accept renderer option given by a name in addeition to the index (which
is still supported but no longer preferred/advertised).
2024-09-17 11:57:34 +02:00
Martin Pulec
eacf6bf8a5 vdisp/sdl2: check renderer range 2024-09-17 11:37:04 +02:00
Martin Pulec
0621d8e938 vdisp/sdl2: handle splashscreen reconf err
If the SDL display reconfiguration fails for some reason when setting
the splashscreen, the display freezed at subsequent _getf.
2024-09-17 10:26:06 +02:00
Martin Pulec
cb1fe717c1 vdisp/sdl2: print version in help 2024-09-17 10:24:31 +02:00
Martin Pulec
c05a49a596 vdisp/sdl2: correct includes 2024-09-17 10:24:27 +02:00
Martin Pulec
73a5b0f552 vdisp/sdl2: call SDL_VideoInit before SDL_Init
In order to the initialize the option `driver=` successfully the video
subsystem must be called with the driver name (SDL_VideoInit), not with
SDL_Init[SubSystem].

This allows eg. `-d sdl:driver=KMSDRM` to be used.

Also use the driver in show_help (for `-d sdl:driver=KMSDRM:help`),
otherwise will SDL_Init() in help complained that "x11 not available".

refers to GH-412
2024-09-16 16:28:08 +02:00
Martin Pulec
81e6766594 rtp/audio_decoders: include-what-you-use
improved including

+ include guard to the header
2024-09-16 16:28:08 +02:00
Martin Pulec
95ae4c0616 invalid_arg_is_numeric: handle also macOS
std::invalid_argument::what() returns in macOS the string:
"stoi: no conversion"
2024-09-13 15:35:44 +02:00
Martin Pulec
ef0cd7130d unify stod/stoi invalid_argument::what parse
This is a hack to check whether given invalid_argument message belongs
to stoi/stod. It is usually used to catch non-numeric user input where
a number was expected.
2024-09-13 15:35:44 +02:00
Martin Pulec
ab25c2d1fc audio volume format: delimiting '/' unformatted
it very slightly helps readibility
2024-09-13 15:35:44 +02:00
Martin Pulec
86e218f40a audio/utils: improved including 2024-09-13 15:35:44 +02:00
Martin Pulec
6aed0ee771 audio: unify volume statistics formatting 2024-09-13 15:35:42 +02:00
Martin Pulec
414a333041 vcomp/cmpto_j2k: print CUDA support in usage 2024-09-13 15:23:33 +02:00
Martin Pulec
1e9d6ded84 vcomp/cmpto_j2k: add units to summary
In the previous commit just SI prefixes were printed.
2024-09-13 08:26:29 +02:00
Martin Pulec
db348ae9e5 vcomp/cmpto_j2k: print used parameters 2024-09-12 16:35:58 +02:00
Martin Pulec
0a8467b01f vcomp/cmpto_j2k: print opt hint in help
+ use unit_evaluate_dbl (instead of unit_evaluate) - **also** in decompress
2024-09-12 16:35:57 +02:00
Martin Pulec
ff1d9f3e9f vcomp/cmpto_j2k: accept opt prefixes 2024-09-12 16:35:57 +02:00
Martin Pulec
dfda8de842 vcomp/cmpto_j2k: advertise -O j2k-enc-cpu-conv
The GPU conversion should be better choice in general. The situation
where it can be useful is when the GPU is working hard to manage the
compression alone so that deploying on CPU saves some performance for
the encoder.
2024-09-12 16:35:57 +02:00
Martin Pulec
92565ca2ae vcomp/cmpto_j2k: run GPU conv as prepreprocess
Set the pixfmt conversion CUDA kernel as cmpto_j2k_enc preprocessor,
not run directly.

This also eliminates to need to have the conversion kernel if conversion
is needed - CPU conversion will be sufficient. Currently not effective,
only R12L is converted for which there is the kernel.

refer to GH-406
2024-09-12 16:35:41 +02:00
Martin Pulec
caacebca37 vcomp/cmpto_j2k: allow late (lazy) initialization
Initialize the encoder stuff in configure_with, not _init.

It will allow the encoder parameter changes during the
reconfiguration. This will, however, require additional syncrhonization
and cleanup on the reconf.

There is no functional change in this commit but it changes the internal
behavior, namely the codec state is destroyed on reconfiguration and
newly created.
2024-09-12 15:06:00 +02:00
Martin Pulec
9b9105f6ae tx audio R-S warning: use the correct max_len
The data_len var used to compute packet_count may be lesser than its
initial value (tx->mtu - hdrs_len) because it might have been decreased
to number of remaining bytes of the last packet.

Returned back data_len to the do-loop and compute the value as
max_len.
2024-09-11 15:28:30 +02:00
Martin Pulec
8ff8a78592 tx audio: warn if Reed-Solomon is inadequate
refer to GH-408
2024-09-11 14:48:52 +02:00
Martin Pulec
215b823861 Reed-Solomon: add defaults for audio
For unsompreesed audio, where it has only the advantage, set default
R-S values to k=160 n=240 (50 % redundancy).

For uncompressed audio, the number of packets per frmae start at 3
(for 16-bit 30p), for which the value is appropriate. Not for the
audio captured at 60 Hz, however. Here it, is 1600 B with 16-bit samples,
with the R-S FEC this yields 2 packets only.
2024-09-11 13:11:09 +02:00
Martin Pulec
5bae31fb81 fec.cpp: include-what-you-use
+ replace `using namespace std` with individual items
2024-09-11 12:27:07 +02:00
Martin Pulec
19aa9803f2 fec/RS+LDGM: print setting when init
The values may not be set explicitly by the user so print the info.
2024-09-11 11:24:48 +02:00
Martin Pulec
002bb4dc7f tv.h (+others): get rid of NS_IN_MS[_DBL]
Use rather the more comprehensible NS_TO_MS and NS_TO_MS function-like
macros (obvious from what to what the conversion is performed).
2024-09-10 16:40:29 +02:00
Martin Pulec
0b5a3dc517 vcec/lavd: fixed check_duration arg
Actually the original value should have triggered the warning almost
always when there is RGB->YCbCr or YCbCr->RGB conversion. Seemingly it
doesn't happen often.
2024-09-10 16:28:21 +02:00
Martin Pulec
6a5758ef48 kernels.cu: compat 2024-09-10 16:10:04 +02:00
Martin Pulec
8b7db976c8 cmpto_j2k: print also cpu convs duration
in debug
2024-09-10 15:24:36 +02:00
Martin Pulec
faa6a7bd72 rt48_to_r12l_compute_blk: fixed odd widths
see the previous commit as well
2024-09-10 15:24:36 +02:00
Martin Pulec
4c12bc85da r12l_to_rg48_compute_blk: fixed odd widths
Fixes unaligned access introduced in HEAD~2 (optimizing the r12l_to_rg48
kernel).
2024-09-10 15:24:36 +02:00
Martin Pulec
dfba579437 rt48_to_r12l_compute_blk: optimize as well
see the previous commit

Duration for 4096x2160 reduction is from some 18.5 to 0.5 ms.

refers to GH-406
2024-09-10 15:24:36 +02:00
Martin Pulec
f17b0d8487 r12l_to_rg48_compute_blk: optimize
load/store uint32_t to optimize the performance

This reduces the duration from some 16.6 ms to 0.6 ms for 4096x216 on
1080 Ti.

refers to GH-406
2024-09-10 15:24:16 +02:00
Martin Pulec
4d5f7a76ac kernels: report elapsed mode in debug
Instead of using compile-time DEBUG macro, prefer run-time specified
log_level.
2024-09-10 12:07:05 +02:00
Martin Pulec
b1cd3166c4 Revert "export: crash if nullptr passed"
This reverts commit 4143900605.

Actaully, the transcoding reflector doesn't set the export module,
so that it will crash with this. Crasing command:
```
hd-rum-transcode 8M 5004 -c lavc -P 6004 100::
```
2024-09-10 09:17:34 +02:00