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

Commit

Permalink
ffmpeg: rebase and add include for av_malloc
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Degawa <[email protected]>
  • Loading branch information
1480c1 committed Apr 2, 2024
1 parent 78bcaa7 commit ed80959
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From be059eaeefdc49e93066a8b618d5635e9a2c696a Mon Sep 17 00:00:00 2001
From 35bc2299c7eebb302b5db359fed1f01bc1beea73 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 @@ -14,39 +14,39 @@ Signed-off-by: Guo Jiansheng <[email protected]>
configure | 4 +
libavcodec/Makefile | 1 +
libavcodec/allcodecs.c | 1 +
libavcodec/libsvt_hevc.c | 585 +++++++++++++++++++++++++++++++++++++++
4 files changed, 591 insertions(+)
libavcodec/libsvt_hevc.c | 586 +++++++++++++++++++++++++++++++++++++++
4 files changed, 592 insertions(+)
create mode 100644 libavcodec/libsvt_hevc.c

diff --git a/configure b/configure
index c8ae0a061d..9cc741d2a7 100755
index 2d46ef0b9c..cc6d5891ec 100755
--- a/configure
+++ b/configure
@@ -330,6 +330,7 @@ External library support:
@@ -333,6 +333,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]

The following libraries provide various hardware acceleration features:
--disable-amf disable AMF video encoding code [autodetect]
@@ -1898,6 +1899,7 @@ EXTERNAL_LIBRARY_LIST="
@@ -1953,6 +1954,7 @@ EXTERNAL_LIBRARY_LIST="
libsrt
libssh
libsvtav1
+ libsvthevc
libtensorflow
libtesseract
libtheora
@@ -3495,6 +3497,7 @@ vapoursynth_demuxer_deps="vapoursynth"
@@ -3552,6 +3554,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"
@@ -6868,6 +6871,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/
@@ -6951,6 +6954,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,10 +55,10 @@ index c8ae0a061d..9cc741d2a7 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 bb42095165..08ebc58d7d 100644
index eef936944d..76c42fe35e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1156,6 +1156,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim
@@ -1154,6 +1154,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
Expand All @@ -67,10 +67,10 @@ index bb42095165..08ebc58d7d 100644
OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o
OBJS-$(CONFIG_LIBXEVD_DECODER) += libxevd.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 93ce8e3224..b709c7d551 100644
index 2386b450a6..5dad6ff74e 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -829,6 +829,7 @@ extern const FFCodec ff_libxavs_encoder;
@@ -820,6 +820,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;
Expand All @@ -80,10 +80,10 @@ index 93ce8e3224..b709c7d551 100644
extern const FFCodec ff_bintext_decoder;
diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
new file mode 100644
index 0000000000..80b53a2157
index 0000000000..cb7bc93472
--- /dev/null
+++ b/libavcodec/libsvt_hevc.c
@@ -0,0 +1,585 @@
@@ -0,0 +1,586 @@
+/*
+* Scalable Video Technology for HEVC encoder library plugin
+*
Expand All @@ -110,6 +110,7 @@ index 0000000000..80b53a2157
+
+#include "libavutil/common.h"
+#include "libavutil/frame.h"
+#include "libavutil/mem.h"
+#include "libavutil/opt.h"
+
+#include "codec_internal.h"
Expand Down Expand Up @@ -670,5 +671,5 @@ index 0000000000..80b53a2157
+ .p.wrapper_name = "libsvt_hevc",
+};
--
2.43.0
2.44.0

0 comments on commit ed80959

Please sign in to comment.