[Cin] libsvtav1 as internal lib patch

Andrew Randrianasulu randrianasulu at gmail.com
Wed Dec 27 00:43:25 CET 2023


you need to repack orig tar.gz svt-av1 archive, I'll upload that separately.

Disabled by default because it fails w/o patch on termux, but should be
easier for users than messing up with external variables ....

tar.xz of svt-av1 weighted 8.4mb but this is unavoidable considering
interest in this particular encoder.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20231227/41575bdc/attachment.htm>
-------------- next part --------------
diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index f210281c..d48b733f 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -467,6 +467,12 @@ PKG_3RD([libaom],[auto],
   [ usr/local/lib*/libaom*.a ],
   [ usr/local/include ])
 
+PKG_3RD([libsvtav1],[no],
+  [libsvtav1-v1.8.0],
+  [ usr/local/lib*/libSvtAv1Enc.a ],
+  [ usr/local/include/svt-av1 ])
+
+
 PKG_3RD([dav1d],[auto],
   [dav1d-0.5.1],
   [ usr/local/lib*/libdav1d*.a ],
@@ -1027,6 +1033,7 @@ PKG_PROVIDE([libuuid])
 PKG_PROVIDE([libvorbis])
 PKG_PROVIDE([mjpegtools])
 PKG_PROVIDE([libaom])
+PKG_PROVIDE([libsvtav1])
 PKG_PROVIDE([dav1d])
 PKG_PROVIDE([libwebp])
 PKG_PROVIDE([openExr], [$WANT_OPENEXR])
diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 8c7aaf91..195987f6 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -112,6 +112,7 @@ $(BLD):
 
 # pkg-config names
 pc_libaom=aom
+pc_libsvtav1=SvtAv1Enc
 pc_dav1d=dav1d
 pc_libwebp=libwebp libwebpmux
 pc_opus=opus
@@ -140,6 +141,7 @@ ffmpeg.cfg_params= \
 	$(call if_ena,openjpeg,--enable-libopenjpeg) \
 	$(call if_ena,lame,--enable-libmp3lame) \
 	$(call if_ena,libaom,--enable-libaom) \
+	$(call if_ena,libsvtav1,--enable-libsvtav1) \
 	$(call if_ena,dav1d,--enable-libdav1d) \
 	$(call if_ena,libwebp,--enable-libwebp) \
 	$(call if_ena,opus,--enable-libopus) \
@@ -153,6 +155,7 @@ ffmpeg.cfg_params= \
 		$(call inc_path,twolame) \
 		$(call inc_path,lame) \
 		$(call inc_path,libaom) \
+		$(call inc_path,libsvtav1) \
 		$(call inc_path,dav1d) \
 		$(call inc_path,libwebp) \
 		$(call inc_path,openjpeg) \
@@ -169,6 +172,7 @@ ffmpeg.cfg_params= \
 		$(call ld_path,twolame,libtwolame/.libs) \
 		$(call ld_path,lame,libmp3lame/.libs) \
 		$(call ld_path,libaom,usr/local/lib) \
+		$(call ld_path,libsvtav1,usr/local/lib) \
 		$(call ld_path,dav1d,usr/local/lib) \
 		$(call ld_path,libwebp,usr/local/lib) \
 		$(call ld_path,openjpeg,bin) \
@@ -209,6 +213,10 @@ libaom.cfg_vars?= mkdir aom.build && cd aom.build && $(call cmake_config,..)
 libaom.cfg_params?=  -DENABLE_TESTS=no -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=no -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
  -DENABLE_EXAMPLES=no -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local
 libaom.mak_params?= ; $(MAKE) -C libaom*/aom.build install
+libsvtav1.cfg_vars?= mkdir libsvtav1.build && cd libsvtav1.build && $(call cmake_config,..)
+libsvtav1.cfg_params?=  -DENABLE_TESTS=no -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=no -DENABLE_DOCS=no -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
+ -DENABLE_EXAMPLES=no -DCMAKE_INSTALL_PREFIX=$(call bld_path,libsvtav1)/usr/local
+libsvtav1.mak_params?= ; $(MAKE) -C libsvtav1*/libsvtav1.build install
 dav1d.cfg_vars?=echo "echo dav1d custom make" >> configure; chmod +x ./configure;
 dav1d.mak_params?=; $(MAKE) -C dav1d* install DESTDIR="$(call bld_path,dav1d)"
 libwebp.cfg_vars?= ./autogen.sh;
@@ -342,7 +350,7 @@ $(call rules,$(call std-build,audiofile))
 $(call rules,$(call std-build,encore))
 $(call rules,$(call std-build,esound,audiofile))
 $(call rules,$(call std-build,ffmpeg, twolame lame openjpeg opus \
-	libtheora x264 x265 libvpx libaom dav1d libwebp \
+	libtheora x264 x265 libvpx libaom libsvtav1 dav1d libwebp \
 	$(call if_want,NV, ffnvcodec)))
 $(call rules,$(call std-build,fftw))
 $(call rules,$(call std-build,flac,libogg))
@@ -351,6 +359,7 @@ $(call rules,$(call std-build,ilmBase, openexr))
 $(call rules,$(call std-build,ladspa))
 $(call rules,$(call std-build,lame))
 $(call rules,$(call std-build,libaom))
+$(call rules,$(call std-build,libsvtav1))
 $(call rules,$(call std-build,dav1d))
 $(call rules,$(call std-build,libwebp))
 $(call rules,$(call std-build,libavc1394,libraw1394))


More information about the Cin mailing list