Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC
@ 2025-02-04 13:31 James Almer
  2025-02-04 13:38 ` Martin Storsjö
  0 siblings, 1 reply; 8+ messages in thread
From: James Almer @ 2025-02-04 13:31 UTC (permalink / raw)
  To: ffmpeg-devel

Fixes compilation when using API headers older than 12.0

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/nvenc.c | 2 ++
 libavcodec/nvenc.h | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index c359c2bc8a..eea3e8d703 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1462,7 +1462,9 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
         hevc->intraRefreshPeriod = cc->gopLength;
         hevc->intraRefreshCnt = cc->gopLength - 1;
         cc->gopLength = NVENC_INFINITE_GOPLENGTH;
+#ifdef NVENC_HAVE_OUTPUT_RECOVERY_POINT_SEI
         hevc->outputRecoveryPointSEI = 1;
+#endif
 #ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
         hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;
 #endif
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 341a242cf7..d395221870 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -78,6 +78,11 @@ typedef void ID3D11Device;
 #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
 #endif
 
+// SDK 12.0 compile time feature checks
+#if NVENCAPI_CHECK_VERSION(12, 0)
+#define NVENC_HAVE_OUTPUT_RECOVERY_POINT_SEI
+#endif
+
 // SDK 12.1 compile time feature checks
 #if NVENCAPI_CHECK_VERSION(12, 1)
 #define NVENC_NO_DEPRECATED_RC
-- 
2.48.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-04 15:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-04 13:31 [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC James Almer
2025-02-04 13:38 ` Martin Storsjö
2025-02-04 13:41   ` James Almer
2025-02-04 13:52     ` Martin Storsjö
2025-02-04 13:57       ` James Almer
2025-02-04 14:00         ` Martin Storsjö
2025-02-04 14:58           ` Zhao Zhili
2025-02-04 15:36             ` Timo Rothenpieler

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git