Skip to content

Commit 7afbd89

Browse files
author
seydx
committed
Update patches and ffmpeg
1 parent 851a342 commit 7afbd89

35 files changed

Lines changed: 183 additions & 154 deletions

File tree

FFmpeg

Submodule FFmpeg updated 442 files

patches/jellyfin/0004-add-cuda-tonemap-impl.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Index: FFmpeg/configure
22
===================================================================
33
--- FFmpeg.orig/configure
44
+++ FFmpeg/configure
5-
@@ -3418,6 +3418,8 @@ scale_cuda_filter_deps="ffnvcodec"
5+
@@ -3417,6 +3417,8 @@ scale_cuda_filter_deps="ffnvcodec"
66
scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
77
thumbnail_cuda_filter_deps="ffnvcodec"
88
thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
@@ -11,7 +11,7 @@ Index: FFmpeg/configure
1111
transpose_npp_filter_deps="ffnvcodec libnpp"
1212
overlay_cuda_filter_deps="ffnvcodec"
1313
overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
14-
@@ -4852,8 +4854,10 @@ if enabled cuda_nvcc; then
14+
@@ -4851,8 +4853,10 @@ if enabled cuda_nvcc; then
1515
nvcc_default="nvcc"
1616
nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
1717
else
@@ -23,7 +23,7 @@ Index: FFmpeg/configure
2323
NVCC_C=""
2424
fi
2525

26-
@@ -4866,6 +4870,11 @@ if enabled cuda_nvcc; then
26+
@@ -4865,6 +4869,11 @@ if enabled cuda_nvcc; then
2727
if $nvcc $nvccflags_default 2>&1 | grep -qi unsupported; then
2828
nvccflags_default="-gencode arch=compute_75,code=sm_75 -O2"
2929
fi

patches/jellyfin/0006-add-opencl-scaler-and-pixfmt-converter-impl.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Index: FFmpeg/configure
22
===================================================================
33
--- FFmpeg.orig/configure
44
+++ FFmpeg/configure
5-
@@ -4079,6 +4079,7 @@ rubberband_filter_deps="librubberband"
5+
@@ -4078,6 +4078,7 @@ rubberband_filter_deps="librubberband"
66
sab_filter_deps="gpl swscale"
77
scale2ref_filter_deps="swscale"
88
scale_filter_deps="swscale"

patches/jellyfin/0014-add-vaapi-hwupload-filter.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Index: FFmpeg/configure
22
===================================================================
33
--- FFmpeg.orig/configure
44
+++ FFmpeg/configure
5-
@@ -4027,6 +4027,7 @@ gblur_vulkan_filter_deps="vulkan spirv_c
5+
@@ -4026,6 +4026,7 @@ gblur_vulkan_filter_deps="vulkan spirv_c
66
hflip_vulkan_filter_deps="vulkan spirv_compiler"
77
histeq_filter_deps="gpl"
88
hqdn3d_filter_deps="gpl"

patches/jellyfin/0019-backport-fixes-for-qsv-from-cartwheel.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,15 @@ Index: FFmpeg/libavcodec/qsvenc.c
218218
===================================================================
219219
--- FFmpeg.orig/libavcodec/qsvenc.c
220220
+++ FFmpeg/libavcodec/qsvenc.c
221-
@@ -205,6 +205,7 @@ static void dump_video_param(AVCodecCont
221+
@@ -203,6 +203,7 @@ static void dump_video_param(AVCodecCont
222222
#endif
223223

224224
const char *tmp_str = NULL;
225225
+ mfxExtHEVCParam *exthevcparam = NULL;
226226

227227
if (q->co2_idx > 0)
228228
co2 = (mfxExtCodingOption2*)coding_opts[q->co2_idx];
229-
@@ -220,6 +221,8 @@ static void dump_video_param(AVCodecCont
229+
@@ -218,6 +219,8 @@ static void dump_video_param(AVCodecCont
230230
exthypermodeparam = (mfxExtHyperModeParam *)coding_opts[q->exthypermodeparam_idx];
231231
#endif
232232

@@ -235,7 +235,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
235235
av_log(avctx, AV_LOG_VERBOSE, "profile: %s; level: %"PRIu16"\n",
236236
print_profile(avctx->codec_id, info->CodecProfile), info->CodecLevel);
237237

238-
@@ -400,6 +403,11 @@ static void dump_video_param(AVCodecCont
238+
@@ -398,6 +401,11 @@ static void dump_video_param(AVCodecCont
239239
av_log(avctx, AV_LOG_VERBOSE, "\n");
240240
}
241241
#endif
@@ -247,7 +247,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
247247
}
248248

249249
static void dump_video_vp9_param(AVCodecContext *avctx, QSVEncContext *q,
250-
@@ -1211,6 +1219,18 @@ static int init_video_param(AVCodecConte
250+
@@ -1209,6 +1217,18 @@ static int init_video_param(AVCodecConte
251251
q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->exthevctiles;
252252
}
253253

@@ -266,7 +266,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
266266
q->extvsi.VideoFullRange = (avctx->color_range == AVCOL_RANGE_JPEG);
267267
q->extvsi.ColourDescriptionPresent = 0;
268268

269-
@@ -1463,12 +1483,17 @@ static int qsv_retrieve_enc_params(AVCod
269+
@@ -1461,12 +1481,17 @@ static int qsv_retrieve_enc_params(AVCod
270270
};
271271
#endif
272272

@@ -285,7 +285,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
285285
ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&extradata;
286286
ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&co;
287287

288-
@@ -1496,6 +1521,10 @@ static int qsv_retrieve_enc_params(AVCod
288+
@@ -1494,6 +1519,10 @@ static int qsv_retrieve_enc_params(AVCod
289289
ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&hyper_mode_param_buf;
290290
}
291291
#endif

patches/jellyfin/0021-add-external-frame-support-for-qsv-enc.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
1414
===================================================================
1515
--- FFmpeg.orig/libavcodec/qsvenc.c
1616
+++ FFmpeg/libavcodec/qsvenc.c
17-
@@ -1900,6 +1900,10 @@ static void clear_unused_frames(QSVEncCo
17+
@@ -1898,6 +1898,10 @@ static void clear_unused_frames(QSVEncCo
1818
memset(&cur->enc_ctrl, 0, sizeof(cur->enc_ctrl));
1919
cur->enc_ctrl.Payload = cur->payloads;
2020
cur->enc_ctrl.ExtParam = cur->extparam;
@@ -25,7 +25,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
2525
if (cur->frame->format == AV_PIX_FMT_QSV) {
2626
av_frame_unref(cur->frame);
2727
}
28-
@@ -2071,6 +2075,16 @@ static int submit_frame(QSVEncContext *q
28+
@@ -2069,6 +2073,16 @@ static int submit_frame(QSVEncContext *q
2929
return ret;
3030

3131
if (frame->format == AV_PIX_FMT_QSV) {
@@ -42,7 +42,7 @@ Index: FFmpeg/libavcodec/qsvenc.c
4242
ret = av_frame_ref(qf->frame, frame);
4343
if (ret < 0)
4444
return ret;
45-
@@ -2079,10 +2093,19 @@ static int submit_frame(QSVEncContext *q
45+
@@ -2077,10 +2091,19 @@ static int submit_frame(QSVEncContext *q
4646

4747
if (q->frames_ctx.mids) {
4848
ret = ff_qsv_find_surface_idx(&q->frames_ctx, qf);

patches/jellyfin/0023-add-fixes-for-hevc-hdr-decoding-in-bsf.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Index: FFmpeg/tests/fate/hevc.mak
99
-fate-hevc-bsf-mp4toannexb: REF = 73019329ed7f81c24f9af67c34c640c0
1010
+fate-hevc-bsf-mp4toannexb: REF = 7d05a79c7a6665ae22c0043a4d83a811
1111

12-
fate-hevc-skiploopfilter: CMD = framemd5 -skip_loop_filter nokey -i $(TARGET_SAMPLES)/hevc-conformance/SAO_D_Samsung_5.bit -sws_flags bitexact
13-
FATE_HEVC-$(call FRAMEMD5, HEVC, HEVC, HEVC_PARSER) += fate-hevc-skiploopfilter
12+
# Start with IDR, POC < 0 after the second IDR
13+
FATE_HEVC-$(call FRAMECRC, MOV HEVC,, HEVC_PARSER MOV_MUXER DTS2PTS_BSF) += fate-hevc-bsf-dts2pts-idr

patches/jellyfin/0030-pass-dovi-sidedata-to-hlsenc-and-mpegtsenc.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Index: FFmpeg/libavformat/hlsenc.c
9898
===================================================================
9999
--- FFmpeg.orig/libavformat/hlsenc.c
100100
+++ FFmpeg/libavformat/hlsenc.c
101-
@@ -883,7 +883,7 @@ static int hls_mux_init(AVFormatContext
101+
@@ -775,7 +775,7 @@ static int hls_mux_init(AVFormatContext
102102
AVFormatContext *vtt_oc = NULL;
103103
int byterange_mode = (hls->flags & HLS_SINGLE_FILE) || (hls->max_seg_size > 0);
104104
int remaining_options;
@@ -107,7 +107,7 @@ Index: FFmpeg/libavformat/hlsenc.c
107107

108108
ret = avformat_alloc_output_context2(&vs->avf, vs->oformat, NULL, NULL);
109109
if (ret < 0)
110-
@@ -931,6 +931,20 @@ static int hls_mux_init(AVFormatContext
110+
@@ -823,6 +823,20 @@ static int hls_mux_init(AVFormatContext
111111
st->codecpar->codec_tag = 0;
112112
}
113113

@@ -157,15 +157,15 @@ Index: FFmpeg/libavformat/movenc.c
157157
} else if (dovi) {
158158
av_log(mov->fc, AV_LOG_WARNING, "Not writing 'dvcC'/'dvvC' box. Requires -strict unofficial.\n");
159159
}
160-
@@ -8829,6 +8831,7 @@ static const AVCodecTag codec_mp4_tags[]
160+
@@ -8843,6 +8845,7 @@ static const AVCodecTag codec_mp4_tags[]
161161
{ AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') },
162162
{ AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') },
163163
{ AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', '1') },
164164
+ { AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', 'e') },
165165
{ AV_CODEC_ID_VVC, MKTAG('v', 'v', 'c', '1') },
166166
{ AV_CODEC_ID_VVC, MKTAG('v', 'v', 'i', '1') },
167167
{ AV_CODEC_ID_EVC, MKTAG('e', 'v', 'c', '1') },
168-
@@ -8843,6 +8846,7 @@ static const AVCodecTag codec_mp4_tags[]
168+
@@ -8857,6 +8860,7 @@ static const AVCodecTag codec_mp4_tags[]
169169
{ AV_CODEC_ID_TSCC2, MKTAG('m', 'p', '4', 'v') },
170170
{ AV_CODEC_ID_VP9, MKTAG('v', 'p', '0', '9') },
171171
{ AV_CODEC_ID_AV1, MKTAG('a', 'v', '0', '1') },

patches/jellyfin/0032-enable-gcc-vectorization-and-fix-cpuflags.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Index: FFmpeg/configure
22
===================================================================
33
--- FFmpeg.orig/configure
44
+++ FFmpeg/configure
5-
@@ -5791,7 +5791,7 @@ elif enabled x86; then
5+
@@ -5790,7 +5790,7 @@ elif enabled x86; then
66
;;
77
# everything else should support nopl and conditional mov (cmov)
88
*)

patches/jellyfin/0035-add-hdr-metadata-for-nvenc-hevc-encoder.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Index: FFmpeg/libavcodec/nvenc.c
1818
#include "libavutil/mem.h"
1919
#include "libavutil/pixdesc.h"
2020
#include "libavutil/timecode_internal.h"
21-
@@ -2892,6 +2894,80 @@ static int prepare_sei_data_array(AVCode
21+
@@ -2891,6 +2893,80 @@ static int prepare_sei_data_array(AVCode
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)