[FFmpeg-devel] [PATCH 1/3] nvenc: use runtime api version to support old drivers

2020-07-15 Thread wangbin
From: wang-bin There are reserved bit fields in nvEncoderAPI.h structs, so driver's abi is stable. Requesting runtime version of these structs should work. I've compared 7.0~9.x headers, and confirmed on some devices. --- libavcodec/nvenc.c | 72 ++ li

[FFmpeg-devel] [PATCH 2/3] nvenc: check runtime 9.1 function ptrs before use

2020-07-15 Thread wangbin
From: wang-bin --- libavcodec/nvenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index ac35cb9f48..cec59f02f3 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -140,7 +140,7 @@ static int nvenc_print_error(AVCodecCont

[FFmpeg-devel] [PATCH 3/3] nvenc: check sdk 10.0 ptrs at runtime

2020-07-15 Thread wangbin
From: wang-bin --- libavcodec/nvenc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index cec59f02f3..c421c292c8 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1248,11 +1248,12 @@ static av_cold int nvenc_set