1- From 3d2c2bba486f11f7a55eaf8b51159dea19c03231 Mon Sep 17 00:00:00 2001
1+ From 19f4bd57e3d60dc6e40bc1ff96fbb91916dd7cc4 Mon Sep 17 00:00:00 2001
22From: Jing Sun <
[email protected] >
33Date: Wed, 21 Nov 2018 11:33:04 +0800
44Subject: [PATCH] lavc/svt_hevc: add libsvt hevc encoder wrapper
@@ -21,46 +21,46 @@ UPDATED 2025-06-20 by Martin Pulec: rebased against 45a30e036 + fix compile
2121 create mode 100644 libavcodec/libsvt_hevc.c
2222
2323diff --git a/configure b/configure
24- index 077b87af..5dcc49ca 100755
24+ index e1809a3e58..936cea82ab 100755
2525--- a/configure
2626+++ b/configure
2727@@ -339,6 +339,7 @@ External library support:
28- --enable-vapoursynth enable VapourSynth demuxer [no]
28+ --enable-whisper enable whisper filter [no]
2929 --disable-xlib disable xlib [autodetect]
3030 --disable-zlib disable zlib [autodetect]
3131+ --enable-libsvthevc enable HEVC encoding via svt [no]
3232
3333 The following libraries provide various hardware acceleration features:
3434 --disable-amf disable AMF video encoding code [autodetect]
35- @@ -1981 ,6 +1982 ,7 @@ EXTERNAL_LIBRARY_LIST="
35+ @@ -1979 ,6 +1980 ,7 @@ EXTERNAL_LIBRARY_LIST="
3636 libsrt
3737 libssh
3838 libsvtav1
3939+ libsvthevc
4040 libtensorflow
4141 libtesseract
4242 libtheora
43- @@ -3655 ,6 +3657 ,7 @@ vapoursynth_demuxer_deps="vapoursynth"
43+ @@ -3678 ,6 +3680 ,7 @@ vapoursynth_demuxer_deps="vapoursynth"
4444 videotoolbox_suggest="coreservices"
4545 videotoolbox_deps="corefoundation coremedia corevideo VTDecompressionSessionDecodeFrame"
4646 videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames"
4747+ libsvt_hevc_encoder_deps="libsvthevc"
4848
4949 # demuxers / muxers
5050 ac3_demuxer_select="ac3_parser"
51- @@ -7094 ,6 +7097 ,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/
51+ @@ -7149 ,6 +7152 ,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/
5252 enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
5353 enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
5454 enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle
5555+ enabled libsvthevc && require_pkg_config libsvthevc SvtHevcEnc EbApi.h EbInitHandle
56- enabled libsvtvp9 && require_pkg_config libsvtvp9 SvtVp9Enc EbSvtVp9Enc.h eb_vp9_svt_init_handle
5756 enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
5857 enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
58+ enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
5959diff --git a/libavcodec/Makefile b/libavcodec/Makefile
60- index 805b0a07..49c644ca 100644
60+ index 35408949ac..12f534a1d7 100644
6161--- a/libavcodec/Makefile
6262+++ b/libavcodec/Makefile
63- @@ -1188 ,6 +1188 ,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim
63+ @@ -1202 ,6 +1202 ,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim
6464 OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o
6565 OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
6666 OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o
@@ -69,10 +69,10 @@ index 805b0a07..49c644ca 100644
6969 OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o
7070 OBJS-$(CONFIG_LIBXEVD_DECODER) += libxevd.o
7171diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
72- index fef337ca..8e67e0df 100644
72+ index f5ec2e01e8..7844040a00 100644
7373--- a/libavcodec/allcodecs.c
7474+++ b/libavcodec/allcodecs.c
75- @@ -826 ,6 +826 ,7 @@ extern const FFCodec ff_libxavs_encoder;
75+ @@ -827 ,6 +827 ,7 @@ extern const FFCodec ff_libxavs_encoder;
7676 extern const FFCodec ff_libxavs2_encoder;
7777 extern const FFCodec ff_libxvid_encoder;
7878 extern const FFCodec ff_libzvbi_teletext_decoder;
@@ -82,7 +82,7 @@ index fef337ca..8e67e0df 100644
8282 extern const FFCodec ff_bintext_decoder;
8383diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
8484new file mode 100644
85- index 00000000..07f62fa7
85+ index 0000000000..07f62fa762
8686--- /dev/null
8787+++ b/libavcodec/libsvt_hevc.c
8888@@ -0,0 +1,584 @@
@@ -671,5 +671,5 @@ index 00000000..07f62fa7
671671+ .p.wrapper_name = "libsvt_hevc",
672672+ };
673673- -
674- 2.50.0
674+ 2.50.1
675675
0 commit comments