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
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_REFRESH1468#ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
1467 hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;1469 hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;
1468#endif1470#endif
libavcodec/nvenc.h+5−0
@@ -78,6 +78,11 @@ typedef void ID3D11Device; · 77 unmodified lines
78#define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH78#define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
79#endif79#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 checks86// 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_RC88#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