Commit Graph

8490 Commits

Author SHA1 Message Date
Martin Pulec
e288bb4145 lavc hwacc: Vulkan non-presence compat 2023-10-12 13:08:03 +02:00
Martin Pulec
9aa4036056 configure: use mmal PC cflags for header search
The mmal header is in /opt/vc in buster, which is not in the default
search path.
2023-10-12 12:22:19 +02:00
Martin Pulec
8630ca9d3f .github/scripts/Linux/arm/bootstrap.sh: clean-up
Deleted 2 unneeded lines:
1. OLDPWD - not used
2. comment - no longer valid - the cached environment key contains hash
of .github/scripts/Linux/arm/bootstrap.sh, which means that if the file
changes, the old env is not used, anyways
2023-10-12 10:45:17 +02:00
Martin Pulec
c3e4e2cc5d to_lavc_vid_conv: added rgb_to_yuv444p
For following command, deduced conversion is to 10-bit YUV:

    $ uv -t testcard:c=RGB -c libavcodec:enc=libx264 -d gl
    [to_lavc_vid_conv] converting RGB to yuv444p10le over R12L

(and over R10k for RGBA) which is correct, because we don't have any
8-bit YUV pixfmt keeping 4:4:4 subsampling.

But this is quite ineffective because the conversions are more expensive
and we are needlessly compressing 10-bit YUV instead of 8-bit.

Thus (as we don't have any UG 8-bit YUV444 pixfmt) the rgb_to_yuv444p
conversion was added.
2023-10-12 10:21:08 +02:00
Martin Pulec
d056a17661 vidcap file: timestamp media 2023-10-11 16:58:23 +02:00
Martin Pulec
466ac95829 recv buf: issue a warning if unable to set
Issue a warning if unable to set the buffers andreceiving uncompressed
stream, but not not on initial setting, only if increase requested.

The logic is not entirely straightforward - as we are increasing only,
do not assume that the buffer is set to the initial size but rather read
the actual value, which will be less if wasn't possible to set. So the
second attemp issues the warning.
2023-10-11 16:57:53 +02:00
Martin Pulec
c0e69d5896 ixed some more warnings 2023-10-11 16:57:53 +02:00
Martin Piatka
3f50d29246 Updated NEWS 2023-10-11 14:53:51 +02:00
Martin Piatka
fda2f807f1 GUI: vuMeter: add recent maximum peak indicator 2023-10-11 14:45:44 +02:00
Martin Piatka
ed87221071 GUI: vuMeter support varying channel count 2023-10-11 12:39:09 +02:00
Martin Piatka
b6cf85e855 tools/astat: Variable channel count support 2023-10-11 12:39:08 +02:00
Martin Piatka
1208184187 tools/astat: Add missing include guard 2023-10-11 12:39:08 +02:00
Martin Piatka
11a13dec1b audio_decoders: Report volumes for varying channel count
Limit to 8 since the GUI can't show more anyway
2023-10-11 12:39:08 +02:00
Martin Pulec
4377bd071d fixed some warnings 2023-10-10 16:07:09 +02:00
Martin Pulec
fd1d808d66 print supported pixfmts also for DeckLink capture 2023-10-10 16:07:04 +02:00
Martin Pulec
a986431bd5 DeckLink disp.: print supp pixfmts 2023-10-10 14:23:24 +02:00
Martin Pulec
3671acfd11 DeckLink opt shortcuts: use IS_KEY_PREFIX
This allows also something like `-t decklink:dev=1` (in addition to
_codec_ and _c_ until now).
2023-10-10 13:55:24 +02:00
Martin Pulec
04610b4357 format_to_out_bps: document
document that the functions accept value in i32 container but unscaled
2023-10-10 11:15:22 +02:00
Martin Pulec
ea55e0f10d print audio scale adj in verbose mode
This can be particularly useful when scaling is misbehaving and user
has at least verbose logging to notice.
2023-10-10 11:14:52 +02:00
Martin Pulec
61544172c5 get_video_desc_from_string: fixed mode parse
fixed parsing of mode `uv -t testcard:m=2160p25` where it was incorrectly
returned FPS 60 (fixed FPS offset 2 bytes pointing to 21_60_p)
2023-10-10 09:25:12 +02:00
Martin Pulec
2a73855c05 fixed new Coverity issues
fixes CID 41741{7,8}
2023-10-10 08:16:09 +02:00
Martin Pulec
31a8b022c7 allow vdpau-copy lavd HW accel 2023-10-09 16:25:46 +02:00
Martin Pulec
9f1763de23 GL VDPAU: re-added GL_NV_vdpau_interop check
Re-added check to GL_NV_vdpau_interop removed by mistake in commit
bf3b2b3b (21st Apr 2022).

In the previous solution error was written but retval was not checked,
causing a crash. Now only warning is issued and HW_VDPAU is not
offered. In state_vdpau::init() is used assertion.
2023-10-09 16:25:46 +02:00
Martin Pulec
bb4ad12970 AppRun: preload also VDPAU 2023-10-09 16:25:43 +02:00
Martin Piatka
8a9639ec7e Partial Revert "audio: simplified samples storing/loading"
The loading of samples with negative value was not working properly
because of sign expansion. The storing works fine, because samples are
only ever written with the same or less BPS.

This reverts commit 586c3fc585.
2023-10-09 14:14:46 +02:00
Martin Pulec
cb269cf992 lavc video: do not set interlaced DCT for libx265
Interlacing is not honored by libx265, anyways, and this saves the
eventual HWacc warning.

It is still passed to QSV even for HEVC, anyways. Not sure how the API
handles that but FFmpeg seems to pass it.
2023-10-06 16:44:18 +02:00
Martin Pulec
31af5137e7 lavc video: warn also when >8 bit depth used
\+ remove "and not 4:2:0" from subs complaint - it is perhaps needlessly
verbose (other feature doesn't name the correct value. user should be
aware, anyways, and there is also a hint below.
2023-10-06 16:44:18 +02:00
Martin Pulec
3a1de3f966 lavd: check also bit depth for HWacc eligibility 2023-10-06 16:44:18 +02:00
Martin Pulec
778fd40fb1 lavd video: use get_avpixfmts_names
Simplifies the code + removed in that function leading space (used in
original code but the function shouldn't produce leading space).
2023-10-06 16:44:15 +02:00
Martin Piatka
a1ac44a2e2 holepunch: add bind_ip option 2023-10-06 14:00:48 +02:00
Martin Pulec
f2ac2cbdf8 lavc,lavd vid: print used subs in warn
Print used subsampling (or sw fmt in lavd) in warning if not using 4:2:0.

This may be helpful sometimes as an additional information.
2023-10-06 11:26:49 +02:00
Martin Pulec
15fe21df4f lavd video: check vid subs from sw_pix_fmt
Check if video subsampling is 4:2:0 from sw_pix_fmt than iterating over
received pix_fmts. This is simplier and more effective since the SW
format is set the get_format() callback to the nominal SW format (if any).
2023-10-06 11:19:11 +02:00
Martin Pulec
ac110f1b49 vaapi dec.: deduce SW format to reported valid
Set AVHWFramesContext::sw_format to first of av_hwframe_transfer_get_formats().

This is consistent how MPV does that. Fixes NV12 being transmitted
despite AVHWFramesContext::sw_format was set to yuv420p causing chroma
channels corruption (because the nv12 data was misinterpreted as the
latter one) occuring on AMD cards, steps to reproduce:
```
uv -t testcard -c lavc:enc=libx264:safe -d gl --param use-hw-accel=vaapi
```

See also:
<66e30e7f2f>
2023-10-06 11:19:11 +02:00
Martin Pulec
e5d628cd79 lavc: added "safe" option
enables option for HW(-accelerated) decode compatibility:
* subsampling 420
* no intra refresh
* no interlaced DCT
2023-10-06 11:19:11 +02:00
Martin Pulec
000c8c0bdb lavc video help: cmdline print updates
* shorten lines
* print usage where can be seen that there is also fullhelp
2023-10-06 11:19:11 +02:00
Martin Pulec
e990318499 lavc video: handle incompatible subs as other features 2023-10-06 11:19:10 +02:00
Martin Pulec
8d6f622c6e video_compress_info::name no longer used
* removed unused function returning the name
* mark attribute as unused (so that it can be safely removed eg. with
next API change)
2023-10-06 11:19:10 +02:00
Martin Pulec
a68385ba23 vaapi: hide struct to .c file 2023-10-06 11:19:10 +02:00
Martin Pulec
a3edb01d45 HW frame to RAM transfer msg: lower to debug
Verbose messages should't be trigerred with every frame (if it is not
either an errorneous state or something we need the user to inform about).
2023-10-06 11:19:10 +02:00
Martin Pulec
11bf11c784 removed DPX10 pixfmt
Not used anymore by any module. Actually the Bluefish444 that seem to
have handled that doesn't advertise other codec than UYVY by get_property.
2023-10-06 11:19:06 +02:00
Martin Pulec
16fa09eebc debug-dump: print usage with "help" 2023-10-06 08:07:20 +02:00
Martin Pulec
b62566ca72 lavd: advertise accelerated codesc if probed
Advertise conversion to HW-accelerated codecs (eg. HW_VDPAU, RPI4_8)
only if probe (which now works in the same way as regular init since
HEAD^) would initialize to an accelerated codec.

This would prevent situations, when eg. `--param use-hw-accel=vaapi -d
gl` is used, in which case HW_VDPAU was selected as a display codec,
although not intended.
2023-10-06 08:07:19 +02:00
Martin Pulec
1c84e8d546 lavd probe: initialize in a same way as dec
We want rather mimic the actual initialization in the probe.

Also avoid errors like:
````
[lavc hevc @ 0x7f4b0c002700] A hardware frames or device context is required for hardware accelerated decoding.
[lavc hevc @ 0x7f4b0c002700] Failed setup for format vdpau: hwaccel initialisation returned error.
````
2023-10-06 08:07:19 +02:00
Martin Pulec
242581585b lavd probe: get properties from sw_pix_fmt
Currently, if probing, hw acceleration is skipped, but this will change
so this is done in preparation to this.

Also print in verbose mode now (it is now more useful to debug).
2023-10-06 08:07:19 +02:00
Martin Pulec
4f76857e5a lavd: print explicitly if hwacc not enabled
Previously, if '--param use-hw-accel' was specified but the hw
acceleration was not compiled-in, unknown parameter was reported.

This is not entirely acurate and can be a little misleading, rather
print that the support is not enabled directly.
2023-10-06 08:07:19 +02:00
Martin Pulec
df9e382381 lavd: print available HW accels on "help"
also check requested hw accel validity in init
2023-10-06 08:07:19 +02:00
Martin Pulec
2af4ace259 Reed-Solomon (zfec): fixed fec_new fail
With current zfec code, fec_init() needs to be called prior to fec_new(),
otherwise the later one returns NULL.

\+ updated submodule to the current zfec version (requiring fec_init();
but UG will compile with the older zfec version as well)
2023-10-06 08:06:05 +02:00
Martin Piatka
1cbb716198 vcap/pipewire: Buildable without screencast dbus portal stuff 2023-10-05 16:05:17 +02:00
Martin Piatka
4015350998 rtp: Exit with failure if FEC init fails 2023-10-05 16:05:16 +02:00
Martin Pulec
4c250bd274 lavc video: do not report "lavc" shortcut in caps
would be displayed twice in GUI otherwise
2023-10-05 15:05:36 +02:00