Timo Rothenpieler
d0961d3069
avcodec/nvenc: sanitize variable names
2017-09-07 12:08:32 +02:00
Timo Rothenpieler
a56d0497cb
avcodec/nvenc: migrate to new encode API
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-09-07 12:08:32 +02:00
Timo Rothenpieler
4e6638abb4
avcodec/nvenc: always output picture timing SEI
...
Interlaced encoding profits from it, or might even need it in some
players.
No harm in enabling it unconditionally.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-09-02 16:01:57 +02:00
Timo Rothenpieler
0e995eac20
avcodec/nvenc: only push cuda context on encoder close if encoder exists
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-09-01 10:52:15 +02:00
Timo Rothenpieler
a0b69e2b0a
avcodec/nvenc: add support for specifying entropy coding mode
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-09-01 10:52:15 +02:00
Timo Rothenpieler
1ac03c8dc0
configure: add support for libnpp* from cuda sdk 9
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-08-30 11:03:18 +02:00
Timo Rothenpieler
ef0c6d9b01
libavutil/opencl: fix potential null dereference
...
Fixes CID 1396840
Reviewed-by: Wei Gao <highgod0401@gmail.com >
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2017-08-27 21:08:17 +02:00
Timo Rothenpieler
62b75537db
avfilter/scale_npp: fix logic used in previous patch
2017-08-14 16:03:11 +02:00
Timo Rothenpieler
f4ebbda566
avfilter/scale_npp: check for buffer allocation failure
...
I totally did not forget to amend this to the previous patch...
2017-08-14 14:15:27 +02:00
Timo Rothenpieler
feb13aed79
avfilter/vf_signature: fix memory leaks in error cases
...
Fixes CIDs 1403234 and 1403235
2017-06-13 19:49:39 +02:00
Timo Rothenpieler
a5b5ce2658
avformat/pcmdec: fix memory leak
...
Fixes CID 1396267
2017-06-13 19:49:06 +02:00
Timo Rothenpieler
4b2a2969f3
avformat/librtmp: check return value of setsockopt
...
Fixes CID 1396837
2017-06-13 19:48:08 +02:00
Timo Rothenpieler
0fbc9bbbbb
avfilter/vf_scale_npp: fix out-of-bounds reads
...
Fixes CIDs 1396414 and 1396415
2017-06-13 19:47:44 +02:00
Timo Rothenpieler
21583e936a
avfilter/unsharp: fix uninitialized pointer read
...
Fixes CID 1396855
2017-06-13 19:47:19 +02:00
Timo Rothenpieler
ff3084606c
avcodec/cuvid: make capability check optional
2017-06-01 12:39:06 +02:00
Timo Rothenpieler
f890a6d712
compat/cuda: make cuvidGetDecoderCaps optional
2017-06-01 12:39:06 +02:00
Timo Rothenpieler
cb3358b68f
avcodec/nvenc: print minimum driver version on error
2017-06-01 11:55:25 +02:00
Timo Rothenpieler
2d978d1c72
configure: libnpp does not need to link libcuda
2017-06-01 11:36:13 +02:00
Timo Rothenpieler
a1652aca7e
avcodec/nvenc: remove unnecessary alignment
...
Fixes #6260
2017-05-23 11:24:43 +02:00
Timo Rothenpieler
88896c4619
compat/cuda/ptx2c: remove bashism and harden against arbitrary input
2017-05-15 18:54:38 +02:00
Timo Rothenpieler
f1ab71b046
build: add support for building .cu files via nvcc
...
Original work by Yogender Gupta <ygupta@nvidia.com >
2017-05-15 11:46:50 +02:00
Timo Rothenpieler
6a3740572d
configure: add cuda-sdk for things requiring full CUDA sdk
2017-05-15 11:46:50 +02:00
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 Rothenpieler and wm4
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 and Luca Barbato
a52976c0fe
nvenc: make gpu indices independent of supported capabilities
...
Do not allocate a CUDA context for every available gpu.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2017-02-09 23:29:32 +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