Skip to content

Commit

Permalink
* Upgrade presets for FFmpeg 6.1 and their dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Nov 12, 2023
1 parent d7749b1 commit 3453be4
Show file tree
Hide file tree
Showing 191 changed files with 1,251 additions and 669 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Refactor and improve presets for PyTorch ([pull #1360](https://github.com/bytedeco/javacpp-presets/pull/1360))
* Include `mkl_lapack.h` header file in presets for MKL ([issue #1388](https://github.com/bytedeco/javacpp-presets/issues/1388))
* Map new higher-level C++ API of Triton Inference Server ([pull #1361](https://github.com/bytedeco/javacpp-presets/pull/1361))
* Upgrade presets for OpenCV 4.8.1, HDF5 1.14.3, DNNL 3.3, OpenBLAS 0.3.24, ARPACK-NG 3.9.1, CPython 3.12.0, NumPy 1.26.1, SciPy 1.11.3, LLVM 17.0.4, Leptonica 1.83.1, Tesseract 5.3.3, CUDA 12.3.0, cuDNN 8.9.5, NCCL 2.18.5, PyTorch 2.1.0 ([pull #1426](https://github.com/bytedeco/javacpp-presets/pull/1426)), TensorFlow Lite 2.14.0, Triton Inference Server 2.38.0, ONNX 1.15.0, ONNX Runtime 1.16.2, TVM 0.14.0, and their dependencies
* Upgrade presets for OpenCV 4.8.1, FFmpeg 6.1, HDF5 1.14.3, DNNL 3.3, OpenBLAS 0.3.24, ARPACK-NG 3.9.1, CPython 3.12.0, NumPy 1.26.1, SciPy 1.11.3, LLVM 17.0.4, Leptonica 1.83.1, Tesseract 5.3.3, CUDA 12.3.0, cuDNN 8.9.5, NCCL 2.18.5, PyTorch 2.1.0 ([pull #1426](https://github.com/bytedeco/javacpp-presets/pull/1426)), TensorFlow Lite 2.14.0, Triton Inference Server 2.38.0, ONNX 1.15.0, ONNX Runtime 1.16.2, TVM 0.14.0, and their dependencies

### June 6, 2023 version 1.5.9
* Virtualize `nvinfer1::IGpuAllocator` from TensorRT to allow customization ([pull #1367](https://github.com/bytedeco/javacpp-presets/pull/1367))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The JavaCPP Presets depend on Maven, a powerful build system for Java, so before
Each child module in turn relies by default on the included [`cppbuild.sh` scripts](#the-cppbuildsh-scripts), explained below, to install its corresponding native libraries in the `cppbuild` subdirectory. To use native libraries already installed somewhere else on the system, other installation directories than `cppbuild` can also be specified either in the `pom.xml` files or in the `.java` configuration files. The following versions are supported:

* OpenCV 4.8.x https://opencv.org/releases/
* FFmpeg 6.0.x http://ffmpeg.org/download.html
* FFmpeg 6.1.x http://ffmpeg.org/download.html
* FlyCapture 2.13.x https://www.flir.com/products/flycapture-sdk
* Spinnaker 3.0.x https://www.flir.com/products/spinnaker-sdk
* libdc1394 2.2.6 http://sourceforge.net/projects/libdc1394/files/
Expand Down
8 changes: 4 additions & 4 deletions ffmpeg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:

* FFmpeg 6.0 http://ffmpeg.org/
* FFmpeg 6.1 http://ffmpeg.org/

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Expand Down Expand Up @@ -38,22 +38,22 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.ffmpeg</groupId>
<artifactId>readfewframe</artifactId>
<version>1.5.9</version>
<version>1.5.10-SNAPSHOT</version>
<properties>
<exec.mainClass>ReadFewFrame</exec.mainClass>
</properties>
<dependencies>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>6.0-1.5.9</version>
<version>6.1-1.5.10-SNAPSHOT</version>
</dependency>

<!-- Optional GPL builds with (almost) everything enabled -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform-gpl</artifactId>
<version>6.0-1.5.9</version>
<version>6.1-1.5.10-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
Expand Down
24 changes: 12 additions & 12 deletions ffmpeg/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ LIBAOM_CONFIG="-DENABLE_TESTS:BOOL=OFF -DENABLE_TESTDATA:BOOL=OFF -DENABLE_TOOLS
LIBSVTAV1_CONFIG="-DBUILD_APPS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include -DCMAKE_INSTALL_BINDIR=bin"

NASM_VERSION=2.14
ZLIB=zlib-1.2.13
ZLIB=zlib-1.3
LAME=lame-3.100
SPEEX=speex-1.2.1
OPUS=opus-1.3.1
OPENCORE_AMR=opencore-amr-0.1.6
VO_AMRWBENC=vo-amrwbenc-0.1.3
OPENSSL=openssl-3.1.0
OPENSSL=openssl-3.1.4
OPENH264_VERSION=2.3.1
X264=x264-stable
X265=3.4
VPX_VERSION=1.13.0
ALSA_VERSION=1.2.9
FREETYPE_VERSION=2.13.0
VPX_VERSION=1.13.1
ALSA_VERSION=1.2.10
FREETYPE_VERSION=2.13.2
MFX_VERSION=1.35.1
NVCODEC_VERSION=12.0.16.0
NVCODEC_VERSION=12.1.14.0
XML2=libxml2-2.9.12
LIBSRT_VERSION=1.5.1
WEBP_VERSION=1.3.0
AOMAV1_VERSION=3.6.1
SVTAV1_VERSION=1.5.0
FFMPEG_VERSION=6.0
LIBSRT_VERSION=1.5.3
WEBP_VERSION=1.3.2
AOMAV1_VERSION=3.7.0
SVTAV1_VERSION=1.7.0
FFMPEG_VERSION=6.1
download https://download.videolan.org/contrib/nasm/nasm-$NASM_VERSION.tar.gz nasm-$NASM_VERSION.tar.gz
download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz
download http://downloads.sourceforge.net/project/lame/lame/3.100/$LAME.tar.gz $LAME.tar.gz
Expand Down Expand Up @@ -114,7 +114,7 @@ export PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/
patch -Np1 -d $LAME < ../../lame.patch
patch -Np1 -d $OPENSSL < ../../openssl-android.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg-flv-support-hevc-opus.patch
# patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg-flv-support-hevc-opus.patch
sedinplace 's/bool bEnableavx512/bool bEnableavx512 = false/g' x265-*/source/common/param.h
sedinplace 's/detect512()/false/g' x265-*/source/common/quant.cpp
sedinplace 's/CMAKE_C_COMPILER_ID MATCHES "Clang"/FALSE/g' SVT-AV1-*/CMakeLists.txt
Expand Down
36 changes: 19 additions & 17 deletions ffmpeg/ffmpeg.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
--- ffmpeg-6.0/configure 2023-02-28 05:43:45.000000000 +0900
+++ ffmpeg-6.0-patch/configure 2023-03-02 18:30:58.642611366 +0900
@@ -6563,7 +6563,7 @@
diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure
--- ffmpeg-6.1/configure 2023-11-11 09:25:17.000000000 +0900
+++ ffmpeg-6.1-patch/configure 2023-11-11 19:18:26.388930944 +0900
@@ -6673,7 +6673,7 @@
enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && require_headers "ladspa.h dlfcn.h"
enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext
Expand All @@ -10,16 +10,16 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
{ enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; }
@@ -6588,7 +6588,7 @@
@@ -6699,7 +6699,7 @@
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
enabled fontconfig && enable libfontconfig
enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
-enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
+enabled libfreetype && add_cppflags -I ../include/freetype2/ && require libfreetype "ft2build.h FT_FREETYPE_H" FT_Init_FreeType -lfreetype
enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create
enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
-lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \
@@ -6617,15 +6617,7 @@
@@ -6729,15 +6729,7 @@
# pkg-config support. Instead, users should make sure that the build
# can find the libraries and headers through other means.
elif enabled libmfx; then
Expand All @@ -33,10 +33,10 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
- { test_cpp_condition mfxdefs.h "MFX_VERSION >= 1028 && MFX_VERSION < 2000" || die "ERROR: libmfx version must be >= 1.28 and < 2.0"; } &&
- warn "using libmfx without pkg-config"; } } &&
+ require libmfx "mfx/mfxvideo.h" MFXInit -lmfx && warn "using libmfx without pkg-config" &&
warn "build FFmpeg against libmfx 1.x, obsolete features of libmfx such as OPAQUE memory,\n"\
"multi-frame encode, user plugins and LA_EXT rate control mode are enabled"
warn "libmfx is deprecated. Please run configure with --enable-libvpl to use libvpl instead."
elif enabled libvpl; then
@@ -6653,19 +6645,12 @@
# Consider pkg-config only. The name of libmfx is still passed to check_pkg_config function for --enable-libvpl option
@@ -6764,21 +6756,14 @@
{ check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
Expand All @@ -45,7 +45,9 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
{ check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }
-enabled libopus && {
- enabled libopus_decoder && {
- require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
Expand All @@ -58,10 +60,10 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
@@ -6681,9 +6666,9 @@
@@ -6794,9 +6779,9 @@
enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init
-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 @@ -71,7 +73,7 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
@@ -6701,19 +6686,15 @@
@@ -6815,19 +6800,15 @@

enabled libvpx && {
enabled libvpx_vp8_decoder && {
Expand All @@ -91,7 +93,7 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
}
if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
@@ -6722,14 +6703,14 @@
@@ -6836,14 +6817,14 @@
}

enabled libwebp && {
Expand All @@ -110,7 +112,7 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
require_cpp_condition libx265 x265.h "X265_BUILD >= 89"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
@@ -6739,7 +6720,7 @@
@@ -6853,7 +6834,7 @@
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
{ test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
Expand All @@ -119,7 +121,7 @@ diff -ruN ffmpeg-6.0/configure ffmpeg-6.0-patch/configure
enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
@@ -6778,15 +6759,13 @@
@@ -6892,15 +6873,13 @@
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
enable omx
enabled omx && require_headers OMX_Core.h
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>6.0-${project.parent.version}</version>
<version>6.1-${project.parent.version}</version>
<name>JavaCPP Presets Platform for FFmpeg</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>6.0-${project.parent.version}</version>
<version>6.1-${project.parent.version}</version>
<name>JavaCPP Presets for FFmpeg</name>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>6.0-1.5.10-SNAPSHOT</version>
<version>6.1-1.5.10-SNAPSHOT</version>
</dependency>

<!-- Optional GPL builds with (almost) everything enabled -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform-gpl</artifactId>
<version>6.0-1.5.10-SNAPSHOT</version>
<version>6.1-1.5.10-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.ffmpeg.avcodec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.ffmpeg.avcodec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.ffmpeg.avcodec;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.ffmpeg.avcodec;

Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodec.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.ffmpeg.avcodec;

Expand Down Expand Up @@ -74,7 +74,7 @@ public class AVCodec extends Pointer {
// #endif
/** AVClass for the private context */
public native @Const AVClass priv_class(); public native AVCodec priv_class(AVClass setter);
/** array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} */
/** array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN} */
public native @Const AVProfile profiles(); public native AVCodec profiles(AVProfile setter);

/**
Expand Down
Loading

0 comments on commit 3453be4

Please sign in to comment.