Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From bf8eae2d30a205bb76ac625e04c0351106981b9e Mon Sep 17 00:00:00 2001
|
||||
From: Parker Ernest <@>
|
||||
Date: Sun, 23 Feb 2020 13:22:42 +0100
|
||||
Subject: [PATCH] swscale/x86/yuv2rgb: Fix build without SSSE3
|
||||
|
||||
commit fc6a5883d6af8cae0e96af84dda0ad74b360a084 breaks build on
|
||||
x86_64 CPUs which do not have SSSE3, e.g. AMD Phenom-II
|
||||
|
||||
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
||||
[bernd.kuhls@t-online.de:
|
||||
- retrieved from upstream patchwork:
|
||||
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200223122256.23402-1-michael@niedermayer.cc/
|
||||
]
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[yann.morin.1998@free.fr: fix reference top patchwork and SoB order]
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
libswscale/x86/yuv2rgb.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
|
||||
index c12e88cbb5..4791e5b93a 100644
|
||||
--- a/libswscale/x86/yuv2rgb.c
|
||||
+++ b/libswscale/x86/yuv2rgb.c
|
||||
@@ -70,6 +70,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
+#if HAVE_SSSE3
|
||||
if (EXTERNAL_SSSE3(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
case AV_PIX_FMT_RGB32:
|
||||
@@ -98,6 +99,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
return yuv420_rgb15_ssse3;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 2c6b3f357331e203ad87214984661c40704aceb7 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Sat, 26 Jan 2019 19:48:35 +0100
|
||||
Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
|
||||
|
||||
This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
|
||||
It was hit frequently when watching h264 channels received via DVB-X.
|
||||
Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
|
||||
|
||||
Downloaded from Kodi ffmpeg repo:
|
||||
https://github.com/xbmc/FFmpeg/commit/2c6b3f357331e203ad87214984661c40704aceb7
|
||||
|
||||
Patch was sent upstream:
|
||||
http://ffmpeg.org/pipermail/ffmpeg-devel/2019-March/240863.html
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
libavcodec/vaapi_h264.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
|
||||
index dd2a6571604..e521a05c4ff 100644
|
||||
--- a/libavcodec/vaapi_h264.c
|
||||
+++ b/libavcodec/vaapi_h264.c
|
||||
@@ -314,6 +314,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
|
||||
H264SliceContext *sl = &h->slice_ctx[0];
|
||||
int ret;
|
||||
|
||||
+ if (pic->nb_slices == 0) {
|
||||
+ ret = AVERROR_INVALIDDATA;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
ret = ff_vaapi_decode_issue(avctx, pic);
|
||||
if (ret < 0)
|
||||
goto finish;
|
||||
75
package/ffmpeg/0003-libavutil-Fix-mips-build.patch
Normal file
75
package/ffmpeg/0003-libavutil-Fix-mips-build.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
From e9d97f9d29ce57d7a5a62607c2a08e091a06de6e Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sun, 6 Jun 2021 08:54:53 +0200
|
||||
Subject: [PATCH] libavutil: Fix mips build
|
||||
|
||||
Check for sys/auxv.h because not all toolchains contain this header.
|
||||
|
||||
Fixes https://trac.ffmpeg.org/ticket/9138
|
||||
|
||||
Patch sent upstream:
|
||||
http://ffmpeg.org/pipermail/ffmpeg-devel/2021-June/281272.html
|
||||
|
||||
[Bernd: rebased for version 6.1.2]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
[Dario: make the patch to be applied with fuzz factor 0]
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
---
|
||||
configure | 2 ++
|
||||
libavutil/mips/cpu.c | 6 +++---
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index a89cfa6d959d..6ec00df75312 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2227,6 +2227,7 @@ HEADERS_LIST="
|
||||
OpenGL_gl3_h
|
||||
poll_h
|
||||
pthread_np_h
|
||||
+ sys_auxv_h
|
||||
sys_param_h
|
||||
sys_resource_h
|
||||
sys_select_h
|
||||
@@ -6472,6 +6473,7 @@ check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepa
|
||||
check_func_headers VideoToolbox/VideoToolbox.h VTPixelRotationSessionCreate -framework VideoToolbox
|
||||
check_headers windows.h
|
||||
check_headers asm/types.h
|
||||
+check_headers sys/auxv.h
|
||||
|
||||
# it seems there are versions of clang in some distros that try to use the
|
||||
# gcc headers, which explodes for stdatomic
|
||||
diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c
|
||||
index 59619d54dee3..19196de50b59 100644
|
||||
--- a/libavutil/mips/cpu.c
|
||||
+++ b/libavutil/mips/cpu.c
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/cpu_internal.h"
|
||||
#include "config.h"
|
||||
-#if defined __linux__ || defined __ANDROID__
|
||||
+#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "libavutil/avstring.h"
|
||||
#endif
|
||||
|
||||
-#if defined __linux__ || defined __ANDROID__
|
||||
+#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H
|
||||
|
||||
#define HWCAP_LOONGSON_CPUCFG (1 << 14)
|
||||
|
||||
@@ -105,7 +105,7 @@ static int cpu_flags_cpuinfo(void)
|
||||
|
||||
int ff_get_cpu_flags_mips(void)
|
||||
{
|
||||
-#if defined __linux__ || defined __ANDROID__
|
||||
+#if (defined __linux__ || defined __ANDROID__) && HAVE_SYS_AUXV_H
|
||||
if (cpucfg_available())
|
||||
return cpu_flags_cpucfg();
|
||||
else
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 0c288853630b7b4e004774c39945d4a804afcfa8 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 6 Aug 2021 09:17:20 +0200
|
||||
Subject: [PATCH] configure: add extralibs to extralibs_xxx
|
||||
|
||||
Add extralibs to extralibs_xxx (e.g. extralibs_avformat) to allow
|
||||
applications such as motion to retrieve ffmpeg dependencies such as
|
||||
-latomic through pkg-config
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: not upstreamable]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
[rebased for 6.0]
|
||||
---
|
||||
configure | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 0bb3a7cf2b..3bda99e415 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7986,14 +7986,14 @@
|
||||
source_path=${source_path}
|
||||
LIBPREF=${LIBPREF}
|
||||
LIBSUF=${LIBSUF}
|
||||
-extralibs_avutil="$avutil_extralibs"
|
||||
-extralibs_avcodec="$avcodec_extralibs"
|
||||
-extralibs_avformat="$avformat_extralibs"
|
||||
-extralibs_avdevice="$avdevice_extralibs"
|
||||
-extralibs_avfilter="$avfilter_extralibs"
|
||||
-extralibs_postproc="$postproc_extralibs"
|
||||
-extralibs_swscale="$swscale_extralibs"
|
||||
-extralibs_swresample="$swresample_extralibs"
|
||||
+extralibs_avutil="$avutil_extralibs $extralibs"
|
||||
+extralibs_avcodec="$avcodec_extralibs $extralibs"
|
||||
+extralibs_avformat="$avformat_extralibs $extralibs"
|
||||
+extralibs_avdevice="$avdevice_extralibs $extralibs"
|
||||
+extralibs_avfilter="$avfilter_extralibs $extralibs"
|
||||
+extralibs_postproc="$postproc_extralibs $extralibs"
|
||||
+extralibs_swscale="$swscale_extralibs $extralibs"
|
||||
+extralibs_swresample="$swresample_extralibs $extralibs"
|
||||
EOF
|
||||
|
||||
for lib in $LIBRARY_LIST; do
|
||||
--
|
||||
2.30.2
|
||||
|
||||
32
package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch
Normal file
32
package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From e8a49b1424d405441fb23c2850274a84e95bd892 Mon Sep 17 00:00:00 2001
|
||||
From: Zhao Zhili <zhilizhao@tencent.com>
|
||||
Date: Tue, 21 Nov 2023 04:05:08 +0800
|
||||
Subject: [PATCH] avcodec/mmaldec: Fix build error
|
||||
|
||||
Fix #10670.
|
||||
|
||||
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
|
||||
|
||||
Upstream: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=e8a49b1424d405441fb23c2850274a84e95bd892
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
libavcodec/mmaldec.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
|
||||
index 4bb3eb22ef..2dc7bbee04 100644
|
||||
--- a/libavcodec/mmaldec.c
|
||||
+++ b/libavcodec/mmaldec.c
|
||||
@@ -843,7 +843,7 @@ static const AVClass ffmmal_dec_class = {
|
||||
.flush = ffmmal_flush, \
|
||||
.p.priv_class = &ffmmal_dec_class, \
|
||||
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
|
||||
- .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE \
|
||||
+ .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
|
||||
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
|
||||
AV_PIX_FMT_YUV420P, \
|
||||
AV_PIX_FMT_NONE}, \
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
|
||||
Date: Thu, 28 Mar 2024 05:35:36 +0100
|
||||
Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE
|
||||
|
||||
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/347a70f101be28f8d78e8fd62ffc3a78324f49e9
|
||||
---
|
||||
libavcodec/pcm-bluray.c | 5 +++--
|
||||
libavcodec/pcm-dvd.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
|
||||
index f65609514a..235020d78f 100644
|
||||
--- a/libavcodec/pcm-bluray.c
|
||||
+++ b/libavcodec/pcm-bluray.c
|
||||
@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
samples *= num_source_channels;
|
||||
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
|
||||
#if HAVE_BIGENDIAN
|
||||
- bytestream2_get_buffer(&gb, dst16, buf_size);
|
||||
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
|
||||
#else
|
||||
do {
|
||||
*dst16++ = bytestream2_get_be16u(&gb);
|
||||
@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
|
||||
do {
|
||||
#if HAVE_BIGENDIAN
|
||||
- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
|
||||
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16,
|
||||
+ avctx->ch_layout.nb_channels * 2);
|
||||
dst16 += avctx->ch_layout.nb_channels;
|
||||
#else
|
||||
channel = avctx->ch_layout.nb_channels;
|
||||
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
|
||||
index 419b2a138f..319746c62e 100644
|
||||
--- a/libavcodec/pcm-dvd.c
|
||||
+++ b/libavcodec/pcm-dvd.c
|
||||
@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
|
||||
switch (avctx->bits_per_coded_sample) {
|
||||
case 16: {
|
||||
#if HAVE_BIGENDIAN
|
||||
- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
|
||||
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
|
||||
dst16 += blocks * s->block_size / 2;
|
||||
#else
|
||||
int samples = blocks * avctx->ch_layout.nb_channels;
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb Mon Sep 17 00:00:00 2001
|
||||
From: James Almer <jamrial@gmail.com>
|
||||
Date: Wed, 31 Jul 2024 10:00:54 -0300
|
||||
Subject: [PATCH] avutil/hwcontext_vaapi: use the correct type for
|
||||
VASurfaceAttribExternalBuffers.buffers
|
||||
|
||||
Should fix ticket #11115.
|
||||
|
||||
Signed-off-by: James Almer <jamrial@gmail.com>
|
||||
Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
||||
---
|
||||
libavutil/hwcontext_vaapi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
|
||||
index 4cb25dd03212e..15fd84aa40679 100644
|
||||
--- a/libavutil/hwcontext_vaapi.c
|
||||
+++ b/libavutil/hwcontext_vaapi.c
|
||||
@@ -1225,7 +1225,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
|
||||
|
||||
if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
|
||||
int k;
|
||||
- unsigned long buffer_handle;
|
||||
+ uintptr_t buffer_handle;
|
||||
VASurfaceAttribExternalBuffers buffer_desc;
|
||||
VASurfaceAttrib buffer_attrs[2] = {
|
||||
{
|
||||
185
package/ffmpeg/Config.in
Normal file
185
package/ffmpeg/Config.in
Normal file
@@ -0,0 +1,185 @@
|
||||
config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
|
||||
bool
|
||||
default y
|
||||
# No support for ARMv7-M in the ARM assembly logic
|
||||
depends on !BR2_ARM_CPU_ARMV7M
|
||||
# m68k coldfire causes a build failure, because the check for
|
||||
# atomics (atomic_store) succeeds, which causes ffmpeg to
|
||||
# think atomic intrinsics are available, while they are
|
||||
# not. See https://patchwork.ozlabs.org/patch/756664/ and
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 for more
|
||||
# details.
|
||||
depends on !BR2_m68k_cf
|
||||
# assertion fail in binutils
|
||||
depends on !(BR2_or1k && !BR2_TOOLCHAIN_GCC_AT_LEAST_9)
|
||||
|
||||
menuconfig BR2_PACKAGE_FFMPEG
|
||||
bool "ffmpeg"
|
||||
depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
FFmpeg is a complete, cross-platform solution to record,
|
||||
convert and stream audio and video.
|
||||
|
||||
https://www.ffmpeg.org
|
||||
|
||||
if BR2_PACKAGE_FFMPEG
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_GPL
|
||||
bool "Enable GPL code"
|
||||
help
|
||||
allow use of GPL code, the resulting libs and binaries will
|
||||
be under GPL
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_NONFREE
|
||||
bool "Enable nonfree code"
|
||||
help
|
||||
allow use of nonfree code, the resulting libs and binaries
|
||||
will be unredistributable
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_FFMPEG
|
||||
bool "Build ffmpeg (the command line application)"
|
||||
default y
|
||||
help
|
||||
FFmpeg is a very fast video and audio converter.
|
||||
It can also grab from a live audio/video source.
|
||||
|
||||
It is not needed if you want to link the FFmpeg libraries
|
||||
to your application.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_FFPLAY
|
||||
bool "Build ffplay"
|
||||
depends on !BR2_STATIC_LIBS # sdl2
|
||||
select BR2_PACKAGE_FFMPEG_SWSCALE
|
||||
select BR2_PACKAGE_SDL2
|
||||
help
|
||||
FFplay is a very simple and portable media player using the
|
||||
FFmpeg libraries and the SDL library.
|
||||
It is mostly used as a testbed for the various FFmpeg APIs.
|
||||
|
||||
comment "ffplay needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_FFPROBE
|
||||
bool "Build ffprobe"
|
||||
help
|
||||
FFprobe is a utility to determine the audio and video
|
||||
characteristics of a container file.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_XCBGRAB
|
||||
bool "Build X11 screen grabbing"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_LIBXCB
|
||||
help
|
||||
X11 screen grabbing using libxcb.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_POSTPROC
|
||||
bool "Build libpostproc"
|
||||
depends on BR2_PACKAGE_FFMPEG_GPL
|
||||
help
|
||||
Postproc is a library of video postprocessing routines.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_SWSCALE
|
||||
bool "Build libswscale"
|
||||
help
|
||||
Swscale is a library of video scaling routines.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_ENCODERS
|
||||
string "Enabled encoders"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of encoders to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-encoders in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_DECODERS
|
||||
string "Enabled decoders"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of decoders to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-decoders in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_MUXERS
|
||||
string "Enabled muxers"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of muxers to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-muxers in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_DEMUXERS
|
||||
string "Enabled demuxers"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of demuxers to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-demuxers in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_PARSERS
|
||||
string "Enabled parsers"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of parsers to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-parsers in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_BSFS
|
||||
string "Enabled bitstreams"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of bitstream filters to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-bsfs in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_PROTOCOLS
|
||||
string "Enabled protocols"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of protocols to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-protocols in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_FILTERS
|
||||
string "Enabled filters"
|
||||
default "all"
|
||||
help
|
||||
Space-separated list of filters to build in FFmpeg,
|
||||
or "all" to build all of them.
|
||||
|
||||
Run ./configure --list-filters in the ffmpeg sources
|
||||
directory to know the available options.
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_INDEVS
|
||||
bool "Enable input devices"
|
||||
default y
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_OUTDEVS
|
||||
bool "Enable output devices"
|
||||
default y
|
||||
|
||||
config BR2_PACKAGE_FFMPEG_EXTRACONF
|
||||
string "Additional parameters for ./configure"
|
||||
default ""
|
||||
help
|
||||
Extra parameters that will be appended to FFmpeg's
|
||||
./configure commandline.
|
||||
|
||||
endif
|
||||
|
||||
comment "ffmpeg needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
5
package/ffmpeg/ffmpeg.hash
Normal file
5
package/ffmpeg/ffmpeg.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Locally calculated
|
||||
sha256 05fbe9db1f5452a3605bb1d9bf91da9d4bb08162891692e4f172b58c49109412 ffmpeg-6.1.5.tar.xz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPLv2
|
||||
sha256 246041b6ecf9bc32d718a62c57877c78b5eb397b6467e74ed7ae2626ab189c30 COPYING.LGPLv2.1
|
||||
sha256 cb48bf09a11f5fb576cddb0431c8f5ed0a60157a9ec942adffc13907cbe083f2 LICENSE.md
|
||||
631
package/ffmpeg/ffmpeg.mk
Normal file
631
package/ffmpeg/ffmpeg.mk
Normal file
@@ -0,0 +1,631 @@
|
||||
################################################################################
|
||||
#
|
||||
# ffmpeg
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FFMPEG_VERSION = 6.1.5
|
||||
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
|
||||
FFMPEG_SITE = https://ffmpeg.org/releases
|
||||
FFMPEG_INSTALL_STAGING = YES
|
||||
|
||||
FFMPEG_LICENSE = LGPL-2.1+, libjpeg license
|
||||
FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
|
||||
FFMPEG_LICENSE += and GPL-2.0+
|
||||
FFMPEG_LICENSE_FILES += COPYING.GPLv2
|
||||
endif
|
||||
|
||||
FFMPEG_CPE_ID_VENDOR = ffmpeg
|
||||
|
||||
FFMPEG_CONF_OPTS = \
|
||||
--prefix=/usr \
|
||||
--enable-avfilter \
|
||||
--disable-version3 \
|
||||
--enable-logging \
|
||||
--enable-optimizations \
|
||||
--disable-extra-warnings \
|
||||
--enable-avdevice \
|
||||
--enable-avcodec \
|
||||
--enable-avformat \
|
||||
--enable-network \
|
||||
--disable-gray \
|
||||
--enable-swscale-alpha \
|
||||
--disable-small \
|
||||
--disable-crystalhd \
|
||||
--disable-dxva2 \
|
||||
--enable-runtime-cpudetect \
|
||||
--disable-hardcoded-tables \
|
||||
--disable-mipsdsp \
|
||||
--disable-mipsdspr2 \
|
||||
--disable-msa \
|
||||
--enable-hwaccels \
|
||||
--disable-cuda \
|
||||
--disable-cuvid \
|
||||
--disable-nvenc \
|
||||
--disable-avisynth \
|
||||
--disable-frei0r \
|
||||
--disable-libopencore-amrnb \
|
||||
--disable-libopencore-amrwb \
|
||||
--disable-libdc1394 \
|
||||
--disable-libgsm \
|
||||
--disable-libilbc \
|
||||
--disable-libvo-amrwbenc \
|
||||
--disable-symver \
|
||||
--disable-doc \
|
||||
--disable-mmal \
|
||||
--disable-omx \
|
||||
--disable-omx-rpi
|
||||
|
||||
FFMPEG_DEPENDENCIES += host-pkgconf
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
|
||||
FFMPEG_CONF_OPTS += --enable-gpl
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-gpl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y)
|
||||
FFMPEG_CONF_OPTS += --enable-nonfree
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-nonfree
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y)
|
||||
FFMPEG_CONF_OPTS += --enable-ffmpeg
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-ffmpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y)
|
||||
FFMPEG_DEPENDENCIES += sdl2
|
||||
FFMPEG_CONF_OPTS += --enable-ffplay
|
||||
FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl2-config
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-ffplay
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JACK1),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libjack
|
||||
FFMPEG_DEPENDENCIES += jack1
|
||||
else ifeq ($(BR2_PACKAGE_JACK2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libjack
|
||||
FFMPEG_DEPENDENCIES += jack2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libjack
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
|
||||
FFMPEG_DEPENDENCIES += pulseaudio
|
||||
FFMPEG_CONF_OPTS += --enable-libpulse
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libpulse
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBV4L),y)
|
||||
FFMPEG_DEPENDENCIES += libv4l
|
||||
FFMPEG_CONF_OPTS += --enable-libv4l2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libv4l2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_FFPROBE),y)
|
||||
FFMPEG_CONF_OPTS += --enable-ffprobe
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-ffprobe
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_XCBGRAB),y)
|
||||
FFMPEG_CONF_OPTS += \
|
||||
--enable-libxcb \
|
||||
--enable-libxcb-shape \
|
||||
--enable-libxcb-shm \
|
||||
--enable-libxcb-xfixes
|
||||
FFMPEG_DEPENDENCIES += libxcb
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libxcb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
|
||||
FFMPEG_CONF_OPTS += --enable-postproc
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-postproc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
|
||||
FFMPEG_CONF_OPTS += --enable-swscale
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-swscale
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-encoders \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-decoders \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-muxers \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-demuxers \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-parsers \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-bsfs \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-protocols \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all)
|
||||
FFMPEG_CONF_OPTS += --disable-filters \
|
||||
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-indevs
|
||||
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
||||
FFMPEG_CONF_OPTS += --enable-alsa
|
||||
FFMPEG_DEPENDENCIES += alsa-lib
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-alsa
|
||||
endif
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-indevs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-outdevs
|
||||
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
||||
FFMPEG_DEPENDENCIES += alsa-lib
|
||||
endif
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-outdevs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-pthreads
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-pthreads
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
FFMPEG_CONF_OPTS += --enable-zlib
|
||||
FFMPEG_DEPENDENCIES += zlib
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-bzlib
|
||||
FFMPEG_DEPENDENCIES += bzip2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-bzlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FDK_AAC)$(BR2_PACKAGE_FFMPEG_NONFREE),yy)
|
||||
FFMPEG_CONF_OPTS += --enable-libfdk-aac
|
||||
FFMPEG_DEPENDENCIES += fdk-aac
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libfdk-aac
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBCDIO_PARANOIA),yy)
|
||||
FFMPEG_CONF_OPTS += --enable-libcdio
|
||||
FFMPEG_DEPENDENCIES += libcdio-paranoia
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libcdio
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
|
||||
FFMPEG_DEPENDENCIES += gnutls
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-gnutls
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
# openssl isn't license compatible with GPL
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
|
||||
FFMPEG_CONF_OPTS += --disable-openssl
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --enable-openssl
|
||||
FFMPEG_DEPENDENCIES += openssl
|
||||
endif
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-openssl
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libdrm
|
||||
FFMPEG_DEPENDENCIES += libdrm
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libdrm
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBOPENH264),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libopenh264
|
||||
FFMPEG_DEPENDENCIES += libopenh264
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libopenh264
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
|
||||
FFMPEG_DEPENDENCIES += libvorbis
|
||||
FFMPEG_CONF_OPTS += \
|
||||
--enable-libvorbis \
|
||||
--enable-muxer=ogg \
|
||||
--enable-encoder=libvorbis
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVA),y)
|
||||
FFMPEG_CONF_OPTS += --enable-vaapi
|
||||
FFMPEG_DEPENDENCIES += libva
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-vaapi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
|
||||
FFMPEG_CONF_OPTS += --enable-vdpau
|
||||
FFMPEG_DEPENDENCIES += libvdpau
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-vdpau
|
||||
endif
|
||||
|
||||
# To avoid a circular dependency only use opencv if opencv itself does
|
||||
# not depend on ffmpeg.
|
||||
ifeq ($(BR2_PACKAGE_OPENCV4_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV4_WITH_FFMPEG),yx)
|
||||
FFMPEG_CONF_OPTS += --enable-libopencv \
|
||||
--extra-cflags=-I$(STAGING_DIR)/usr/include/opencv4
|
||||
FFMPEG_DEPENDENCIES += opencv4
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libopencv
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPUS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libopus
|
||||
FFMPEG_DEPENDENCIES += opus
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libopus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVPX),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libvpx
|
||||
FFMPEG_DEPENDENCIES += libvpx
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libvpx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBASS),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libass
|
||||
FFMPEG_DEPENDENCIES += libass
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libass
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libbluray
|
||||
FFMPEG_DEPENDENCIES += libbluray
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libbluray
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVPL),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libvpl --disable-libmfx
|
||||
FFMPEG_DEPENDENCIES += libvpl
|
||||
else ifeq ($(BR2_PACKAGE_INTEL_MEDIASDK),y)
|
||||
FFMPEG_CONF_OPTS += --disable-libvpl --enable-libmfx
|
||||
FFMPEG_DEPENDENCIES += intel-mediasdk
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libvpl --disable-libmfx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RTMPDUMP),y)
|
||||
FFMPEG_CONF_OPTS += --enable-librtmp
|
||||
FFMPEG_DEPENDENCIES += rtmpdump
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-librtmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LAME),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libmp3lame
|
||||
FFMPEG_DEPENDENCIES += lame
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libmp3lame
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libmodplug
|
||||
FFMPEG_DEPENDENCIES += libmodplug
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libmodplug
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBOPENMPT),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libopenmpt
|
||||
FFMPEG_DEPENDENCIES += libopenmpt
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libopenmpt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSOXR),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libsoxr
|
||||
FFMPEG_DEPENDENCIES += libsoxr
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libsoxr
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SPEEX),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libspeex
|
||||
FFMPEG_DEPENDENCIES += speex
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libspeex
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libtheora
|
||||
FFMPEG_DEPENDENCIES += libtheora
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libtheora
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
||||
FFMPEG_CONF_OPTS += --enable-iconv
|
||||
FFMPEG_DEPENDENCIES += libiconv
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-iconv
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXML2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libxml2
|
||||
FFMPEG_DEPENDENCIES += libxml2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libxml2
|
||||
endif
|
||||
|
||||
# ffmpeg freetype support require fenv.h which is only
|
||||
# available/working on glibc.
|
||||
# The microblaze variant doesn't provide the needed exceptions
|
||||
ifeq ($(BR2_PACKAGE_FREETYPE)$(BR2_TOOLCHAIN_USES_GLIBC)x$(BR2_microblaze),yyx)
|
||||
FFMPEG_CONF_OPTS += --enable-libfreetype
|
||||
FFMPEG_DEPENDENCIES += freetype
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libfreetype
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
||||
FFMPEG_CONF_OPTS += --enable-fontconfig
|
||||
FFMPEG_DEPENDENCIES += fontconfig
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-fontconfig
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HARFBUZZ),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libharfbuzz
|
||||
FFMPEG_DEPENDENCIES += harfbuzz
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libharfbuzz
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libfribidi
|
||||
FFMPEG_DEPENDENCIES += libfribidi
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libfribidi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libopenjpeg
|
||||
FFMPEG_DEPENDENCIES += openjpeg
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libopenjpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy)
|
||||
FFMPEG_CONF_OPTS += --enable-libx264
|
||||
FFMPEG_DEPENDENCIES += x264
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libx264
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_X265)$(BR2_PACKAGE_FFMPEG_GPL),yy)
|
||||
FFMPEG_CONF_OPTS += --enable-libx265
|
||||
FFMPEG_DEPENDENCIES += x265
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libx265
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DAV1D),y)
|
||||
FFMPEG_CONF_OPTS += --enable-libdav1d
|
||||
FFMPEG_DEPENDENCIES += dav1d
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-libdav1d
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_MMX),y)
|
||||
FFMPEG_CONF_OPTS += --enable-x86asm
|
||||
FFMPEG_DEPENDENCIES += host-nasm
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-x86asm
|
||||
FFMPEG_CONF_OPTS += --disable-mmx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSE),y)
|
||||
FFMPEG_CONF_OPTS += --enable-sse
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-sse
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-sse2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-sse2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
|
||||
FFMPEG_CONF_OPTS += --enable-sse3
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-sse3
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSSE3),y)
|
||||
FFMPEG_CONF_OPTS += --enable-ssse3
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-ssse3
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSE4),y)
|
||||
FFMPEG_CONF_OPTS += --enable-sse4
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-sse4
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
|
||||
FFMPEG_CONF_OPTS += --enable-sse42
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-sse42
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_AVX),y)
|
||||
FFMPEG_CONF_OPTS += --enable-avx
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-avx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_X86_CPU_HAS_AVX2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-avx2
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-avx2
|
||||
endif
|
||||
|
||||
# Explicitly disable everything that doesn't match for ARM
|
||||
# FFMPEG "autodetects" by compiling an extended instruction via AS
|
||||
# This works on compilers that aren't built for generic by default
|
||||
ifeq ($(BR2_ARM_CPU_ARMV4),y)
|
||||
FFMPEG_CONF_OPTS += --disable-armv5te
|
||||
endif
|
||||
ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y)
|
||||
FFMPEG_CONF_OPTS += --enable-armv6
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-armv6 --disable-armv6t2
|
||||
endif
|
||||
ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y)
|
||||
FFMPEG_CONF_OPTS += --enable-vfp
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-vfp
|
||||
endif
|
||||
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
|
||||
FFMPEG_CONF_OPTS += --enable-neon
|
||||
else ifeq ($(BR2_aarch64),y)
|
||||
FFMPEG_CONF_OPTS += --enable-neon
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-neon
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
|
||||
ifeq ($(BR2_MIPS_SOFT_FLOAT),y)
|
||||
FFMPEG_CONF_OPTS += --disable-mipsfpu
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --enable-mipsfpu
|
||||
endif
|
||||
|
||||
# Fix build failure on several missing assembly instructions
|
||||
FFMPEG_CONF_OPTS += --disable-asm
|
||||
endif # MIPS
|
||||
|
||||
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC):$(BR2_powerpc64le),y:)
|
||||
FFMPEG_CONF_OPTS += --enable-altivec
|
||||
else ifeq ($(BR2_POWERPC_CPU_HAS_VSX):$(BR2_powerpc64le),y:y)
|
||||
# On LE, ffmpeg AltiVec support needs VSX intrinsics, and VSX
|
||||
# is an extension to AltiVec.
|
||||
FFMPEG_CONF_OPTS += --enable-altivec
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-altivec
|
||||
endif
|
||||
|
||||
# Fix build failure on several missing assembly instructions
|
||||
ifeq ($(BR2_RISCV_32),y)
|
||||
FFMPEG_CONF_OPTS += --disable-rvv --disable-asm
|
||||
endif
|
||||
|
||||
# Uses __atomic_fetch_add_4
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
FFMPEG_CONF_OPTS += --extra-libs=-latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
FFMPEG_CONF_OPTS += --enable-pic
|
||||
else
|
||||
FFMPEG_CONF_OPTS += --disable-pic
|
||||
endif
|
||||
|
||||
# Default to --cpu=generic for MIPS architecture, in order to avoid a
|
||||
# warning from ffmpeg's configure script.
|
||||
ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
|
||||
FFMPEG_CONF_OPTS += --cpu=generic
|
||||
else ifneq ($(GCC_TARGET_CPU),)
|
||||
FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_CPU)"
|
||||
else ifneq ($(GCC_TARGET_ARCH),)
|
||||
FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_ARCH)"
|
||||
endif
|
||||
|
||||
FFMPEG_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
||||
FFMPEG_CONF_OPTS += --disable-optimizations
|
||||
FFMPEG_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
|
||||
FFMPEG_CONF_OPTS += --disable-optimizations
|
||||
FFMPEG_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
||||
FFMPEG_CFLAGS += -marm
|
||||
endif
|
||||
|
||||
FFMPEG_CONF_ENV += CFLAGS="$(FFMPEG_CFLAGS)"
|
||||
FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF))
|
||||
|
||||
# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
|
||||
define FFMPEG_CONFIGURE_CMDS
|
||||
(cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(TARGET_CONFIGURE_ARGS) \
|
||||
$(FFMPEG_CONF_ENV) \
|
||||
./configure \
|
||||
--enable-cross-compile \
|
||||
--cross-prefix=$(TARGET_CROSS) \
|
||||
--sysroot=$(STAGING_DIR) \
|
||||
--host-cc="$(HOSTCC)" \
|
||||
--arch=$(BR2_ARCH) \
|
||||
--target-os="linux" \
|
||||
--disable-stripping \
|
||||
--pkg-config="$(PKG_CONFIG_HOST_BINARY)" \
|
||||
$(SHARED_STATIC_LIBS_OPTS) \
|
||||
$(FFMPEG_CONF_OPTS) \
|
||||
)
|
||||
endef
|
||||
|
||||
define FFMPEG_REMOVE_EXAMPLE_SRC_FILES
|
||||
rm -rf $(TARGET_DIR)/usr/share/ffmpeg/examples
|
||||
endef
|
||||
FFMPEG_POST_INSTALL_TARGET_HOOKS += FFMPEG_REMOVE_EXAMPLE_SRC_FILES
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user