On 2/25/2018 9:20 PM, Marton Balint wrote: > From: Timo Rothenpieler <t...@rothenpieler.org> > > External headers are no longer welcome in the ffmpeg codebase because they > increase the maintenance burden. However, in the NVidia case the vanilla > headers need some modifications to be usable in ffmpeg therefore we still > provide them, but in a separate repository. > > The external headers can be found at > https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git > > This patch squashes Timo's patches from Dec 4 last year, and also removes most > part of compat/dynlink_loader.h because that was added to the headers repo as > well. > > Fate-source is updated because of the deleted files, and dynlink_loader.h > license headers were updated with the standard FFmpeg headers. > > Only compile tested and only on Linux. > > Signed-off-by: Marton Balint <c...@passwd.hu> > --- > Changelog | 2 + > compat/cuda/dynlink_cuda.h | 98 -- > compat/cuda/dynlink_cuviddec.h | 886 ----------- > compat/cuda/dynlink_loader.h | 273 +--- > compat/cuda/dynlink_nvcuvid.h | 356 ----- > compat/nvenc/nvEncodeAPI.h | 3324 > ---------------------------------------- > configure | 6 +- > libavcodec/nvenc.h | 2 +- > tests/ref/fate/source | 4 - > 9 files changed, 27 insertions(+), 4924 deletions(-) > delete mode 100644 compat/cuda/dynlink_cuda.h > delete mode 100644 compat/cuda/dynlink_cuviddec.h > delete mode 100644 compat/cuda/dynlink_nvcuvid.h > delete mode 100644 compat/nvenc/nvEncodeAPI.h >
[...] > diff --git a/configure b/configure > index 1bdb7c1c2d..83bcb80283 100755 > --- a/configure > +++ b/configure > @@ -2675,6 +2675,7 @@ zmbv_encoder_deps="zlib" > > # hardware accelerators > crystalhd_deps="libcrystalhd_libcrystalhd_if_h" > +cuda_deps="ffnvcodec"> cuda_deps_any="libdl LoadLibrary" > cuvid_deps="cuda" > d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext" > @@ -5811,6 +5812,9 @@ check_type "va/va.h va/va_enc_vp9.h" > "VAEncPictureParameterBufferVP9" > > check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC" > > +check_pkg_config ffnvcodec "ffnvcodec >= 8.0" \ Instead of adding a new ffnvcodec module to configure, just use the existing cuda one. > + "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h > ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" "" > + > check_cpp_condition windows.h > "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" && enable winrt || > disable winrt > > if ! disabled w32threads && ! enabled pthreads; then > @@ -6263,7 +6267,7 @@ fi > > enabled nvenc && > check_cc -I$source_path <<EOF || disable nvenc > -#include "compat/nvenc/nvEncodeAPI.h" > +#include <ffnvcodec/nvEncodeAPI.h> > NV_ENCODE_API_FUNCTION_LIST flist; > void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } > }; } > int main(void) { return 0; } > diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h > index ab6825f633..bff25dfc3c 100644 > --- a/libavcodec/nvenc.h > +++ b/libavcodec/nvenc.h > @@ -28,7 +28,7 @@ > typedef void ID3D11Device; > #endif > > -#include "compat/nvenc/nvEncodeAPI.h" > +#include <ffnvcodec/nvEncodeAPI.h> > > #include "compat/cuda/dynlink_loader.h" > #include "libavutil/fifo.h" > diff --git a/tests/ref/fate/source b/tests/ref/fate/source > index 2def03495b..809c4632d4 100644 > --- a/tests/ref/fate/source > +++ b/tests/ref/fate/source > @@ -23,12 +23,8 @@ compat/avisynth/avs/types.h > compat/avisynth/avxsynth_c.h > compat/avisynth/windowsPorts/basicDataTypeConversions.h > compat/avisynth/windowsPorts/windows2linux.h > -compat/cuda/dynlink_cuda.h > -compat/cuda/dynlink_cuviddec.h > compat/cuda/dynlink_loader.h > -compat/cuda/dynlink_nvcuvid.h > compat/float/float.h > compat/float/limits.h > -compat/nvenc/nvEncodeAPI.h > Use of av_clip() where av_clip_uintp2() could be used: > Use of av_clip() where av_clip_intp2() could be used: > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel