Skip to content
Permalink
Browse files

avutil/hwcontext_cuda: add CUstream in cuda hwctx

  • Loading branch information
BtbN committed May 9, 2018
1 parent 0cc43b2 commit 39fca52122bbfda7a9b6a966b37b6296dba73afe
Showing with 12 additions and 3 deletions.
  1. +4 −2 configure
  2. +3 −0 doc/APIchanges
  3. +3 −0 libavutil/hwcontext_cuda.c
  4. +1 −0 libavutil/hwcontext_cuda.h
  5. +1 −1 libavutil/version.h
@@ -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)"
@@ -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.

@@ -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;
@@ -41,6 +41,7 @@ typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal;
*/
typedef struct AVCUDADeviceContext {
CUcontext cuda_ctx;
CUstream stream;
AVCUDADeviceContextInternal *internal;
} AVCUDADeviceContext;

@@ -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, \

0 comments on commit 39fca52

Please sign in to comment.