diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2018-05-07 15:01:22 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2018-05-10 00:34:22 +0200 |
commit | c85568342741e0e1b48fc36c780342de8ad29be7 (patch) | |
tree | dea9adb3512522d1e25d98edaddfe61d95975cf9 | |
parent | baabd3c2adb0fd1234fd7756e0b1861233753a1e (diff) | |
download | ffmpeg-c85568342741e0e1b48fc36c780342de8ad29be7.tar.gz |
avutil/hwcontext_cuda: add CUstream in cuda hwctx
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavutil/hwcontext_cuda.c | 3 | ||||
-rw-r--r-- | libavutil/hwcontext_cuda.h | 1 | ||||
-rw-r--r-- | libavutil/version.h | 2 |
5 files changed, 12 insertions, 3 deletions
@@ -5887,8 +5887,10 @@ check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9" check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC" if ! disabled ffnvcodec; then - check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.1" \ - "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" "" + check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.2" \ + "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" "" || \ + { test_pkg_config ffnvcodec_tmp "ffnvcodec < 8.1" "" "" && check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.2" \ + "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""; } fi check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" diff --git a/doc/APIchanges b/doc/APIchanges index ede5b186ae..bbefc8356e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2018-05-xx - xxxxxxxxxx - lavu 56.18.101 - hwcontext_cuda.h + Add AVCUDADeviceContext.stream. + 2018-04-xx - xxxxxxxxxx - lavu 56.18.100 - pixdesc.h Add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8. diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c index 37827a770c..f3e81680e9 100644 --- a/libavutil/hwcontext_cuda.c +++ b/libavutil/hwcontext_cuda.c @@ -386,6 +386,9 @@ static int cuda_device_create(AVHWDeviceContext *ctx, const char *device, goto error; } + // Setting stream to NULL will make functions automatically use the default CUstream + hwctx->stream = NULL; + cu->cuCtxPopCurrent(&dummy); hwctx->internal->is_allocated = 1; diff --git a/libavutil/hwcontext_cuda.h b/libavutil/hwcontext_cuda.h index 12dae8449e..81a0552cab 100644 --- a/libavutil/hwcontext_cuda.h +++ b/libavutil/hwcontext_cuda.h @@ -41,6 +41,7 @@ typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal; */ typedef struct AVCUDADeviceContext { CUcontext cuda_ctx; + CUstream stream; AVCUDADeviceContextInternal *internal; } AVCUDADeviceContext; diff --git a/libavutil/version.h b/libavutil/version.h index 5185454d9b..186fe0794d 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -80,7 +80,7 @@ #define LIBAVUTIL_VERSION_MAJOR 56 #define LIBAVUTIL_VERSION_MINOR 18 -#define LIBAVUTIL_VERSION_MICRO 100 +#define LIBAVUTIL_VERSION_MICRO 101 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ |