mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 19:40:24 +00:00
CI Linux FFmpeg: remove NVENC IDR patch
Since the FFmpeg commit 7eeef72c6, the IDR period is set to gopLength unconditinally even for intra-refresh mode, which is what the removed patch did. + do not check if FFmpeg is patched (the macro is )
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
From 64f7b0960e3d2ee3855492d518813f4ad53459ef Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pulec <martin.pulec@cesnet.cz>
|
||||
Date: Fri, 22 Apr 2022 09:50:14 +0200
|
||||
Subject: [PATCH] NVENC: set idrPeriod to gop_size
|
||||
|
||||
NVENC_INFINITE_GOPLENGTH is useless for UltraGrid
|
||||
---
|
||||
libavcodec/avcodec.h | 3 +++
|
||||
libavcodec/nvenc.c | 8 ++------
|
||||
2 files changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
|
||||
index 4dae23d06e..31f9898731 100644
|
||||
--- a/libavcodec/avcodec.h
|
||||
+++ b/libavcodec/avcodec.h
|
||||
@@ -3167,4 +3167,7 @@ int avcodec_is_open(AVCodecContext *s);
|
||||
* @}
|
||||
*/
|
||||
|
||||
+// UltraGrid patch
|
||||
+#define PATCHED_FF_NVENC_NO_INFINITE_GOP 1
|
||||
+
|
||||
#endif /* AVCODEC_AVCODEC_H */
|
||||
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
|
||||
index b6bcec8246..8bdada1598 100644
|
||||
--- a/libavcodec/nvenc.c
|
||||
+++ b/libavcodec/nvenc.c
|
||||
@@ -1130,9 +1130,7 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx)
|
||||
h264->maxNumRefFrames = ctx->dpb_size;
|
||||
}
|
||||
|
||||
- if (ctx->intra_refresh) {
|
||||
- h264->idrPeriod = NVENC_INFINITE_GOPLENGTH;
|
||||
- } else if (avctx->gop_size >= 0) {
|
||||
+ if (avctx->gop_size >= 0) {
|
||||
h264->idrPeriod = avctx->gop_size;
|
||||
}
|
||||
|
||||
@@ -1244,9 +1242,7 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
|
||||
hevc->maxNumRefFramesInDPB = ctx->dpb_size;
|
||||
}
|
||||
|
||||
- if (ctx->intra_refresh) {
|
||||
- hevc->idrPeriod = NVENC_INFINITE_GOPLENGTH;
|
||||
- } else if (avctx->gop_size >= 0) {
|
||||
+ if (avctx->gop_size >= 0) {
|
||||
hevc->idrPeriod = avctx->gop_size;
|
||||
}
|
||||
|
||||
--
|
||||
2.36.0
|
||||
|
||||
Reference in New Issue
Block a user