Commit Graph

7063 Commits

Author SHA1 Message Date
Martin Pulec
6b87da86b5 AV_CODEC_CAP_OTHER_THREADS compat
AV_CODEC_CAP_OTHER_THREADS was AV_CODEC_CAP_AUTO_THREADS in older
libavcodec versions.
2022-12-09 12:09:43 +01:00
Martin Pulec
bfe2ee4255 CI Linux FFmpeg: add openVPL
refer to GH-270
2022-12-09 10:52:07 +01:00
Martin Pulec
5afbd5c1ef added fallback yuv444p12le_to_uyvy 2022-12-08 16:18:08 +01:00
Martin Pulec
dabcc0c6f7 added convs from AV_PIX_FMT_YUV444P12LE to Y416,v210
+ added missing always_inline attributes
2022-12-08 16:13:54 +01:00
Martin Pulec
f99e011417 added yuv444p16le_to_y416
refers to GH-275
2022-12-08 14:29:06 +01:00
Martin Pulec
9753112d42 updated NEWS 2022-12-08 13:34:57 +01:00
Martin Pulec
d3130c0038 color_out: added dark yellow
+ helper macros for normal yellow
2022-12-08 10:43:10 +01:00
Martin Pulec
df235228cd vulkan: use Vulkan in window name instead of SDL2 2022-12-07 14:20:50 +01:00
Martin Pulec
6e4e85d6db crop: prefer "size" than width/height
Added option "size" instead of separate "widht"/"height". Both
dimensions need to be entered, anyway, so it is not needed to type more
characters than necessary.

Width/height param is parsing is left for compatibility (for now).
2022-12-07 12:39:50 +01:00
Martin Pulec
b61d7ddf37 lavd: added/fixed aligntment assertions 2022-12-07 12:39:49 +01:00
Martin Pulec
04cd6d4651 added yuv444p10le_to_y416
+ announce Y416 lavd conversions (to Y416 and internal Y416)

closes GH-275
2022-12-07 12:39:49 +01:00
Martin Pulec
ae70df176d dummy display: small refactor (fmt parse func)
+ missing includes
+ check codec array overflow
2022-12-07 12:39:49 +01:00
Martin Pulec
fd9821dc75 dummy disp: allow multiple codecs for "codec" opt 2022-12-07 12:39:49 +01:00
Martin Pulec
ffcf7d3117 vulkan yuv->rgb conv: mark coefs as BT.709
The values were marked as a placehoolder (as in GL) but are constants
here, namely BT.709 so rename it as such.
2022-12-07 12:39:43 +01:00
Martin Piatka
f213c0649f lavd: Add initial nvdec support
Note that only copy mode is supported right now - meaning that decoded
frames are copied from the GPU to the system memory. For simpler codecs
like H.264 this could actually be slower than sw. decoding. VDPAU is
probably still a better choice for codecs supported by it.

Right now ffmpeg prioritizes vdpau, so this will get selected only when
vdpau is unavailable or fails to initialize.
2022-12-06 15:54:24 +01:00
Martin Pulec
b22318634d lavc NVENC: use param lavc-rc-buffer-size-factor if set
+ hint
2022-12-06 15:48:10 +01:00
Martin Pulec
19aaeeb3c8 fixed a crash of vidcaps with own FPS indicator 2022-12-06 15:00:55 +01:00
Martin Pulec
06f74f7592 lavc NVENC: warn if FFmpeg is not patched 2022-12-06 14:27:06 +01:00
Martin Pulec
419afb0977 lavd: set GPU if decoder is cuvid 2022-12-06 12:05:30 +01:00
Martin Pulec
63279eed7e lavd: removed unneeded repeated zeroing
already zero-initialized
2022-12-06 10:02:02 +01:00
Martin Pulec
e5cbb2a175 lavd: print similiar performance hint as lavc 2022-12-06 09:55:39 +01:00
Martin Pulec
b17dad13f9 lavc: allow option listing also for decoders 2022-12-06 08:47:52 +01:00
Martin Pulec
f029f465a1 lavd: removed unused member 2022-12-05 16:04:06 +01:00
Martin Pulec
c48b614cdc lavc: simplify also rest of opts 2022-12-05 16:04:03 +01:00
Martin Pulec
fcb87b6b4d lavc: add a hint to increase throughput
If the compression cannot make it, print a hint that would perhaps
increase a latence and thus is not enabled by default.

As as consequence of that, set NVENC delay to 0 again to be consistent
with the other compressions (latency preferred).
2022-12-05 15:36:54 +01:00
Martin Pulec
2f01fbc323 lavc: do not suggest frame threads if not avail. 2022-12-05 14:54:46 +01:00
Martin Pulec
fd15d5f9bf lavc opt setting simplified
use predefined error-checking function
2022-12-05 14:54:03 +01:00
Martin Pulec
f2884aeec0 testcard: bpp should be in bits not bytes 2022-12-05 12:22:58 +01:00
Martin Pulec
0d52f02ccf fixed hevc_nvenc AppImage not working on Pascals
The bug is induced by upstream FFmpeg changes, in particular:

    28680e2f41

Supposedly "disabled" is the only supported b_ref_mode for Pascal cards
and it fails if not set (set otherwise). We don't use B-frames at all so
it can be disabled by default, anyways.

closes GH-273
2022-12-05 11:56:56 +01:00
Martin Pulec
dd5fda2f1a get_ug_codec_to_av: prefer first AV codecs
If earlier codec is convertible, use this. In other words, prefer first
codecs, not those most easily convertible.

The point is, that the list passed to get_format lavd callback is
usually ordered from best codecs so we want to keep it.

It also fixes a "regression" from 4c5cf6f2 (given by the different
selection schemes in original and the replacement):

   uv -t testcard:codec=R12L -c libavcodec:encoder=libsvt_hevc -d dummy \
        --param force-lavd-decoder=libde265 -V

decoding YUYV, not v210 (from AVPixelFomat AV_PIX_FMT_YUV444P10LE)
2022-12-02 15:26:55 +01:00
Martin Pulec
63043e2f26 lavc: allow to set also nr of converion threads 2022-12-02 14:12:11 +01:00
Martin Pulec
4c5cf6f2be lavd simplified 2022-12-02 13:43:26 +01:00
Martin Pulec
18b47e7f85 lavd probe fixes
Fixed incorrectly selected UYVY with following command:

    uv -t testcard:codec=R12L -c libavcodec:encoder=hevc_nvenc --param force-lavd-decoder=hevc_cuvid -d dummy -V

There were 2 problems:

1. probed codec should be returned after first successful decoded frame
   because in the above case, the decoder offers nv12 via get_frame
   callback first and it changes later to yuv444p16le if decoding
   continues and succeeds (see also 2.)

2. get_format_callback() returned VIDEO_CODDC_NONE on probe but that
   caused subsequent initialization of 'hevc' decoder (because lavd
   thought that it failed). Because of that, the probe couldn't have
   proceeded.

After the changes, the probed format is R10k (correct for now -
get_best_ug_codec_to_av({AV_PIX_FMT_YUV444P16, 0}, 0) returns R10k).
2022-12-02 12:25:36 +01:00
Martin Pulec
fb0729bb6e AppRun: do not mount /tmp RO if will be written 2022-12-02 11:18:12 +01:00
Martin Pulec
a2b0105001 PAM/Y4M utils: move implementation to .c file 2022-12-02 11:15:21 +01:00
Martin Pulec
207874398b CI FFmpeg Linux: added libde265
with own patch
2022-12-02 11:15:21 +01:00
Martin Pulec
f1556436b1 video_display.h: document timeout_ns parameter
It has replaced flags recently but it doesn't seem to have much
importance but it makes the modules implementing that more complex so
added a hint that only BLOCKING/NONBLOCK/DISCARD are important values.
2022-12-02 11:15:21 +01:00
Martin Pulec
de64f60d29 AppRun: simplify a bit
do more work in add_whitelist()
2022-12-02 11:15:20 +01:00
Martin Pulec
2714c6b3bf AppRun: watch adding /tmp
Beware not to add --whitelist=/tmp[something] because that would hide
the actual mounted image (/tmp/.mount_ultragridsomething). As /tmp is
remounted RO, just make the "whitelisted" dirs RW.

+ add to whitelist $DIR (path to executable) if it is not /tmp (eg.
  extracted AppImage somewhere)
2022-12-02 11:15:18 +01:00
Martin Piatka
cee4f37ebc configure: Check for vulkan headers
The vulkan.pc pkgconfig file is for the vulkan loader library and
doesn't guarantee the presence of the vulkan headers. Indeed, some
distributions (e.g. Arch) package those in separate packages
(vulkan-icd-loader and vulkan-headers).

It would be perhaps more correct to check for vulkan.hpp, but that
header is so big that it would slow the configuration by ~10 seconds.
2022-12-01 10:49:52 +01:00
Martin Piatka
c33c39da10 multiplier disp: Pass reconfigure to all displays
Fixes crash when used with the vulkan display.
2022-12-01 10:49:52 +01:00
Martin Pulec
9b1df905b0 fixed condition in 9b80a61d 2022-11-30 13:55:57 +01:00
Martin Pulec
f93776e7be main: help: hide also some other options
Hidden port, cuda-device and rate limiter in basic view. Those are not
more important than many of already hidden.

- cuda device - slightly changed description 's/CUDA device/GPU' - it
  actually selects a card also for NVENC, in the end
2022-11-30 12:27:16 +01:00
Martin Pulec
c554fc707f lavc SVT HEVC: disable UnrestrictedMotionVector
Together with tiles setting, it should enable Motion Constrained Tile
Sets (MCTS) that should allow independed tile decoding. But it doesn't
seem to be currently the case with FFmpeg HEVC decodeer.
2022-11-30 11:36:53 +01:00
Martin Pulec
38b13bd63d lavc SVT: check for libsvtav1 explicitly
If checking AV1 properties, check if the codecs is really libsvtav1. It
can be also libsvt_vp9, where the option setting would fail (athough
innocent, it may be confusing).
2022-11-30 10:43:25 +01:00
Martin Pulec
9b80a61d9f lavc: do not enable MT with CAP_OTHER_THREADS
Only enable for libvpx*.

Codecs must be individually evaluated - for libx265, it increases
latency because it uses frame threading parallelism internally.

For libsvt_hevc and libx264, the performance boost is not noticeable.
2022-11-30 08:55:46 +01:00
Martin Pulec
a578d84b90 lavc vpx: set rc_lookahead to 0
to reduce latency
2022-11-30 08:55:46 +01:00
Martin Pulec
2dd9b39d58 lavc show_encoder_help: print default values 2022-11-30 08:55:46 +01:00
Martin Pulec
df327548e2 libavcodec NVENC: set p4 also for HEVC
NVENC 12.0 and above supports Split Frame Encoding up to p4 so it is
perhaps better to set default as such. See also:

    https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-video-encoder-api-prog-guide/#multi-nvenc-split-frame-encode
2022-11-30 08:55:43 +01:00
Martin Piatka
1274775af5 Update NEWS 2022-11-29 12:53:28 +01:00