Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
ffmpeg_plugin: rebase master patch
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Degawa <[email protected]>
  • Loading branch information
1480c1 committed Jan 19, 2024
1 parent 6cca5b9 commit 78bcaa7
Showing 1 changed file with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 673e67dfff221da589e28216927fe5efd5b40586 Mon Sep 17 00:00:00 2001
From be059eaeefdc49e93066a8b618d5635e9a2c696a Mon Sep 17 00:00:00 2001
From: Jing Sun <[email protected]>
Date: Wed, 21 Nov 2018 11:33:04 +0800
Subject: [PATCH] lavc/svt_hevc: add libsvt hevc encoder wrapper
Expand All @@ -19,34 +19,34 @@ Signed-off-by: Guo Jiansheng <[email protected]>
create mode 100644 libavcodec/libsvt_hevc.c

diff --git a/configure b/configure
index c726076da1..c00fcd0294 100755
index c8ae0a061d..9cc741d2a7 100755
--- a/configure
+++ b/configure
@@ -291,6 +291,7 @@ External library support:
--enable-libwebp enable WebP encoding via libwebp [no]
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no]
@@ -330,6 +330,7 @@ External library support:
--enable-vapoursynth enable VapourSynth demuxer [no]
--disable-xlib disable xlib [autodetect]
--disable-zlib disable zlib [autodetect]
+ --enable-libsvthevc enable HEVC encoding via svt [no]
--enable-libxavs enable AVS encoding via xavs [no]
--enable-libxavs2 enable AVS2 encoding via xavs2 [no]
--enable-libxcb enable X11 grabbing using XCB [autodetect]
@@ -1852,6 +1853,7 @@ EXTERNAL_LIBRARY_LIST="

The following libraries provide various hardware acceleration features:
--disable-amf disable AMF video encoding code [autodetect]
@@ -1898,6 +1899,7 @@ EXTERNAL_LIBRARY_LIST="
libsrt
libssh
libsvtav1
+ libsvthevc
libtensorflow
libtesseract
libtheora
@@ -3404,6 +3406,7 @@ vapoursynth_demuxer_deps="vapoursynth"
@@ -3495,6 +3497,7 @@ vapoursynth_demuxer_deps="vapoursynth"
videotoolbox_suggest="coreservices"
videotoolbox_deps="corefoundation coremedia corevideo"
videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames"
+libsvt_hevc_encoder_deps="libsvthevc"

# demuxers / muxers
ac3_demuxer_select="ac3_parser"
@@ -6678,6 +6681,7 @@ enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp
@@ -6868,6 +6871,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle
Expand All @@ -55,32 +55,32 @@ index c726076da1..c00fcd0294 100755
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1fb963f820..77c9926ea6 100644
index bb42095165..08ebc58d7d 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1126,6 +1126,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim
@@ -1156,6 +1156,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim
OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o
+OBJS-$(CONFIG_LIBSVT_HEVC_ENCODER) += libsvt_hevc.o
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o
OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o
OBJS-$(CONFIG_LIBXEVD_DECODER) += libxevd.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index ff82423a88..57f085415c 100644
index 93ce8e3224..b709c7d551 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -812,6 +812,7 @@ extern LIBX264_CONST FFCodec ff_libx264_encoder;
#endif
extern const FFCodec ff_libx264rgb_encoder;
extern FFCodec ff_libx265_encoder;
+extern FFCodec ff_libsvt_hevc_encoder;
extern const FFCodec ff_libxavs_encoder;
@@ -829,6 +829,7 @@ extern const FFCodec ff_libxavs_encoder;
extern const FFCodec ff_libxavs2_encoder;
extern const FFCodec ff_libxvid_encoder;
extern const FFCodec ff_libzvbi_teletext_decoder;
+extern const FFCodec ff_libsvt_hevc_encoder;

/* text */
extern const FFCodec ff_bintext_decoder;
diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
new file mode 100644
index 0000000000..739144ca0c
index 0000000000..80b53a2157
--- /dev/null
+++ b/libavcodec/libsvt_hevc.c
@@ -0,0 +1,585 @@
Expand Down Expand Up @@ -647,7 +647,7 @@ index 0000000000..739144ca0c
+ { NULL },
+};
+
+FFCodec ff_libsvt_hevc_encoder = {
+const FFCodec ff_libsvt_hevc_encoder = {
+ .p.name = "libsvt_hevc",
+ .p.long_name = NULL_IF_CONFIG_SMALL("SVT-HEVC(Scalable Video Technology for HEVC) encoder"),
+ .priv_data_size = sizeof(SvtContext),
Expand All @@ -670,5 +670,5 @@ index 0000000000..739144ca0c
+ .p.wrapper_name = "libsvt_hevc",
+};
--
2.39.1
2.43.0

0 comments on commit 78bcaa7

Please sign in to comment.