History

avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

Fixes compilation when using API headers older than 12.0

James Almer committed 1 year ago

Commit 873204e1 parent 43070082 files · +7 −0Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/nvenc.c +2 −0
  2. libavcodec/nvenc.h +5 −0
libavcodec/nvenc.c+2−0
@@ -1462,7 +1462,9 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx) · 1461 unmodified lines
14621462 hevc->intraRefreshPeriod = cc->gopLength;
14631463 hevc->intraRefreshCnt = cc->gopLength - 1;
14641464 cc->gopLength = NVENC_INFINITE_GOPLENGTH;
1465+#ifdef NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI
14651466 hevc->outputRecoveryPointSEI = 1;
1467+#endif
14661468 #ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
14671469 hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;
14681470 #endif
libavcodec/nvenc.h+5−0
@@ -78,6 +78,11 @@ typedef void ID3D11Device; · 77 unmodified lines
7878 #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
7979 #endif
8080
81+// SDK 12.0 compile time feature checks
82+#if NVENCAPI_CHECK_VERSION(12, 0)
83+#define NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI
84+#endif
85+
8186 // SDK 12.1 compile time feature checks
8287 #if NVENCAPI_CHECK_VERSION(12, 1)
8388 #define NVENC_NO_DEPRECATED_RC

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t