Fixes compilation when using API headers older than 12.0
Unified · Split
| @@ -1462,7 +1462,9 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx) · 1461 unmodified lines | |||
| 1462 | hevc->intraRefreshPeriod = cc->gopLength; | 1462 | hevc->intraRefreshPeriod = cc->gopLength; |
| 1463 | hevc->intraRefreshCnt = cc->gopLength - 1; | 1463 | hevc->intraRefreshCnt = cc->gopLength - 1; |
| 1464 | cc->gopLength = NVENC_INFINITE_GOPLENGTH; | 1464 | cc->gopLength = NVENC_INFINITE_GOPLENGTH; |
| 1465 | #ifdef NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI | ||
| 1465 | hevc->outputRecoveryPointSEI = 1; | 1466 | hevc->outputRecoveryPointSEI = 1; |
| 1467 | #endif | ||
| 1466 | #ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH | 1468 | #ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH |
| 1467 | hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh; | 1469 | hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh; |
| 1468 | #endif | 1470 | #endif |
| @@ -78,6 +78,11 @@ typedef void ID3D11Device; · 77 unmodified lines | |||
| 78 | #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH | 78 | #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH |
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
| 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 | |||
| 81 | // SDK 12.1 compile time feature checks | 86 | // SDK 12.1 compile time feature checks |
| 82 | #if NVENCAPI_CHECK_VERSION(12, 1) | 87 | #if NVENCAPI_CHECK_VERSION(12, 1) |
| 83 | #define NVENC_NO_DEPRECATED_RC | 88 | #define NVENC_NO_DEPRECATED_RC |