summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/cuda/cuviddec.h53
-rw-r--r--compat/cuda/nvcuvid.h34
-rwxr-xr-xconfigure51
-rw-r--r--libavcodec/cuvid.c2
4 files changed, 52 insertions, 88 deletions
diff --git a/compat/cuda/cuviddec.h b/compat/cuda/cuviddec.h
index 6ef95bd672..a66826fceb 100644
--- a/compat/cuda/cuviddec.h
+++ b/compat/cuda/cuviddec.h
@@ -35,9 +35,9 @@
#if !defined(__CUDA_VIDEO_H__)
#define __CUDA_VIDEO_H__
-#ifndef __dynlink_cuda_h__
-#include "dynlink_cuda.h"
-#endif // __dynlink_cuda_h__
+#ifndef __cuda_cuda_h__
+#include <cuda.h>
+#endif // __cuda_cuda_h__
#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
#if (CUDA_VERSION >= 3020) && (!defined(CUDA_FORCE_API_VERSION) || (CUDA_FORCE_API_VERSION >= 3020))
@@ -715,19 +715,19 @@ typedef struct _CUVIDPROCPARAMS
* \fn CUresult CUDAAPI cuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci)
* Create the decoder object
*/
-typedef CUresult CUDAAPI tcuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci);
+CUresult CUDAAPI cuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci);
/**
* \fn CUresult CUDAAPI cuvidDestroyDecoder(CUvideodecoder hDecoder)
* Destroy the decoder object
*/
-typedef CUresult CUDAAPI tcuvidDestroyDecoder(CUvideodecoder hDecoder);
+CUresult CUDAAPI cuvidDestroyDecoder(CUvideodecoder hDecoder);
/**
* \fn CUresult CUDAAPI cuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams)
* Decode a single picture (field or frame)
*/
-typedef CUresult CUDAAPI tcuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams);
+CUresult CUDAAPI cuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams);
#if !defined(__CUVID_DEVPTR64) || defined(__CUVID_INTERNAL)
@@ -735,7 +735,7 @@ typedef CUresult CUDAAPI tcuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPA
* \fn CUresult CUDAAPI cuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx, unsigned int *pDevPtr, unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
* Post-process and map a video frame for use in cuda
*/
-typedef CUresult CUDAAPI tcuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx,
+CUresult CUDAAPI cuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx,
unsigned int *pDevPtr, unsigned int *pPitch,
CUVIDPROCPARAMS *pVPP);
@@ -743,7 +743,7 @@ typedef CUresult CUDAAPI tcuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicId
* \fn CUresult CUDAAPI cuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr)
* Unmap a previously mapped video frame
*/
-typedef CUresult CUDAAPI tcuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr);
+CUresult CUDAAPI cuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr);
#endif
#if defined(WIN64) || defined(_WIN64) || defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
@@ -751,18 +751,18 @@ typedef CUresult CUDAAPI tcuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned
* \fn CUresult CUDAAPI cuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr, unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
* map a video frame
*/
-typedef CUresult CUDAAPI tcuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr,
+CUresult CUDAAPI cuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr,
unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
/**
* \fn CUresult CUDAAPI cuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr);
* Unmap a previously mapped video frame
*/
-typedef CUresult CUDAAPI tcuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr);
+CUresult CUDAAPI cuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr);
#if defined(__CUVID_DEVPTR64) && !defined(__CUVID_INTERNAL)
-#define tcuvidMapVideoFrame tcuvidMapVideoFrame64
-#define tcuvidUnmapVideoFrame tcuvidUnmapVideoFrame64
+#define cuvidMapVideoFrame cuvidMapVideoFrame64
+#define cuvidUnmapVideoFrame cuvidUnmapVideoFrame64
#endif
#endif
@@ -787,26 +787,28 @@ typedef CUresult CUDAAPI tcuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsign
/**
* \fn CUresult CUDAAPI cuvidCtxLockCreate(CUvideoctxlock *pLock, CUcontext ctx)
*/
-typedef CUresult CUDAAPI tcuvidCtxLockCreate(CUvideoctxlock *pLock, CUcontext ctx);
+CUresult CUDAAPI cuvidCtxLockCreate(CUvideoctxlock *pLock, CUcontext ctx);
/**
* \fn CUresult CUDAAPI cuvidCtxLockDestroy(CUvideoctxlock lck)
*/
-typedef CUresult CUDAAPI tcuvidCtxLockDestroy(CUvideoctxlock lck);
+CUresult CUDAAPI cuvidCtxLockDestroy(CUvideoctxlock lck);
/**
* \fn CUresult CUDAAPI cuvidCtxLock(CUvideoctxlock lck, unsigned int reserved_flags)
*/
-typedef CUresult CUDAAPI tcuvidCtxLock(CUvideoctxlock lck, unsigned int reserved_flags);
+CUresult CUDAAPI cuvidCtxLock(CUvideoctxlock lck, unsigned int reserved_flags);
/**
* \fn CUresult CUDAAPI cuvidCtxUnlock(CUvideoctxlock lck, unsigned int reserved_flags)
*/
-typedef CUresult CUDAAPI tcuvidCtxUnlock(CUvideoctxlock lck, unsigned int reserved_flags);
+CUresult CUDAAPI cuvidCtxUnlock(CUvideoctxlock lck, unsigned int reserved_flags);
/** @} */ /* End VIDEO_DECODER */
////////////////////////////////////////////////////////////////////////////////////////////////
+#if defined(__cplusplus)
+
// Auto-lock helper for C++ applications
class CCtxAutoLock
{
@@ -817,25 +819,6 @@ public:
~CCtxAutoLock();
};
-extern tcuvidCreateDecoder *cuvidCreateDecoder;
-extern tcuvidDestroyDecoder *cuvidDestroyDecoder;
-extern tcuvidDecodePicture *cuvidDecodePicture;
-extern tcuvidMapVideoFrame *cuvidMapVideoFrame;
-extern tcuvidUnmapVideoFrame *cuvidUnmapVideoFrame;
-
-#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
-extern tcuvidMapVideoFrame64 *cuvidMapVideoFrame64;
-extern tcuvidUnmapVideoFrame64 *cuvidUnmapVideoFrame64;
-#endif
-
-//extern tcuvidGetVideoFrameSurface *cuvidGetVideoFrameSurface;
-
-extern tcuvidCtxLockCreate *cuvidCtxLockCreate;
-extern tcuvidCtxLockDestroy *cuvidCtxLockDestroy;
-extern tcuvidCtxLock *cuvidCtxLock;
-extern tcuvidCtxUnlock *cuvidCtxUnlock;
-
-#if defined(__cplusplus)
}
#endif /* __cplusplus */
diff --git a/compat/cuda/nvcuvid.h b/compat/cuda/nvcuvid.h
index 228da530ba..61d66ce45b 100644
--- a/compat/cuda/nvcuvid.h
+++ b/compat/cuda/nvcuvid.h
@@ -35,7 +35,7 @@
#if !defined(__NVCUVID_H__)
#define __NVCUVID_H__
-#include "dynlink_cuviddec.h"
+#include "compat/cuda/cuviddec.h"
#if defined(__cplusplus)
extern "C" {
@@ -214,43 +214,43 @@ typedef enum {
* \fn CUresult CUDAAPI cuvidCreateVideoSource(CUvideosource *pObj, const char *pszFileName, CUVIDSOURCEPARAMS *pParams)
* Create Video Source
*/
-typedef CUresult CUDAAPI tcuvidCreateVideoSource(CUvideosource *pObj, const char *pszFileName, CUVIDSOURCEPARAMS *pParams);
+CUresult CUDAAPI cuvidCreateVideoSource(CUvideosource *pObj, const char *pszFileName, CUVIDSOURCEPARAMS *pParams);
/**
* \fn CUresult CUDAAPI cuvidCreateVideoSourceW(CUvideosource *pObj, const wchar_t *pwszFileName, CUVIDSOURCEPARAMS *pParams)
* Create Video Source
*/
-typedef CUresult CUDAAPI tcuvidCreateVideoSourceW(CUvideosource *pObj, const wchar_t *pwszFileName, CUVIDSOURCEPARAMS *pParams);
+CUresult CUDAAPI cuvidCreateVideoSourceW(CUvideosource *pObj, const wchar_t *pwszFileName, CUVIDSOURCEPARAMS *pParams);
/**
* \fn CUresult CUDAAPI cuvidDestroyVideoSource(CUvideosource obj)
* Destroy Video Source
*/
-typedef CUresult CUDAAPI tcuvidDestroyVideoSource(CUvideosource obj);
+CUresult CUDAAPI cuvidDestroyVideoSource(CUvideosource obj);
/**
* \fn CUresult CUDAAPI cuvidSetVideoSourceState(CUvideosource obj, cudaVideoState state)
* Set Video Source state
*/
-typedef CUresult CUDAAPI tcuvidSetVideoSourceState(CUvideosource obj, cudaVideoState state);
+CUresult CUDAAPI cuvidSetVideoSourceState(CUvideosource obj, cudaVideoState state);
/**
* \fn cudaVideoState CUDAAPI cuvidGetVideoSourceState(CUvideosource obj)
* Get Video Source state
*/
-typedef cudaVideoState CUDAAPI tcuvidGetVideoSourceState(CUvideosource obj);
+cudaVideoState CUDAAPI cuvidGetVideoSourceState(CUvideosource obj);
/**
* \fn CUresult CUDAAPI cuvidGetSourceVideoFormat(CUvideosource obj, CUVIDEOFORMAT *pvidfmt, unsigned int flags)
* Get Video Source Format
*/
-typedef CUresult CUDAAPI tcuvidGetSourceVideoFormat(CUvideosource obj, CUVIDEOFORMAT *pvidfmt, unsigned int flags);
+CUresult CUDAAPI cuvidGetSourceVideoFormat(CUvideosource obj, CUVIDEOFORMAT *pvidfmt, unsigned int flags);
/**
* \fn CUresult CUDAAPI cuvidGetSourceAudioFormat(CUvideosource obj, CUAUDIOFORMAT *paudfmt, unsigned int flags)
* Set Video Source state
*/
-typedef CUresult CUDAAPI tcuvidGetSourceAudioFormat(CUvideosource obj, CUAUDIOFORMAT *paudfmt, unsigned int flags);
+CUresult CUDAAPI cuvidGetSourceAudioFormat(CUvideosource obj, CUAUDIOFORMAT *paudfmt, unsigned int flags);
#endif
@@ -297,29 +297,17 @@ typedef struct _CUVIDPARSERPARAMS
/**
* \fn CUresult CUDAAPI cuvidCreateVideoParser(CUvideoparser *pObj, CUVIDPARSERPARAMS *pParams)
*/
-typedef CUresult CUDAAPI tcuvidCreateVideoParser(CUvideoparser *pObj, CUVIDPARSERPARAMS *pParams);
+CUresult CUDAAPI cuvidCreateVideoParser(CUvideoparser *pObj, CUVIDPARSERPARAMS *pParams);
/**
* \fn CUresult CUDAAPI cuvidParseVideoData(CUvideoparser obj, CUVIDSOURCEDATAPACKET *pPacket)
*/
-typedef CUresult CUDAAPI tcuvidParseVideoData(CUvideoparser obj, CUVIDSOURCEDATAPACKET *pPacket);
+CUresult CUDAAPI cuvidParseVideoData(CUvideoparser obj, CUVIDSOURCEDATAPACKET *pPacket);
/**
* \fn CUresult CUDAAPI cuvidDestroyVideoParser(CUvideoparser obj)
*/
-typedef CUresult CUDAAPI tcuvidDestroyVideoParser(CUvideoparser obj);
-
-extern tcuvidCreateVideoSource *cuvidCreateVideoSource;
-extern tcuvidCreateVideoSourceW *cuvidCreateVideoSourceW;
-extern tcuvidDestroyVideoSource *cuvidDestroyVideoSource;
-extern tcuvidSetVideoSourceState *cuvidSetVideoSourceState;
-extern tcuvidGetVideoSourceState *cuvidGetVideoSourceState;
-extern tcuvidGetSourceVideoFormat *cuvidGetSourceVideoFormat;
-extern tcuvidGetSourceAudioFormat *cuvidGetSourceAudioFormat;
-
-extern tcuvidCreateVideoParser *cuvidCreateVideoParser;
-extern tcuvidParseVideoData *cuvidParseVideoData;
-extern tcuvidDestroyVideoParser *cuvidDestroyVideoParser;
+CUresult CUDAAPI cuvidDestroyVideoParser(CUvideoparser obj);
/** @} */ /* END VIDEO_PARSER */
////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/configure b/configure
index af3fbf4c27..c0c1c8a869 100755
--- a/configure
+++ b/configure
@@ -2549,13 +2549,13 @@ videotoolbox_hwaccel_deps="videotoolbox pthreads"
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
xvmc_deps="X11_extensions_XvMClib_h"
-h263_cuvid_hwaccel_deps="cuda cuvid CUVIDMPEG4PICPARAMS"
+h263_cuvid_hwaccel_deps="cuda cuvid"
h263_vaapi_hwaccel_deps="vaapi"
h263_vaapi_hwaccel_select="h263_decoder"
h263_videotoolbox_hwaccel_deps="videotoolbox"
h263_videotoolbox_hwaccel_select="h263_decoder"
h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
-h264_cuvid_hwaccel_deps="cuda cuvid CUVIDH264PICPARAMS"
+h264_cuvid_hwaccel_deps="cuda cuvid"
h264_d3d11va_hwaccel_deps="d3d11va"
h264_d3d11va_hwaccel_select="h264_decoder"
h264_dxva2_hwaccel_deps="dxva2"
@@ -2582,7 +2582,7 @@ h264_vdpau_hwaccel_deps="vdpau"
h264_vdpau_hwaccel_select="h264_decoder"
h264_videotoolbox_hwaccel_deps="videotoolbox"
h264_videotoolbox_hwaccel_select="h264_decoder"
-hevc_cuvid_hwaccel_deps="cuda cuvid CUVIDHEVCPICPARAMS"
+hevc_cuvid_hwaccel_deps="cuda cuvid"
hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
hevc_d3d11va_hwaccel_select="hevc_decoder"
hevc_mediacodec_decoder_deps="mediacodec"
@@ -2595,12 +2595,12 @@ hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC"
hevc_vaapi_hwaccel_select="hevc_decoder"
hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC"
hevc_vdpau_hwaccel_select="hevc_decoder"
-mjpeg_cuvid_hwaccel_deps="cuda cuvid CUVIDJPEGPICPARAMS"
+mjpeg_cuvid_hwaccel_deps="cuda cuvid"
mpeg_vdpau_decoder_deps="vdpau"
mpeg_vdpau_decoder_select="mpeg2video_decoder"
mpeg_xvmc_hwaccel_deps="xvmc"
mpeg_xvmc_hwaccel_select="mpeg2video_decoder"
-mpeg1_cuvid_hwaccel_deps="cuda cuvid CUVIDMPEG2PICPARAMS"
+mpeg1_cuvid_hwaccel_deps="cuda cuvid"
mpeg1_vdpau_decoder_deps="vdpau"
mpeg1_vdpau_decoder_select="mpeg1video_decoder"
mpeg1_vdpau_hwaccel_deps="vdpau"
@@ -2610,7 +2610,7 @@ mpeg1_videotoolbox_hwaccel_select="mpeg1video_decoder"
mpeg1_xvmc_hwaccel_deps="xvmc"
mpeg1_xvmc_hwaccel_select="mpeg1video_decoder"
mpeg2_crystalhd_decoder_select="crystalhd"
-mpeg2_cuvid_hwaccel_deps="cuda cuvid CUVIDMPEG2PICPARAMS"
+mpeg2_cuvid_hwaccel_deps="cuda cuvid"
mpeg2_d3d11va_hwaccel_deps="d3d11va"
mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
mpeg2_dxva2_hwaccel_deps="dxva2"
@@ -2629,7 +2629,7 @@ mpeg2_videotoolbox_hwaccel_select="mpeg2video_decoder"
mpeg2_xvmc_hwaccel_deps="xvmc"
mpeg2_xvmc_hwaccel_select="mpeg2video_decoder"
mpeg4_crystalhd_decoder_select="crystalhd"
-mpeg4_cuvid_hwaccel_deps="cuda cuvid CUVIDMPEG4PICPARAMS"
+mpeg4_cuvid_hwaccel_deps="cuda cuvid"
mpeg4_mmal_decoder_deps="mmal"
mpeg4_mmal_decoder_select="mmal"
mpeg4_mmal_hwaccel_deps="mmal"
@@ -2644,7 +2644,7 @@ mpeg4_videotoolbox_hwaccel_deps="videotoolbox"
mpeg4_videotoolbox_hwaccel_select="mpeg4_decoder"
msmpeg4_crystalhd_decoder_select="crystalhd"
vc1_crystalhd_decoder_select="crystalhd"
-vc1_cuvid_hwaccel_deps="cuda cuvid CUVIDVC1PICPARAMS"
+vc1_cuvid_hwaccel_deps="cuda cuvid"
vc1_d3d11va_hwaccel_deps="d3d11va"
vc1_d3d11va_hwaccel_select="vc1_decoder"
vc1_dxva2_hwaccel_deps="dxva2"
@@ -2660,8 +2660,8 @@ vc1_vdpau_decoder_deps="vdpau"
vc1_vdpau_decoder_select="vc1_decoder"
vc1_vdpau_hwaccel_deps="vdpau"
vc1_vdpau_hwaccel_select="vc1_decoder"
-vp8_cuvid_hwaccel_deps="cuda cuvid CUVIDVP9PICPARAMS"
-vp9_cuvid_hwaccel_deps="cuda cuvid CUVIDVP9PICPARAMS"
+vp8_cuvid_hwaccel_deps="cuda cuvid"
+vp9_cuvid_hwaccel_deps="cuda cuvid"
vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9"
vp9_d3d11va_hwaccel_select="vp9_decoder"
vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9"
@@ -2687,9 +2687,9 @@ scale_npp_filter_deps="cuda libnpp"
nvenc_deps_any="dlopen LoadLibrary"
nvenc_encoder_deps="nvenc"
-h263_cuvid_decoder_deps="cuda cuvid CUVIDMPEG4PICPARAMS"
+h263_cuvid_decoder_deps="cuda cuvid"
h263_cuvid_decoder_select="h263_cuvid_hwaccel"
-h264_cuvid_decoder_deps="cuda cuvid CUVIDH264PICPARAMS"
+h264_cuvid_decoder_deps="cuda cuvid"
h264_cuvid_decoder_select="h264_mp4toannexb_bsf h264_cuvid_hwaccel"
h264_nvenc_encoder_deps="nvenc"
h264_qsv_decoder_deps="libmfx"
@@ -2699,7 +2699,7 @@ h264_qsv_encoder_select="qsvenc"
h264_vaapi_encoder_deps="VAEncPictureParameterBufferH264"
h264_vaapi_encoder_select="vaapi_encode golomb"
-hevc_cuvid_decoder_deps="cuda cuvid CUVIDHEVCPICPARAMS"
+hevc_cuvid_decoder_deps="cuda cuvid"
hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf hevc_cuvid_hwaccel"
hevc_nvenc_encoder_deps="nvenc"
hevc_qsv_decoder_deps="libmfx"
@@ -2708,26 +2708,26 @@ hevc_qsv_encoder_deps="libmfx"
hevc_qsv_encoder_select="qsvenc"
hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC"
hevc_vaapi_encoder_select="vaapi_encode golomb"
-mjpeg_cuvid_decoder_deps="cuda cuvid CUVIDJPEGPICPARAMS"
+mjpeg_cuvid_decoder_deps="cuda cuvid"
mjpeg_cuvid_decoder_select="mjpeg_cuvid_hwaccel"
-mpeg1_cuvid_decoder_deps="cuda cuvid CUVIDMPEG2PICPARAMS"
+mpeg1_cuvid_decoder_deps="cuda cuvid"
mpeg1_cuvid_decoder_select="mpeg1_cuvid_hwaccel"
-mpeg2_cuvid_decoder_deps="cuda cuvid CUVIDMPEG2PICPARAMS"
+mpeg2_cuvid_decoder_deps="cuda cuvid"
mpeg2_cuvid_decoder_select="mpeg2_cuvid_hwaccel"
mpeg2_qsv_decoder_deps="libmfx"
mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel"
mpeg2_qsv_encoder_deps="libmfx"
mpeg2_qsv_encoder_select="qsvenc"
-mpeg4_cuvid_decoder_deps="cuda cuvid CUVIDMPEG4PICPARAMS"
+mpeg4_cuvid_decoder_deps="cuda cuvid"
mpeg4_cuvid_decoder_select="mpeg4_cuvid_hwaccel"
nvenc_h264_encoder_deps="nvenc"
nvenc_hevc_encoder_deps="nvenc"
-vc1_cuvid_decoder_deps="cuda cuvid CUVIDVC1PICPARAMS"
+vc1_cuvid_decoder_deps="cuda cuvid"
vc1_cuvid_decoder_select="vc1_cuvid_hwaccel"
-vp8_cuvid_decoder_deps="cuda cuvid CUVIDVP9PICPARAMS"
+vp8_cuvid_decoder_deps="cuda cuvid"
vp8_cuvid_decoder_select="vp8_cuvid_hwaccel"
-vp9_cuvid_decoder_deps="cuda cuvid CUVIDVP9PICPARAMS"
+vp9_cuvid_decoder_deps="cuda cuvid"
vp9_cuvid_decoder_select="vp9_cuvid_hwaccel"
# parsers
@@ -5578,14 +5578,6 @@ check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
-check_type "cuviddec.h" "CUVIDH264PICPARAMS"
-check_type "cuviddec.h" "CUVIDHEVCPICPARAMS"
-check_type "cuviddec.h" "CUVIDJPEGPICPARAMS"
-check_type "cuviddec.h" "CUVIDMPEG2PICPARAMS"
-check_type "cuviddec.h" "CUVIDMPEG4PICPARAMS"
-check_type "cuviddec.h" "CUVIDVC1PICPARAMS"
-check_type "cuviddec.h" "CUVIDVP9PICPARAMS"
-
check_cpp_condition windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" && enable winrt || disable winrt
if ! disabled w32threads && ! enabled pthreads; then
@@ -5663,7 +5655,8 @@ enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
enabled cuda && { check_lib cuda.h cuInit -lcuda ||
die "ERROR: CUDA not found"; }
-enabled cuvid && { check_lib cuviddec.h cuvidCreateDecoder -lnvcuvid ||
+enabled cuvid && { add_cflags -I$source_path;
+ check_lib "compat/cuda/cuviddec.h" cuvidCreateDecoder -lnvcuvid ||
die "ERROR: CUVID not found"; } &&
{ enabled cuda ||
die "ERROR: CUVID requires CUDA"; }
diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index db96ac6e9c..2570848d0f 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -30,7 +30,7 @@
#include "avcodec.h"
#include "internal.h"
-#include <nvcuvid.h>
+#include "compat/cuda/nvcuvid.h"
#define MAX_FRAME_COUNT 25