Commit Graph
100 Commits
Author SHA1 Message Date
Timo Rothenpieler cfbebe9dda avcodec/nvenc: deprecated old rc modes, add new ones 2017-05-09 18:38:30 +02:00
Timo Rothenpieler ef390e348e Changelog: document updated Video Codec SDK 2017-05-09 18:38:30 +02:00
Timo Rothenpieler fea4713472 avcodec/cuvid: use capability check instead of dummy decoder 2017-05-09 18:38:30 +02:00
Timo Rothenpieler f15129a44b compat/cuda: fix cast warnings on windows 2017-05-09 18:38:30 +02:00
Timo Rothenpieler 17f63d98e6 compat/cuda: update cuvid/nvdec headers to Video Codec SDK 8.0.14
This raises the required minimum NVIDIA display driver versions:
NVIDIA Linux display driver 378.13 or newer
NVIDIA Windows display driver 378.66 or newer
2017-05-09 18:38:30 +02:00
Timo Rothenpieler 23538ad2eb avcodec/nvenc: remove usage of deprecated fields 2017-05-09 18:38:30 +02:00
Timo Rothenpieler 78518b72cf compat/nvenc: bump nvEncodeAPI.h to Video Codec SDK 8.0.14
This raises the required minimum NVIDIA display driver versions:
NVIDIA Linux display driver 378.13 or newer
NVIDIA Windows display driver 378.66 or newer
2017-05-09 18:38:30 +02:00
Timo Rothenpieler f89a89c550 avcodec/nvenc: use frames hwctx when registering a frame 2017-05-07 13:38:30 +02:00
Timo Rothenpieler dad6f44bbd avcodec/nvenc: support external context in sw mode 2017-05-07 13:35:25 +02:00
Timo Rothenpieler bd717340a2 configure: cuvid hwaccels need the corresponding decoder, not the other way around 2017-03-25 22:39:01 +01:00
Timo Rothenpieler d84c2298e2 avcodec/nvenc: apply quantization factors to cqp 2017-03-23 17:10:52 +01:00
Timo Rothenpieler 7fb2a7afa1 avcodec/nvenc: Deprecate usage of global_quality, introducing qp 2017-03-23 17:10:52 +01:00
Timo Rothenpieler 5cd3cd5b68 avcodec/cuvid: add support for cropping/resizing
Overhauled version, original patch by Miroslav Slugeň <thunder.m@email.cz>.
2017-03-09 18:39:15 +01:00
Timo Rothenpielerandwm4 736f4af4fe ffmpeg_cuvid: adapt for recent filter graph initialization changes 2017-03-03 08:45:43 +01:00
Timo Rothenpieler b27be563a8 compat/cuda: fix ulong size on cygwin 2017-03-01 12:08:34 +01:00
Timo Rothenpieler f747e1533a avcodec/nvenc: allow forcing keyframes by default 2017-02-20 22:38:39 +01:00
Timo Rothenpieler b6f4f0b14b avcodec/cuvid: add format mismatch debug logs 2017-02-14 11:48:38 +01:00
Timo Rothenpieler ce79410bba avcodec/cuvid: set width and height before calling get_format
The external hw_frames_ctx is initialized in that callback, and needs
that information to be accurate.
2017-02-14 11:47:10 +01:00
Timo Rothenpieler b7d480f431 avcodec/cuvid: update hw_frames_ctx reference after get_format call 2017-02-14 11:43:47 +01:00
Timo Rothenpieler be74ba648c avcodec/nvenc: push cuda context before encoding a frame
Thanks to Miroslav Slugeň for figuring out what was going on here.
2017-02-14 11:24:13 +01:00
Timo Rothenpieler 8a3fea14ae avcodec/nvenc: set frame buffer format for mapped frames 2017-02-13 11:30:52 +01:00
Timo Rothenpieler 6b0a3ee6f8 avcodec/nvenc: add logging for more error cases 2017-01-20 10:29:36 +01:00
Timo Rothenpieler 5403d90f32 avcodec/nvenc: make gpu indices independend of supported capabilities 2017-01-20 10:29:36 +01:00
Timo Rothenpieler 00223132e9 avcodec/cuvid: fix compilation with msvc11 2016-12-12 13:09:55 +01:00
Timo Rothenpieler c2f3af57a5 avcodec/nvenc: mark intentional fall through 2016-11-30 12:36:23 +01:00
Timo Rothenpieler 7dafb3a25a avfilter/vf_hwupload_cuda: fix potential leak 2016-11-30 12:36:23 +01:00
Timo Rothenpieler 52773a2c68 avutil/hwcontext_cuda: check for missing pixel format 2016-11-30 12:36:23 +01:00
Timo Rothenpieler 88281a5256 avfilter/vf_scale_npp: check ff_set_common_formats return value 2016-11-30 12:36:23 +01:00
Timo Rothenpieler 5ea8f70623 avcodec/libx264: fix forced_idr logic
Currently, it forces IDR frames for both true and false.
Not entirely sure what the original idea behind the tri-state bool
option is.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-11-22 16:35:08 +01:00
Timo Rothenpieler 8228b714be configure: cuda is no longer nonfree, enable and autodetect by default 2016-11-22 10:34:27 +01:00
Timo Rothenpieler 0faf3c3a25 avfilter/vf_hwupload_cuda: check ff_formats_ref for errors 2016-11-22 10:34:27 +01:00
Timo Rothenpieler b0ca90d7cb avfilter/vf_hwupload_cuda: use new hwdevice allocation API 2016-11-22 10:34:27 +01:00
Timo Rothenpieler a66835bcb1 avcodec/nvenc: use dynamically loaded CUDA 2016-11-22 10:34:27 +01:00
Timo Rothenpieler a0c9e76942 avfilter/vf_scale_npp: use dynamically loaded CUDA 2016-11-22 10:34:27 +01:00
Timo Rothenpieler d9ad18f3b4 avcodec/cuvid: use dynamically loaded CUDA/CUVID
And remove the now obsolete compat headers.
2016-11-22 10:34:27 +01:00
Timo Rothenpieler e6464a44ed avutil/hwcontext_cuda: use dynamically loaded CUDA 2016-11-22 10:34:27 +01:00
Timo Rothenpieler 5c02d2827b compat/cuda: add dynamic loader 2016-11-22 10:34:27 +01:00
Timo Rothenpieler 30c5587503 avcodec/nvenc: add support for forcing intra/idr frames 2016-10-12 20:51:43 +02:00
Timo Rothenpieler 5d4fea88d4 avcodec/cuvid: don't align frame size
hwcontext_cuda was changed to take care of proper alignment internally
2016-10-04 12:58:42 +02:00
Timo Rothenpieler c4b78f9662 MAINTAINERS: add myself for hwcontext_cuda 2016-10-03 15:49:22 +02:00
Timo Rothenpieler a0d7ce1406 avutil/hwcontext_cuda: align allocated frames 2016-10-03 15:49:22 +02:00
Timo Rothenpieler b7bd5b9794 configure: define posix source on cygwin
Some function definitions are missing without it,
for example sigaction.

Fixes ticket #5868
2016-10-02 17:28:30 +02:00
Timo Rothenpieler 97e7f03d35 avutil/hwcontext_cuda: use proper synchronization flag 2016-09-29 22:58:34 +02:00
Timo Rothenpieler ba0e516533 avcodec/cuvid: make use of new av_hwdevice_ctx_create api 2016-09-29 22:58:34 +02:00
Timo Rothenpieler 49511501aa avcodec/cuvid: support a pre-initialized hw_frames_ctx 2016-09-29 22:58:34 +02:00
Timo Rothenpieler f0ea96d8a2 avcodec/cuvid: use actual frame size for buffer allocation 2016-09-29 22:58:34 +02:00
Timo Rothenpieler 856e1eacf7 ffmpeg_cuvid: make use of new av_hwdevice_ctx_create api 2016-09-29 15:57:32 +02:00
Timo Rothenpieler c03b9d6a62 avcodec/nvenc: nicely align AVOptions 2016-09-28 16:48:43 +02:00
Timo Rothenpieler 033f98c902 avcodec/nvenc: add HEVC REXT profile 2016-09-28 16:48:43 +02:00
Timo Rothenpieler a81b000a39 avcodec/nvenc: Make sure that enum and array index match
Based on libav commits by Luca Barbato and Yogender Gupta:
https://git.libav.org/?p=libav.git;a=commit;h=352741b5ead1543d775ccf6040f33023e4491186
https://git.libav.org/?p=libav.git;a=commit;h=e02e2515b24bfc37ede6ca1744696230be55e50b
2016-09-28 16:48:43 +02:00
Timo Rothenpieler 99b823f0a1 avcodec/mpegvideo_enc: fix memory leak
When the input frames contain side data, it will accumulate endlessly in
the coded frame, as av_frame_copy_props will append any new side data.

Fixes ticket #5799.
2016-09-26 18:21:00 +02:00
Timo Rothenpieler 7904859fd8 compat/cuda: convert to unix line endings 2016-09-23 11:43:00 +02:00
Timo Rothenpieler dcea618976 avcodec/cuvid: mark as avoid for probing 2016-09-23 11:17:49 +02:00
Timo Rothenpieler 9777ba33f5 avformat/utils: avoid using marked decoders for probing
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-23 11:16:26 +02:00
Timo Rothenpieler 30d3e36a46 avcodec: add new AVOID_PROBING capability
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-23 11:15:08 +02:00
Timo Rothenpieler 6d9a46e884 avformat/utils: force native h264 decoder for probing
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-22 13:16:00 +02:00
Timo Rothenpieler 0b420886a4 avcodec/cuvid: add support for hardware deinterlacing
Currently does not work with the ffmpeg cli tool, due do it using the
old one in one out API.
Anything using the new API, like mpv, can make use of it, provided it is
prepared for a decoder modifying the framerate and outputing multiple
frames per input. FFmpeg itself is not.
2016-09-21 18:23:14 +02:00
Timo Rothenpieler 3b24020b54 avcodec/cuvid: implement new send_packet/receive_frame api 2016-09-21 18:22:27 +02:00
Timo Rothenpieler b91e0e5987 avcodec/cuvid: check for and warn about invalid pkt_timebase 2016-09-09 17:56:07 +02:00
Timo Rothenpieler 132adf73af avcodec/cuvid: use pkt_timebase instead of time_base 2016-09-09 17:56:07 +02:00
Timo Rothenpieler 8ebe1dddfb avcodec/nvenc: use frame size instead of surface size 2016-09-08 19:08:31 +02:00
Timo Rothenpieler fa3ecad071 avcodec/nvenc: correctly set inputPitch 2016-09-07 18:44:10 +02:00
Timo Rothenpieler 96cba1c552 avcodec/nvenc: use av_image_copy for copying frame data 2016-09-07 18:44:10 +02:00
Timo Rothenpieler e3fd1857fb swscale: add unscaled conversion from yuv420p to p010 2016-09-06 12:41:28 +02:00
Timo Rothenpieler 39f75645c8 swscale: add unscaled copy from yuv420p10 to p010 2016-09-03 00:09:39 +02:00
Timo Rothenpieler 1c37be6e95 configure: check for dlsym as well
For some reason, when compiling with gcc-asan and a recent enough gcc
version(seen on 5.3+ so far), linking dlopen works without -ldl, but
dlsym fails with:

undefined reference to symbol 'dlsym@@GLIBC_2.2.5'

So this patchs checks for both dlopen and dlsym to work for determining
if -ldl is needed.
2016-09-03 00:09:39 +02:00
Timo Rothenpieler 2b1d316ff6 configure: fix ldl dependency for new nvenc encoder names 2016-08-31 20:16:00 +02:00
Timo Rothenpieler 20f0902010 configure: fix nvenc detection logic 2016-08-31 15:40:00 +02:00
Timo Rothenpieler 99882d05a6 swscale: add support for P010LE/BE output 2016-08-31 13:19:46 +02:00
Timo Rothenpieler 2625b955a3 avfilter/drawutils: honor shift for color component description 2016-08-31 13:19:46 +02:00
Timo Rothenpieler d3a23b6777 avfilter/drawutils: P010 is not supported 2016-08-31 13:19:46 +02:00
Timo Rothenpieler cac2df230e avcodec/nvenc: update license header 2016-08-28 19:51:22 +02:00
Timo Rothenpieler 26a5cbd781 avcodec/nvenc: use proper soname for cuda/nvenc libraries 2016-08-28 19:49:56 +02:00
Timo Rothenpieler df615efcf2 avcodec/nvenc: check maximum driver API version 2016-08-28 19:46:44 +02:00
Timo Rothenpieler a19989cae5 avcodec/nvenc: fix potantially uninitialized free 2016-08-28 18:58:05 +02:00
Timo Rothenpieler 19e75fd883 avcodec/nvenc: fix library names on cygwin 2016-08-28 18:58:05 +02:00
Timo Rothenpieler 325e56479f avcodec/nvenc: include nvEncodeAPI v7 SDK header
As Nvidia has put the most recent Video Codec SDK behind a double
registration wall, of which one needs manual approval of a lenghty
application, bundling this header saves everyone trying to use NVENC
from that headache.

The header is still MIT licensed and thus fine to bundle with ffmpeg.

Not bundling this header would get ffmpeg stuck at SDK v6, which is
still freely available, holding back future development of the NVENC
encoder.
2016-08-28 16:47:54 +02:00
Timo Rothenpieler 1a75145559 lavfi: Move new field to the end of AVFilterContext
This fixes an accidental ABI break introduced at 8688d3a.
2016-06-29 18:23:28 +02:00
Timo Rothenpieler 1eb43af1a0 lavfi: Move new field to the end of AVFilterLink
Even though this is not part of the public API, some external
applications access fields after it, thus breaking after updating from
ffmpeg 3.0 or earlier.
Since it is not public, it can be freely moved to the end to avoid
that problem in the future.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 12:53:07 +02:00
Timo Rothenpieler 1bd9fb6de5 ffplay: Fix usage of private lavfi API
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 12:53:01 +02:00
Timo Rothenpieler 888a5c7947 avcodec/nvenc: Bring encoder names in line with other encoders 2016-06-25 23:05:17 +02:00
Timo Rothenpieler d865e74e6d ffmpeg: Add cuvid hwaccel support 2016-06-10 16:31:23 +02:00
Timo Rothenpieler 88e8aef9e9 avcodec/cuvid: add cuvid decoder 2016-06-10 16:31:23 +02:00
Timo Rothenpieler 808356c61c avcodec/nvenc: Check capabilities for interlaced encoding 2016-06-06 23:52:55 +02:00
Timo Rothenpieler 7c55f5d782 avcodec/nvenc: Don't set packet duration
It's not expected to be set on video packets and causes issues in
ffmpeg.c.
2016-06-04 12:20:59 +02:00
Timo Rothenpieler e5babccfbc avcodec/nvenc: Refactor timestamp generation logic
Directly adapted from libav
2016-05-31 18:59:37 +02:00
Timo Rothenpieler 69c25c0ad7 avcodec/nvenc: forward frame duration 2016-05-31 18:39:28 +02:00
Timo Rothenpieler 971351b664 avcodec/nvenc: Handle minqp-only case in set_vbr 2016-05-31 17:00:07 +02:00
Timo Rothenpieler eae4eba9cb avcodec/nvenc: twopass mode works in all modes 2016-05-31 16:55:24 +02:00
Timo Rothenpieler 1330a0f31f avcodec/nvenc: Fix forcing constqp rc mode
The CONSTQP enum value is 0, so this check failed for it.
2016-05-31 16:53:38 +02:00
Timo Rothenpieler 24fcb23351 avcodec/nvenc: Require Maxwell for lossless 2016-05-25 12:16:54 +02:00
Timo RothenpielerandAnton Khirnov 09522a303d configure: Don't require nonfree for nvenc
As the nvEncodeApi.h header is now MIT licensed, this can be dropped.
The loaded CUDA and NVENC libraries are part of the nvidia driver, and
thus count as system libraries.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-19 14:17:03 +02:00
Timo RothenpielerandAnton Khirnov cea1fb854c nvenc: Generate bufferingPeriod/pictureTiming SEI
For some unknown reason enabling these causes proper CBR padding,
so as there are no known downsides just always enable them in CBR mode.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-19 14:17:03 +02:00
Timo RothenpielerandAnton Khirnov a1e215ea01 nvenc: Delay frame output to increase encoding speed
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-19 14:17:01 +02:00
Timo RothenpielerandAnton Khirnov 795329dd4c nvenc: Generate AUD NAL units for better compatiblity
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-05-19 14:08:30 +02:00
Timo Rothenpieler c921ca9b5d avcodec/nvenc: Write buffPeriod/picTime SEI in both CBR modes 2016-05-11 12:58:52 +02:00
Timo Rothenpieler 3a9df7dfec avcodec/nvenc: Generate bufferingPeriod/pictureTiming SEI
For some unknown reason enabling these causes propper CBR padding,
so as there are no known downsides just always enable them in CBR mode.
2016-05-11 10:34:31 +02:00
Timo Rothenpieler 31ce01bdb9 avcodec/nvenc: don't set profile in lossless mode 2016-05-06 10:15:29 +02:00
Timo Rothenpieler c4312b1cf4 avcodec/nvenc: Add missing lossless presets to doc string 2016-04-27 22:22:29 +02:00
Timo Rothenpieler bc4137d4aa configure: Don't require nonfree for nvenc
As the nvEncodeApi.h header is now MIT licensed, this can be dropped.
The loaded CUDA and NVENC libraries are part of the nvidia driver, and
thus count as system libraries.
2016-04-27 20:17:33 +02:00