From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC
Date: Tue, 4 Feb 2025 15:38:04 +0200 (EET)
Message-ID: <c573c1af-f0bf-4345-6ef4-99787fda242@martin.st> (raw)
In-Reply-To: <20250204133123.1463-1-jamrial@gmail.com>
On Tue, 4 Feb 2025, James Almer wrote:
> 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
Thanks, this does indeed seem to fix compilation in my setup.
// Martin
_______________________________________________
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".
next prev parent reply other threads:[~2025-02-04 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 13:31 James Almer
2025-02-04 13:38 ` Martin Storsjö [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c573c1af-f0bf-4345-6ef4-99787fda242@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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