Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to FFmpeg 5.x #204

Merged
merged 6 commits into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions FindFFMPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@
#

# required ffmpeg library versions
set(REQUIRED_FFMPEG_VERSION 4.0)
set(_avcodec_ver ">=58.18.100")
set(_avfilter_ver ">=7.16.100")
set(_avformat_ver ">=58.12.100")
set(_avutil_ver ">=56.14.100")
set(_swscale_ver ">=5.1.100")
set(_swresample_ver ">=3.1.100")
set(_postproc_ver ">=55.1.100")

set(REQUIRED_FFMPEG_VERSION 5.0.0)
set(_avcodec_ver ">=59.18.100")
set(_avfilter_ver ">=8.24.100")
set(_avformat_ver ">=59.16.100")
set(_avutil_ver ">=57.17.100")
set(_postproc_ver ">=56.3.100")
set(_swresample_ver ">=4.3.100")
set(_swscale_ver ">=6.4.100")

# Allows building with external ffmpeg not found in system paths,
# without library version checks
Expand Down
43 changes: 43 additions & 0 deletions depends/common/ffmpeg/04-fix-build-aarch64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
diff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile
index 9ce21566..efe2ce9f 100644
--- a/libavcodec/aarch64/Makefile
+++ b/libavcodec/aarch64/Makefile
@@ -51,7 +51,7 @@ NEON-OBJS-$(CONFIG_MDCT) += aarch64/mdct_neon.o
NEON-OBJS-$(CONFIG_ME_CMP) += aarch64/me_cmp_neon.o
NEON-OBJS-$(CONFIG_MPEGAUDIODSP) += aarch64/mpegaudiodsp_neon.o
NEON-OBJS-$(CONFIG_PIXBLOCKDSP) += aarch64/pixblockdsp_neon.o
-NEON-OBJS-$(CONFIG_VC1DSP) += aarch64/vc1dsp_neon.o
+#NEON-OBJS-$(CONFIG_VC1DSP) += aarch64/vc1dsp_neon.o
NEON-OBJS-$(CONFIG_VP8DSP) += aarch64/vp8dsp_neon.o

# decoders/encoders
diff --git a/libavcodec/aarch64/vc1dsp_init_aarch64.c b/libavcodec/aarch64/vc1dsp_init_aarch64.c
index a7976fd5..ef31019b 100644
--- a/libavcodec/aarch64/vc1dsp_init_aarch64.c
+++ b/libavcodec/aarch64/vc1dsp_init_aarch64.c
@@ -26,6 +26,7 @@

#include "config.h"

+#if 0
void ff_vc1_inv_trans_8x8_neon(int16_t *block);
void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
@@ -109,9 +110,11 @@ static int vc1_unescape_buffer_neon(const uint8_t *src, int size, uint8_t *dst)
}
return dsize;
}
+#endif // #if 0

av_cold void ff_vc1dsp_init_aarch64(VC1DSPContext *dsp)
{
+#if 0
int cpu_flags = av_get_cpu_flags();

if (have_neon(cpu_flags)) {
@@ -138,4 +141,5 @@ av_cold void ff_vc1dsp_init_aarch64(VC1DSPContext *dsp)

dsp->vc1_unescape_buffer = vc1_unescape_buffer_neon;
}
+#endif // #if 0
}
1 change: 1 addition & 0 deletions depends/common/ffmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ if(NOT WIN32)
else()
list(APPEND EXTRA_CONF "--as=${CMAKE_INSTALL_PREFIX}/bin/gas-preprocessor.pl -arch aarch64 -- ${CMAKE_C_COMPILER}")
list(APPEND EXTRA_CONF --arch=aarch64)
list(APPEND EXTRA_CONF --disable-filter=yadif_videotoolbox)
endif()
list(APPEND EXTRA_CONF --disable-decoder=mpeg_xvmc --disable-crystalhd --enable-videotoolbox
--target-os=darwin)
Expand Down
2 changes: 1 addition & 1 deletion depends/common/ffmpeg/ffmpeg.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bea6d9f91cdbe4c5ad98e0878955ad5077df3883ef321fd4668ee1076de793fe
ea84f1f7f72d0d7c4c2cbb6b4f2170b908a090448fc1834353a9f5fbf7c31fb4
2 changes: 1 addition & 1 deletion depends/common/ffmpeg/ffmpeg.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ffmpeg https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz
ffmpeg https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.1.2.tar.gz
Loading