Sync from SUSE:SLFO:Main ffmpeg-4 revision ddc0df023be273bddb83a5e446666af7
This commit is contained in:
commit
1f72b3ee9f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
@ -0,0 +1,47 @@
|
||||
From c3c8f97a9804b4234e97f13b0057ffc2c9af27c0 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Degawa <christopher.degawa@intel.com>
|
||||
Date: Thu, 20 Oct 2022 22:55:27 -0500
|
||||
Subject: [PATCH] avcodec/libsvtav1: remove compressed_ten_bit_format and
|
||||
simplify alloc_buffer
|
||||
|
||||
compressed_ten_bit_format has been deprecated upstream and has no effect
|
||||
and can be removed. Plus, technically it was never used in the first place
|
||||
since it would require the app (ffmpeg) to set it and do additional
|
||||
processing of the input frames.
|
||||
|
||||
Also simplify alloc_buffer by removing calculations relating to the
|
||||
non-existant processing.
|
||||
|
||||
Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
|
||||
(cherry picked from commit 031f1561cd286596cdb374da32f8aa816ce3b135)
|
||||
---
|
||||
libavcodec/libsvtav1.c | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
|
||||
index cfd93a2484..38777b0fb7 100644
|
||||
--- a/libavcodec/libsvtav1.c
|
||||
+++ b/libavcodec/libsvtav1.c
|
||||
@@ -120,16 +120,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err,
|
||||
|
||||
static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
|
||||
{
|
||||
- const int pack_mode_10bit =
|
||||
- (config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format == 0) ? 1 : 0;
|
||||
- const size_t luma_size_8bit =
|
||||
- config->source_width * config->source_height * (1 << pack_mode_10bit);
|
||||
- const size_t luma_size_10bit =
|
||||
- (config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? luma_size_8bit : 0;
|
||||
+ const size_t luma_size = config->source_width * config->source_height *
|
||||
+ (config->encoder_bit_depth > 8 ? 2 : 1);
|
||||
|
||||
EbSvtIOFormat *in_data;
|
||||
|
||||
- svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
|
||||
+ svt_enc->raw_size = luma_size * 3 / 2;
|
||||
|
||||
// allocate buffer for in and out
|
||||
svt_enc->in_buf = av_mallocz(sizeof(*svt_enc->in_buf));
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,76 @@
|
||||
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Sun, 16 Jul 2023 18:18:02 +0300
|
||||
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
|
||||
instructions within inline assembly
|
||||
|
||||
Fixes assembling with binutil as >= 2.41
|
||||
|
||||
Signed-off-by: James Almer <jamrial@gmail.com>
|
||||
---
|
||||
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
|
||||
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
|
||||
index 6298f5ed19..ca7e2dffc1 100644
|
||||
--- a/libavcodec/x86/mathops.h
|
||||
+++ b/libavcodec/x86/mathops.h
|
||||
@@ -35,12 +35,20 @@
|
||||
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
|
||||
{
|
||||
int rt, dummy;
|
||||
+ if (__builtin_constant_p(shift))
|
||||
__asm__ (
|
||||
"imull %3 \n\t"
|
||||
"shrdl %4, %%edx, %%eax \n\t"
|
||||
:"=a"(rt), "=d"(dummy)
|
||||
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
|
||||
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ (
|
||||
+ "imull %3 \n\t"
|
||||
+ "shrdl %4, %%edx, %%eax \n\t"
|
||||
+ :"=a"(rt), "=d"(dummy)
|
||||
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
|
||||
+ );
|
||||
return rt;
|
||||
}
|
||||
|
||||
@@ -113,19 +121,31 @@ __asm__ volatile(\
|
||||
// avoid +32 for shift optimization (gcc should do that ...)
|
||||
#define NEG_SSR32 NEG_SSR32
|
||||
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
||||
+ if (__builtin_constant_p(s))
|
||||
__asm__ ("sarl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
- : "ic" ((uint8_t)(-s))
|
||||
+ : "i" (-s & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ ("sarl %1, %0\n\t"
|
||||
+ : "+r" (a)
|
||||
+ : "c" ((uint8_t)(-s))
|
||||
+ );
|
||||
return a;
|
||||
}
|
||||
|
||||
#define NEG_USR32 NEG_USR32
|
||||
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
|
||||
+ if (__builtin_constant_p(s))
|
||||
__asm__ ("shrl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
- : "ic" ((uint8_t)(-s))
|
||||
+ : "i" (-s & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ ("shrl %1, %0\n\t"
|
||||
+ : "+r" (a)
|
||||
+ : "c" ((uint8_t)(-s))
|
||||
+ );
|
||||
return a;
|
||||
}
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
11
baselibs.conf
Normal file
11
baselibs.conf
Normal file
@ -0,0 +1,11 @@
|
||||
libavcodec58_134
|
||||
libavdevice58_13
|
||||
libavfilter7_110
|
||||
libavformat58_76
|
||||
libavresample4_0
|
||||
obsoletes "libavresample4-<targettype> < <version>"
|
||||
provides "libavresample4-<targettype> = <version>"
|
||||
libavutil56_70
|
||||
libpostproc55_9
|
||||
libswresample3_9
|
||||
libswscale5_9
|
107
enable_decoders
Normal file
107
enable_decoders
Normal file
@ -0,0 +1,107 @@
|
||||
## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review)
|
||||
aac
|
||||
ac3
|
||||
ansi # trivial
|
||||
apng
|
||||
ass # trivial
|
||||
ayuv # trivial
|
||||
bmp # trivial
|
||||
dirac # dirac
|
||||
exr # openEXR
|
||||
ffv1 # ffmpeg
|
||||
ffvhuff # ffmpeg
|
||||
ffwavesynth # pseudo
|
||||
flac # libFLAC
|
||||
gif # libpng
|
||||
gsm # libgsm
|
||||
huffyuv # trivial+zlib
|
||||
ilbc # ilbc
|
||||
libaom # libaom
|
||||
libaom_av1 # libaom
|
||||
libcelt # celt, opus
|
||||
libcodec2 # codec2
|
||||
libdav1d # av1
|
||||
libgsm # libgsm
|
||||
libopenjpeg # openjpeg
|
||||
libopus # opus
|
||||
libschroedinger # schroedinger
|
||||
libspeex # speex
|
||||
libvorbis # libvorbis
|
||||
libvpx_vp8 # libvpx
|
||||
libvpx_vp9 # libvpx
|
||||
mjpeg # mjpegtools
|
||||
mp1 # twolame/lame
|
||||
mp1float # twolame/lame
|
||||
mp2 # twolame
|
||||
mp2float # twolame
|
||||
mp3 # lame
|
||||
mp3float # lame
|
||||
mpeg1video
|
||||
mpeg2video
|
||||
#mpeg4
|
||||
opus # libopus
|
||||
pam # trivial
|
||||
pbm # trivial
|
||||
pcm_alaw # trivial
|
||||
pcm_bluray
|
||||
pcm_dvd
|
||||
pcm_f32be # trivial
|
||||
pcm_f32le # trivial
|
||||
pcm_f64be # trivial
|
||||
pcm_f64le # trivial
|
||||
pcm_mulaw # trivial
|
||||
pcm_s16be # trivial
|
||||
pcm_s16be_planar # trivial
|
||||
pcm_s16le # trivial
|
||||
pcm_s16le_planar # trivial
|
||||
pcm_s24be # trivial
|
||||
pcm_s24le # trivial
|
||||
pcm_s24le_planar # trivial
|
||||
pcm_s32be # trivial
|
||||
pcm_s32le # trivial
|
||||
pcm_s32le_planar # trivial
|
||||
pcm_s8 # trivial
|
||||
pcm_s8_planar # trivial
|
||||
pcm_u16be # trivial
|
||||
pcm_u16le # trivial
|
||||
pcm_u24be # trivial
|
||||
pcm_u24le # trivial
|
||||
pcm_u32be # trivial
|
||||
pcm_u32le # trivial
|
||||
pcm_u8 # trivial
|
||||
pcx
|
||||
pgm # trivial
|
||||
pgmyuv # trivial
|
||||
pgssub # mkvtoolnix
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
rawvideo # trivial
|
||||
sgi # trivial
|
||||
srt # trivial
|
||||
ssa # trivial
|
||||
sunrast # trivial
|
||||
targa # trivial
|
||||
text # trivial
|
||||
theora # libtheora
|
||||
tiff # libtiff
|
||||
v210 # trivial
|
||||
v210x # trivial
|
||||
v308 # trivial
|
||||
v408 # trivial
|
||||
v410 # trivial
|
||||
vorbis # libvorbis
|
||||
vp3 # libav
|
||||
vp5 # libav
|
||||
vp6 # libav
|
||||
vp6a # libav
|
||||
vp6f # libav
|
||||
vp8 # libvpx
|
||||
vp9 # libvpx
|
||||
webp # libwebp
|
||||
webvtt # trivial
|
||||
wrapped_avframe # passthrough
|
||||
xbm # trivial
|
||||
xwd # xwd
|
||||
y41p # trivial
|
||||
yuv4 # trivial
|
||||
zlib # zlib
|
88
enable_encoders
Normal file
88
enable_encoders
Normal file
@ -0,0 +1,88 @@
|
||||
## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review)
|
||||
aac
|
||||
apng # libpng
|
||||
ass # trivial
|
||||
ayuv # trival
|
||||
bmp # trivial
|
||||
ffv1
|
||||
ffvhuff # trivial+zlib
|
||||
flac # libFLAC
|
||||
gif # libpng
|
||||
huffyuv # trivial+zlib
|
||||
jpegls
|
||||
libaom # libaom
|
||||
libaom_av1 # libaom
|
||||
libcodec2 # codec2
|
||||
libgsm # libgsm
|
||||
libmp3lame # lame
|
||||
libopenjpeg # openjpeg
|
||||
libopus # opus
|
||||
librav1e # rav1e
|
||||
libschroedinger # schroedinger
|
||||
libspeex # speex
|
||||
libsvtav1
|
||||
libtheora # libtheora
|
||||
libtwolame # twolame
|
||||
libvorbis # libvorbis
|
||||
libvpx_vp8
|
||||
libvpx_vp9
|
||||
libwebp
|
||||
libwebp_anim
|
||||
mjpeg # mjpegtools
|
||||
mp2 # twolame
|
||||
mp2fixed # twolame
|
||||
mpeg1video
|
||||
mpeg2video
|
||||
opus # opus
|
||||
pam
|
||||
pbm # trivial
|
||||
pcm_alaw # trivial
|
||||
pcm_f32be # trivial
|
||||
pcm_f32le # trivial
|
||||
pcm_f64be # trivial
|
||||
pcm_f64le # trivial
|
||||
pcm_mulaw # trivial
|
||||
pcm_s16be # trivial
|
||||
pcm_s16be_planar # trivial
|
||||
pcm_s16le # trivial
|
||||
pcm_s16le_planar # trivial
|
||||
pcm_s24be # trivial
|
||||
pcm_s24le # trivial
|
||||
pcm_s24le_planar # trivial
|
||||
pcm_s32be # trivial
|
||||
pcm_s32le # trivial
|
||||
pcm_s32le_planar # trivial
|
||||
pcm_s8 # trivial
|
||||
pcm_s8_planar # trivial
|
||||
pcm_u16be # trivial
|
||||
pcm_u16le # trivial
|
||||
pcm_u24be # trivial
|
||||
pcm_u24le # trivial
|
||||
pcm_u32be # trivial
|
||||
pcm_u32le # trivial
|
||||
pcm_u8 # trivial
|
||||
pcx
|
||||
pgm # trivial
|
||||
pgmyuv # trivial
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
rawvideo # trivial
|
||||
sgi # trivial
|
||||
srt # trivial
|
||||
ssa # trivial
|
||||
sunrast # trivial
|
||||
targa # trivial
|
||||
text # trivial
|
||||
tiff # libtiff
|
||||
v210 # trivial
|
||||
v308 # trivial
|
||||
v408 # trivial
|
||||
v410 # trivial
|
||||
vorbis # libvorbis
|
||||
webvtt # trivial
|
||||
wrapped_avframe # passthrough
|
||||
xbm # (X11)
|
||||
xwd # xwd
|
||||
y41p # trivial
|
||||
yuv4 # trivial
|
||||
zlib # zlib
|
7
ffmpeg-4-rpmlintrc
Normal file
7
ffmpeg-4-rpmlintrc
Normal file
@ -0,0 +1,7 @@
|
||||
# manpages for such executables aren't supplied
|
||||
addFilter("no-manual-page-for-binary")
|
||||
|
||||
# our libraries really have those names and versions
|
||||
addFilter("shlib-fixed-dependency")
|
||||
addFilter("no-dependency-on libffmpeg.*")
|
||||
addFilter("no-dependency-on ffmpeg-4-lib*")
|
181
ffmpeg-4.2-dlopen-fdk_aac.patch
Normal file
181
ffmpeg-4.2-dlopen-fdk_aac.patch
Normal file
@ -0,0 +1,181 @@
|
||||
Index: ffmpeg-4.4.3/configure
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.3.orig/configure
|
||||
+++ ffmpeg-4.4.3/configure
|
||||
@@ -232,6 +232,7 @@ External library support:
|
||||
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
|
||||
and libraw1394 [no]
|
||||
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
|
||||
+ --enable-libfdk-aac-dlopen enable AAC de/encoding via dlopen()'ed libfdk-aac [no]
|
||||
--enable-libflite enable flite (voice synthesis) support via libflite [no]
|
||||
--enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
|
||||
--enable-libfreetype enable libfreetype, needed for drawtext filter [no]
|
||||
@@ -1735,6 +1736,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||
EXTERNAL_LIBRARY_NONFREE_LIST="
|
||||
decklink
|
||||
libfdk_aac
|
||||
+ libfdk_aac_dlopen
|
||||
openssl
|
||||
libtls
|
||||
"
|
||||
@@ -6368,6 +6370,7 @@ enabled libdrm && require_pkg
|
||||
enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
|
||||
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
|
||||
warn "using libfdk without pkg-config"; } }
|
||||
+enabled libfdk_aac_dlopen && enable libfdk_aac && add_cppflags "-I/usr/include/fdk-aac"
|
||||
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
|
||||
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
|
||||
enabled fontconfig && enable libfontconfig
|
||||
Index: ffmpeg-4.4.3/libavcodec/dlopen.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ ffmpeg-4.4.3/libavcodec/dlopen.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef LOCALINC_DLOPEN_H
|
||||
+#define LOCALINC_DLOPEN_H
|
||||
+#include <dlfcn.h>
|
||||
+#define num2str(x) str(x)
|
||||
+#define str(x) #x
|
||||
+
|
||||
+#define dl_sym(func, args, lib) \
|
||||
+ dl_##func = args dlsym(lib, #func); \
|
||||
+ if ((err = dlerror())) \
|
||||
+ goto error;
|
||||
+
|
||||
+#endif
|
||||
Index: ffmpeg-4.4.3/libavcodec/libfdk-aacdec.c
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.3.orig/libavcodec/libfdk-aacdec.c
|
||||
+++ ffmpeg-4.4.3/libavcodec/libfdk-aacdec.c
|
||||
@@ -37,6 +37,54 @@
|
||||
#define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_LIBFDK_AAC_DLOPEN
|
||||
+#include "dlopen.h"
|
||||
+AAC_DECODER_ERROR (*dl_aacDecoder_AncDataInit)(HANDLE_AACDECODER, UCHAR*, int);
|
||||
+HANDLE_AACDECODER (*dl_aacDecoder_Open)(TRANSPORT_TYPE, UINT);
|
||||
+AAC_DECODER_ERROR (*dl_aacDecoder_Fill)(HANDLE_AACDECODER, UCHAR**, const UINT*, UINT*);
|
||||
+AAC_DECODER_ERROR (*dl_aacDecoder_ConfigRaw)(HANDLE_AACDECODER, UCHAR **, const UINT*);
|
||||
+AAC_DECODER_ERROR (*dl_aacDecoder_SetParam)(const HANDLE_AACDECODER, const AACDEC_PARAM, const INT);
|
||||
+AAC_DECODER_ERROR (*dl_aacDecoder_DecodeFrame)(HANDLE_AACDECODER, INT_PCM*, const INT, const UINT);
|
||||
+CStreamInfo* (*dl_aacDecoder_GetStreamInfo)(HANDLE_AACDECODER);
|
||||
+void (*dl_aacDecoder_Close)(HANDLE_AACDECODER);
|
||||
+#define aacDecoder_AncDataInit dl_aacDecoder_AncDataInit
|
||||
+#define aacDecoder_Open dl_aacDecoder_Open
|
||||
+#define aacDecoder_Fill dl_aacDecoder_Fill
|
||||
+#define aacDecoder_ConfigRaw dl_aacDecoder_ConfigRaw
|
||||
+#define aacDecoder_SetParam dl_aacDecoder_SetParam
|
||||
+#define aacDecoder_DecodeFrame dl_aacDecoder_DecodeFrame
|
||||
+#define aacDecoder_GetStreamInfo dl_aacDecoder_GetStreamInfo
|
||||
+#define aacDecoder_Close dl_aacDecoder_Close
|
||||
+#define FDKAAC_LIB "libfdk-aac.so.2"
|
||||
+static int loadLibFdkAac(AVCodecContext *avctx);
|
||||
+static int loadLibFdkAac(AVCodecContext *avctx) {
|
||||
+ void *libfdkaac = NULL;
|
||||
+ const char *err = NULL;
|
||||
+
|
||||
+ libfdkaac = dlopen(FDKAAC_LIB, RTLD_LAZY);
|
||||
+ if(err = dlerror()) {
|
||||
+ av_log(avctx, AV_LOG_FATAL, "%s\n%s is missing, libfdk-aac support will be disabled\n", err, FDKAAC_LIB);
|
||||
+ if(libfdkaac)
|
||||
+ dlclose(libfdkaac);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ dl_sym(aacDecoder_AncDataInit, (AAC_DECODER_ERROR (*)(HANDLE_AACDECODER, UCHAR*, int)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_Open, (HANDLE_AACDECODER (*)(TRANSPORT_TYPE, UINT)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_Fill, (AAC_DECODER_ERROR (*)(HANDLE_AACDECODER, UCHAR**, const UINT*, UINT*)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_ConfigRaw, (AAC_DECODER_ERROR (*)(HANDLE_AACDECODER, UCHAR**, const UINT*)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_SetParam, (AAC_DECODER_ERROR (*)(const HANDLE_AACDECODER, const AACDEC_PARAM, const INT)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_DecodeFrame, (AAC_DECODER_ERROR (*)(HANDLE_AACDECODER, INT_PCM*, const INT, const UINT)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_GetStreamInfo, (CStreamInfo* (*)(HANDLE_AACDECODER)), libfdkaac);
|
||||
+ dl_sym(aacDecoder_Close, (void (*)(HANDLE_AACDECODER)), libfdkaac);
|
||||
+ return 0;
|
||||
+error:
|
||||
+ av_log(avctx, AV_LOG_FATAL, "libfdk-aac: Missing symbols in %s: %s\n"
|
||||
+ "libfdk-aac support disabled\n", FDKAAC_LIB, err);
|
||||
+ dlclose(libfdkaac);
|
||||
+ return 1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
enum ConcealMethod {
|
||||
CONCEAL_METHOD_SPECTRAL_MUTING = 0,
|
||||
CONCEAL_METHOD_NOISE_SUBSTITUTION = 1,
|
||||
@@ -229,6 +277,11 @@ static av_cold int fdk_aac_decode_init(A
|
||||
FDKAACDecContext *s = avctx->priv_data;
|
||||
AAC_DECODER_ERROR err;
|
||||
|
||||
+#ifdef CONFIG_LIBFDK_AAC_DLOPEN
|
||||
+ if (loadLibFdkAac(avctx))
|
||||
+ return -1;
|
||||
+#endif
|
||||
+
|
||||
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
|
||||
if (!s->handle) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
|
||||
Index: ffmpeg-4.4.3/libavcodec/libfdk-aacenc.c
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.3.orig/libavcodec/libfdk-aacenc.c
|
||||
+++ ffmpeg-4.4.3/libavcodec/libfdk-aacenc.c
|
||||
@@ -35,6 +35,48 @@
|
||||
#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_LIBFDK_AAC_DLOPEN
|
||||
+#include "dlopen.h"
|
||||
+#include <fdk-aac/aacdecoder_lib.h>
|
||||
+AACENC_ERROR (*dl_aacEncOpen)(HANDLE_AACENCODER*, const UINT, const UINT);
|
||||
+AACENC_ERROR (*dl_aacEncoder_SetParam)(const HANDLE_AACENCODER, const AACENC_PARAM, const UINT);
|
||||
+AACENC_ERROR (*dl_aacEncEncode)(const HANDLE_AACENCODER, const AACENC_BufDesc*, const AACENC_BufDesc*, const AACENC_InArgs*, AACENC_OutArgs*);
|
||||
+AACENC_ERROR (*dl_aacEncInfo)(const HANDLE_AACENCODER, AACENC_InfoStruct*);
|
||||
+AACENC_ERROR (*dl_aacEncClose)(HANDLE_AACENCODER*);
|
||||
+
|
||||
+#define aacEncOpen dl_aacEncOpen
|
||||
+#define aacEncoder_SetParam dl_aacEncoder_SetParam
|
||||
+#define aacEncEncode dl_aacEncEncode
|
||||
+#define aacEncInfo dl_aacEncInfo
|
||||
+#define aacEncClose dl_aacEncClose
|
||||
+#define FDKAAC_LIB "libfdk-aac.so.2"
|
||||
+
|
||||
+static int loadLibFdkAac(AVCodecContext *avctx);
|
||||
+static int loadLibFdkAac(AVCodecContext *avctx) {
|
||||
+ void *libfdkaac = NULL;
|
||||
+ const char *err = NULL;
|
||||
+
|
||||
+ libfdkaac = dlopen(FDKAAC_LIB, RTLD_LAZY);
|
||||
+ if(err = dlerror()) {
|
||||
+ av_log(avctx, AV_LOG_FATAL, "%s\n%s is missing, libfdk-aac support will be disabled\n", err, FDKAAC_LIB);
|
||||
+ if(libfdkaac)
|
||||
+ dlclose(libfdkaac);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ dl_sym(aacEncOpen, (AACENC_ERROR (*)(HANDLE_AACENCODER*, const UINT, const UINT)), libfdkaac);
|
||||
+ dl_sym(aacEncoder_SetParam, (AACENC_ERROR (*)(const HANDLE_AACENCODER, const AACENC_PARAM, const UINT)), libfdkaac);
|
||||
+ dl_sym(aacEncEncode, (AACENC_ERROR (*)(const HANDLE_AACENCODER, const AACENC_BufDesc*, const AACENC_BufDesc*, const AACENC_InArgs*, AACENC_OutArgs*)), libfdkaac);
|
||||
+ dl_sym(aacEncInfo, (AACENC_ERROR (*)(const HANDLE_AACENCODER, AACENC_InfoStruct*)), libfdkaac);
|
||||
+ dl_sym(aacEncClose, (AACENC_ERROR (*)(HANDLE_AACENCODER*)), libfdkaac);
|
||||
+ return 0;
|
||||
+error:
|
||||
+ av_log(avctx, AV_LOG_FATAL, "libfdk-aac: Missing symbols in %s: %s\n"
|
||||
+ "libfdk-aac support disabled\n", FDKAAC_LIB, err);
|
||||
+ dlclose(libfdkaac);
|
||||
+ return 1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
typedef struct AACContext {
|
||||
const AVClass *class;
|
||||
HANDLE_AACENCODER handle;
|
||||
@@ -128,6 +170,11 @@ static av_cold int aac_encode_init(AVCod
|
||||
int aot = FF_PROFILE_AAC_LOW + 1;
|
||||
int sce = 0, cpe = 0;
|
||||
|
||||
+#ifdef CONFIG_LIBFDK_AAC_DLOPEN
|
||||
+ if (loadLibFdkAac(avctx))
|
||||
+ return -1;
|
||||
+#endif
|
||||
+
|
||||
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
|
||||
aac_get_error(err));
|
26
ffmpeg-4.4-CVE-2020-22046.patch
Normal file
26
ffmpeg-4.4-CVE-2020-22046.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 097c917c147661f5378dae8fe3f7e46f43236426 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
|
||||
Date: Thu, 17 Oct 2019 11:11:55 +0200
|
||||
Subject: [PATCH] avcodec/ac3enc: Fix memleak
|
||||
|
||||
Fixes ticket #8294.
|
||||
|
||||
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
|
||||
---
|
||||
libavcodec/ac3enc.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: ffmpeg-4.4.1/libavcodec/ac3enc.c
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.1.orig/libavcodec/ac3enc.c
|
||||
+++ ffmpeg-4.4.1/libavcodec/ac3enc.c
|
||||
@@ -2148,7 +2148,8 @@ av_cold int ff_ac3_encode_close(AVCodecC
|
||||
av_freep(&block->cpl_coord_mant);
|
||||
}
|
||||
|
||||
- s->mdct_end(s);
|
||||
+ if (s->mdct_end)
|
||||
+ s->mdct_end(s);
|
||||
|
||||
return 0;
|
||||
}
|
BIN
ffmpeg-4.4.4.tar.xz
(Stored with Git LFS)
Normal file
BIN
ffmpeg-4.4.4.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
11
ffmpeg-4.4.4.tar.xz.asc
Normal file
11
ffmpeg-4.4.4.tar.xz.asc
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmQ2/oUYHGZmbXBlZy1k
|
||||
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYkGMH/iRlBGO1ZcCPnNpJt6pAqxcY
|
||||
cP4hmanIPLLBPQfbHIwGUJDiTDIpXuFeWC7dt08Q8ndXtXbjTJ0T+hZP7Riuzns8
|
||||
bwXfrCRioKlmIZSUg9WMErNW+vE/nUFn20q4PdzaWbeUbIsZEW6Btt4C4JuBCLsn
|
||||
K2WZa7/GwaMnLLPIUIaNzW//aeUj11IhY74qB3k5nOhidgptY1en7xa9x1kZ3dvW
|
||||
wx2vO+2fS5SlvBfj2KFAey+FX2LAEZFjRaiWRnzlO5daqO4acWMtRAQeMk5rs21W
|
||||
NeTZUqZoPaaNfcFz1yWsBv19Fte4R9D8oD4TwMd5ikZZ2hjV+N+EMEFNWLoH02Q=
|
||||
=e6RR
|
||||
-----END PGP SIGNATURE-----
|
2027
ffmpeg-4.changes
Normal file
2027
ffmpeg-4.changes
Normal file
File diff suppressed because it is too large
Load Diff
30
ffmpeg-4.keyring
Normal file
30
ffmpeg-4.keyring
Normal file
@ -0,0 +1,30 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBE22rV0BCAC3DzRmA2XlhrqYv9HKoEvNHHf+PzosmCTHmYhWHDqvBxPkSvCl
|
||||
ipkbvJ4pBnVvcX6mW5QyKhspHm5j1X5ibe9Bt9/chS/obnIobmvF8shSUgjQ0qRW
|
||||
9c1aWOjvT26SxYQ1y9TmYCFwixeydGFHYKjAim+evGUccni5KMlfPoT3VTPtim78
|
||||
ufkr3E9Nco/Mobn/8APO0NmLEGWAM6ln/8J/c9h6a1QKnQyBqWfT0YnAaebafFaZ
|
||||
YwOtRdDG54VbJ4xwcHbCj5cKhTABk/QtBzDvnW4bG+uSpqdHbFZEY2JpURDuj/T3
|
||||
NudKQGzn0bYNpY1XY2l0pqs/btKHnBW0fVMjABEBAAG0NEZGbXBlZyByZWxlYXNl
|
||||
IHNpZ25pbmcga2V5IDxmZm1wZWctZGV2ZWxAZmZtcGVnLm9yZz6JATgEEwECACIF
|
||||
Ak22rV0CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJELQyLwTWdljYKxUH
|
||||
/1fqzl7SKie2g4t4PJbqUbkLuMsC+CP6gp0dcVZOHkuUYAoD3PM3iVxpLBVyKIXI
|
||||
g7wMSTAtlIcYnzhWIpnoCBes6/O2Mrq6xHgGeTp6CDcm3LmmSYR1f5KdD8KUaA+l
|
||||
c/M/1fEnwrSs/UGDk6R6iUmbqwxPsbozlOvmUHOLbDZBnKrk9XfAJdUhAuFACrSA
|
||||
T+KF1jniz0OfNGd23SaHWRCphoRW9pXDc5FfkdaueBUvBvGv19ZNcDhcxT3/u6z2
|
||||
DaUFC0rLWqk8obo951jVvi/zOhB94Pw6u1SLvcTq3V1q5URWJtgSbpih9VRqxUbQ
|
||||
NbXduKGzbHz6Vwpkupz4JRe5AQ0ETbatXQEIANjYrygJi/fn1nlSg5Mz0l9KHDm4
|
||||
yfWtaOrXUjJcyiGe4G0XXJLGh45qxJ0DOKzi9id+9W4jby+kKuzG9O6Vn0iDeODO
|
||||
aOGnz4ua7Vu6d0AbYfNXZPWge/GCodo/ZD/qri1tPkLmRtT/sniahwy6LruPNHfF
|
||||
SRoNIjwbcD/IL+EbY1pL1/IFSzEAA1ZZamgmHgB7o9pwDIkK6HuvHMR/Y5MsoMfV
|
||||
fWV3ZGtA6v9z51CvnHsHPsADRSnUp7aYtR412SiAO4XodMLTA92L3LxgYhI4ma7D
|
||||
XZ8jgKg4JkKO+DXmoU63HtRdq/HZjeXJKk1JGJF3zCvP3DyIzZ8LWIjN8t0AEQEA
|
||||
AYkBHwQYAQIACQUCTbatXQIbDAAKCRC0Mi8E1nZY2LS8B/0bMoUAl4X9D0WQbL4l
|
||||
U0czCIOKOsvbHpIxivjCnOQxU23+PV5WZdoCCpSuAHGv+2OHzhNrij++P9BNTJeQ
|
||||
skxdS9FH4MZwy1IRSPrxegSxbCUpBI1rd0Zf7qb9BNPrHPTueWFV1uExOSB2Apsv
|
||||
WrKo2D8mR0uZAPYfYl2ToFVoa5PR7/+ii9WiJr/flF6qm7hoLpI5Bm4VcZh2GPsJ
|
||||
9Vo/8x/qOGwtdWHqBykYloKsrwD4U69rjn+d9feLoPBRgoVroXWQttt0sUnyoudz
|
||||
+x8ETJgPoNK3kQoDagApj4qAt83Ayac3HzNIuEJ7LdvfINIOprujnJ9vH4n04XLg
|
||||
I4EZ
|
||||
=Rjbw
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
924
ffmpeg-4.spec
Normal file
924
ffmpeg-4.spec
Normal file
@ -0,0 +1,924 @@
|
||||
#
|
||||
# spec file for package ffmpeg-4
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Create proper conflicts to make sure we require all from one version
|
||||
# p: Conflict string, eg if you need them all for requires instead
|
||||
# Default value Conflicts:
|
||||
# c: copmare string ie "<" or ">=", must be defined
|
||||
# v: version string ie. "< 42.3.4" or ">= 15.0.2.1", must be defined
|
||||
%define devel_conflicts(p:c:v:) \
|
||||
%define preamble_string %{-p:%{-p*}}%{!-p:Conflicts:} \
|
||||
%define comparator %{-c:%{-c*}}%{!-c:%{error:Comparator not defined}} \
|
||||
%define conflicts_version %{-v:%{-v*}}%{!-v:%{error:Version not defined}} \
|
||||
\
|
||||
%preamble_string libavcodec-devel %comparator %conflicts_version \
|
||||
%preamble_string libavdevice-devel %comparator %conflicts_version \
|
||||
%preamble_string libavfilter-devel %comparator %conflicts_version \
|
||||
%preamble_string libavformat-devel %comparator %conflicts_version \
|
||||
%preamble_string libavresample-devel %comparator %conflicts_version \
|
||||
%preamble_string libavutil-devel %comparator %conflicts_version \
|
||||
%preamble_string libpostproc-devel %comparator %conflicts_version \
|
||||
%preamble_string libswresample-devel %comparator %conflicts_version \
|
||||
%preamble_string libswscale-devel %comparator %conflicts_version \
|
||||
%preamble_string ffmpeg-private-devel %comparator %conflicts_version \
|
||||
%nil
|
||||
|
||||
# nvcodec headers only present after leap15
|
||||
%bcond_with nvcodec
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%bcond_without nvcodec
|
||||
%endif
|
||||
%if 0%{?BUILD_ORIG}
|
||||
%bcond_with amrwb
|
||||
%bcond_without cuda_sdk
|
||||
%else
|
||||
%bcond_with cuda_sdk
|
||||
%endif
|
||||
%bcond_with fdk_aac_dlopen
|
||||
%bcond_with librtmp
|
||||
%bcond_with opencore
|
||||
%bcond_with smbclient
|
||||
%bcond_with x264
|
||||
%bcond_with x265
|
||||
%bcond_with xvid
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libaom
|
||||
%bcond_without mysofa
|
||||
%bcond_without vidstab
|
||||
%bcond_without srt
|
||||
%bcond_without codec2
|
||||
%bcond_without lv2
|
||||
%bcond_without librav1e
|
||||
%bcond_without rubberband
|
||||
%bcond_without soxr
|
||||
%bcond_without zmq
|
||||
%bcond_without vulkan
|
||||
%else
|
||||
%bcond_with libaom
|
||||
%bcond_with mysofa
|
||||
%bcond_with vidstab
|
||||
%bcond_with srt
|
||||
%bcond_with codec2
|
||||
%bcond_with lv2
|
||||
%bcond_with librav1e
|
||||
%bcond_with rubberband
|
||||
%bcond_with soxr
|
||||
%bcond_with zmq
|
||||
%bcond_with vulkan
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%bcond_without zimg
|
||||
%bcond_without openmpt
|
||||
%else
|
||||
%bcond_with zimg
|
||||
%bcond_with openmpt
|
||||
%endif
|
||||
|
||||
%define _name ffmpeg
|
||||
%define _major_version 4
|
||||
%define _major_expected 5
|
||||
Name: ffmpeg-4
|
||||
Version: 4.4.4
|
||||
Release: 0
|
||||
Summary: Set of libraries for working with various multimedia formats
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Multimedia/Video/Editors and Convertors
|
||||
URL: https://ffmpeg.org/
|
||||
|
||||
#Freshcode-URL: http://freshcode.club/projects/ffmpeg
|
||||
#Git-Clone: git://source.ffmpeg.org/ffmpeg
|
||||
Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz
|
||||
Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc
|
||||
Source3: ffmpeg-4-rpmlintrc
|
||||
Source4: enable_decoders
|
||||
Source5: enable_encoders
|
||||
Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-4.keyring
|
||||
Source99: baselibs.conf
|
||||
Patch1: ffmpeg-arm6l.diff
|
||||
Patch2: ffmpeg-new-coder-errors.diff
|
||||
Patch3: ffmpeg-codec-choice.diff
|
||||
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
|
||||
Patch5: soversion.patch
|
||||
Patch8: vmaf-trim-usr-local.patch
|
||||
Patch9: ffmpeg-4.4-CVE-2020-22046.patch
|
||||
Patch10: ffmpeg-chromium.patch
|
||||
Patch11: ffmpeg-libglslang-detection.patch
|
||||
Patch12: 0001-avcodec-libsvtav1-remove-compressed_ten_bit_format-a.patch
|
||||
Patch13: 0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch
|
||||
Patch14: ffmpeg-glslang-cxx17.patch
|
||||
BuildRequires: ladspa-devel
|
||||
BuildRequires: libgsm-devel
|
||||
BuildRequires: libmp3lame-devel
|
||||
%if %{with mysofa}
|
||||
BuildRequires: libmysofa-devel
|
||||
%endif
|
||||
BuildRequires: nasm
|
||||
BuildRequires: pkg-config
|
||||
%ifarch x86_64
|
||||
%if 0%{?suse_version} >= 1550
|
||||
BuildRequires: pkgconfig(SvtAv1Enc) >= 0.8.4
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
%if %{with libaom}
|
||||
BuildRequires: pkgconfig(aom)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(celt) >= 0.11.0
|
||||
%if %{with codec2}
|
||||
BuildRequires: pkgconfig(codec2)
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
|
||||
BuildRequires: pkgconfig(dav1d)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(enca)
|
||||
BuildRequires: pkgconfig(fontconfig) >= 2.4.2
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(fribidi) >= 0.19.0
|
||||
BuildRequires: pkgconfig(gnutls)
|
||||
BuildRequires: pkgconfig(jack)
|
||||
BuildRequires: pkgconfig(libass)
|
||||
BuildRequires: pkgconfig(libbluray)
|
||||
BuildRequires: pkgconfig(libbs2b)
|
||||
BuildRequires: pkgconfig(libcdio)
|
||||
BuildRequires: pkgconfig(libcdio_paranoia)
|
||||
BuildRequires: pkgconfig(libdc1394-2)
|
||||
BuildRequires: pkgconfig(libdrm)
|
||||
BuildRequires: pkgconfig(libgme)
|
||||
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
|
||||
%if %{with openmpt}
|
||||
BuildRequires: pkgconfig(libopenmpt)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libraw1394)
|
||||
BuildRequires: pkgconfig(libssh)
|
||||
BuildRequires: pkgconfig(libv4l2)
|
||||
BuildRequires: pkgconfig(libva) >= 0.35.0
|
||||
BuildRequires: pkgconfig(libva-drm)
|
||||
BuildRequires: pkgconfig(libva-x11)
|
||||
BuildRequires: pkgconfig(libvmaf) >= 1.3.9
|
||||
BuildRequires: pkgconfig(libwebp) >= 0.4
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
%if %{with zmq}
|
||||
BuildRequires: pkgconfig(libzmq)
|
||||
%endif
|
||||
%if %{with lv2}
|
||||
BuildRequires: pkgconfig(lilv-0)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(ogg)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
%if %{with librav1e}
|
||||
BuildRequires: pkgconfig(rav1e)
|
||||
%endif
|
||||
%if %{with rubberband}
|
||||
BuildRequires: pkgconfig(rubberband)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
%if %{with smbclient}
|
||||
BuildRequires: pkgconfig(smbclient)
|
||||
%endif
|
||||
%if %{with soxr}
|
||||
BuildRequires: pkgconfig(soxr)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(speex)
|
||||
%if %{with srt}
|
||||
BuildRequires: pkgconfig(srt)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(theora) >= 1.1
|
||||
BuildRequires: pkgconfig(twolame)
|
||||
BuildRequires: pkgconfig(vdpau)
|
||||
%if %{with vidstab}
|
||||
BuildRequires: pkgconfig(vidstab) >= 0.98
|
||||
%endif
|
||||
%if %{with vulkan}
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: glslang-devel
|
||||
BuildRequires: pkgconfig(SPIRV-Tools)
|
||||
BuildRequires: pkgconfig(vulkan)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
BuildRequires: pkgconfig(vpx) >= 1.4.0
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xcb)
|
||||
BuildRequires: pkgconfig(xcb-render)
|
||||
BuildRequires: pkgconfig(xcb-shape)
|
||||
BuildRequires: pkgconfig(xcb-shm)
|
||||
BuildRequires: pkgconfig(xcb-xfixes)
|
||||
BuildRequires: pkgconfig(xext)
|
||||
BuildRequires: pkgconfig(xfixes)
|
||||
%if %{with zimg}
|
||||
BuildRequires: pkgconfig(zimg)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkgconfig(zvbi-0.2) >= 0.2.28
|
||||
%if %{with fdk_aac_dlopen}
|
||||
BuildRequires: pkgconfig(fdk-aac)
|
||||
%endif
|
||||
%if %{with librtmp}
|
||||
BuildRequires: pkgconfig(librtmp)
|
||||
%endif
|
||||
%if %{with nvcodec}
|
||||
BuildRequires: pkgconfig(ffnvcodec)
|
||||
%endif
|
||||
%if %{with xvid}
|
||||
BuildRequires: libxvidcore-devel
|
||||
%endif
|
||||
%if %{with opencore}
|
||||
BuildRequires: pkgconfig(opencore-amrnb)
|
||||
%endif
|
||||
%if %{with amrwb}
|
||||
BuildRequires: pkgconfig(vo-amrwbenc)
|
||||
%endif
|
||||
%if %{with x264}
|
||||
BuildRequires: pkgconfig(x264)
|
||||
%endif
|
||||
%if %{with x265}
|
||||
BuildRequires: pkgconfig(x265)
|
||||
%endif
|
||||
Provides: ffmpeg-tools = %version
|
||||
Conflicts: ffmpeg-tools
|
||||
Provides: ffmpeg = %version
|
||||
Obsoletes: ffmpeg < %version
|
||||
Requires: libavcodec58_134 = %version-%release
|
||||
Requires: libavdevice58_13 = %version-%release
|
||||
Requires: libavfilter7_110 = %version-%release
|
||||
Requires: libavformat58_76 = %version-%release
|
||||
Requires: libavresample4_0 = %version-%release
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
Requires: libpostproc55_9 = %version-%release
|
||||
Requires: libswresample3_9 = %version-%release
|
||||
Requires: libswscale5_9 = %version-%release
|
||||
|
||||
%description
|
||||
FFmpeg is a multimedia framework, able to decode, encode,
|
||||
transcode, mux, demux, stream, filter and play several formats
|
||||
that humans and machines have created.
|
||||
%if !0%{?BUILD_ORIG}
|
||||
|
||||
This build of ffmpeg is limited in the number of codecs supported.
|
||||
%endif
|
||||
|
||||
%package -n libavcodec58_134
|
||||
Summary: FFmpeg codec library
|
||||
Group: System/Libraries
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
Requires: libswresample3_9 = %version-%release
|
||||
%if 0%{?BUILD_ORIG}
|
||||
Provides: libavcodec-full = %version-%release
|
||||
# This can be (and is) required by packages like vlc-codecs -
|
||||
# do follow the shlib name to not get random lib providers
|
||||
Provides: libavcodec58_134(unrestricted)
|
||||
%endif
|
||||
# For mozillas
|
||||
Provides: libavcodec = %version-%release
|
||||
|
||||
%description -n libavcodec58_134
|
||||
The libavcodec library provides a generic encoding/decoding framework
|
||||
and contains multiple decoders and encoders for audio, video and
|
||||
subtitle streams, and several bitstream filters.
|
||||
%if !0%{?BUILD_ORIG}
|
||||
|
||||
This build of ffmpeg is limited in the number of codecs supported.
|
||||
%endif
|
||||
|
||||
%package libavcodec-devel
|
||||
Summary: Development files for FFmpeg's codec library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libavcodec-devel = %version-%release
|
||||
Obsoletes: libavcodec-devel < %version-%release
|
||||
Requires: %name-libavresample-devel = %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: libavcodec58_134 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavcodec-devel
|
||||
The libavcodec library provides a generic encoding/decoding framework
|
||||
and contains multiple decoders and encoders for audio, video and
|
||||
subtitle streams, and several bitstream filters.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libavcodec.
|
||||
|
||||
%package -n libavdevice58_13
|
||||
Summary: FFmpeg device library
|
||||
Group: System/Libraries
|
||||
Requires: libavcodec58_134 = %version-%release
|
||||
Requires: libavfilter7_110 = %version-%release
|
||||
Requires: libavformat58_76 = %version-%release
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
|
||||
%description -n libavdevice58_13
|
||||
The libavdevice library provides a generic framework for grabbing from
|
||||
and rendering to many common multimedia input/output devices, and
|
||||
supports several input and output devices, including Video4Linux2, VfW,
|
||||
DShow, and ALSA.
|
||||
|
||||
%package libavdevice-devel
|
||||
Summary: Development files for FFmpeg's device library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: ffmpeg-devel = %version-%release
|
||||
Conflicts: ffmpeg-devel
|
||||
Provides: libavdevice-devel = %version-%release
|
||||
Obsoletes: libavdevice-devel < %version-%release
|
||||
Requires: %name-libavcodec-devel = %version-%release
|
||||
Requires: %name-libavfilter-devel = %version-%release
|
||||
Requires: %name-libavformat-devel = %version-%release
|
||||
Requires: %name-libavresample-devel = %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: %name-libpostproc-devel = %version-%release
|
||||
Requires: %name-libswresample-devel = %version-%release
|
||||
Requires: %name-libswscale-devel = %version-%release
|
||||
Requires: libavdevice58_13 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavdevice-devel
|
||||
The libavdevice library provides a generic framework for grabbing from
|
||||
and rendering to many common multimedia input/output devices, and
|
||||
supports several input and output devices, including Video4Linux2, VfW,
|
||||
DShow, and ALSA.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libavcodec.
|
||||
|
||||
%package -n libavfilter7_110
|
||||
Summary: FFmpeg audio and video filtering library
|
||||
Group: System/Libraries
|
||||
Requires: libavcodec58_134 = %version-%release
|
||||
Requires: libavformat58_76 = %version-%release
|
||||
Requires: libavresample4_0 = %version-%release
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
Requires: libpostproc55_9 = %version-%release
|
||||
Requires: libswresample3_9 = %version-%release
|
||||
Requires: libswscale5_9 = %version-%release
|
||||
|
||||
%description -n libavfilter7_110
|
||||
The libavfilter library provides a generic audio/video filtering
|
||||
framework containing several filters, sources and sinks.
|
||||
|
||||
%package libavfilter-devel
|
||||
Summary: Development files for FFmpeg's audio/video filter library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libavfilter-devel = %version-%release
|
||||
Obsoletes: libavfilter-devel < %version-%release
|
||||
Requires: %name-libavcodec-devel = %version-%release
|
||||
Requires: %name-libavformat-devel = %version-%release
|
||||
Requires: %name-libavresample-devel = %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: %name-libpostproc-devel = %version-%release
|
||||
Requires: %name-libswresample-devel = %version-%release
|
||||
Requires: %name-libswscale-devel = %version-%release
|
||||
Requires: libavfilter7_110 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavfilter-devel
|
||||
The libavfilter library provides a generic audio/video filtering
|
||||
framework containing several filters, sources and sinks.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libavfilter.
|
||||
|
||||
%package -n libavformat58_76
|
||||
Summary: FFmpeg's stream format library
|
||||
Group: System/Libraries
|
||||
Requires: libavcodec58_134 = %version-%release
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
|
||||
%description -n libavformat58_76
|
||||
The libavformat library provides a generic framework for multiplexing
|
||||
and demultiplexing (muxing and demuxing) audio, video and subtitle
|
||||
streams. It encompasses multiple muxers and demuxers for multimedia
|
||||
container formats.
|
||||
%if !0%{?BUILD_ORIG}
|
||||
|
||||
This build of ffmpeg is limited in the number of codecs supported.
|
||||
%endif
|
||||
|
||||
%package libavformat-devel
|
||||
Summary: Development files for FFmpeg's stream format library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libavformat-devel = %version-%release
|
||||
Obsoletes: libavformat-devel < %version-%release
|
||||
Requires: %name-libavcodec-devel = %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: %name-libswresample-devel = %version-%release
|
||||
Requires: libavformat58_76 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavformat-devel
|
||||
The libavformat library provides a generic framework for multiplexing
|
||||
and demultiplexing (muxing and demuxing) audio, video and subtitle
|
||||
streams. It encompasses multiple muxers and demuxers for multimedia
|
||||
container formats.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libavformat.
|
||||
|
||||
%package -n libavresample4_0
|
||||
Summary: FFmpeg alternate audio resampling library
|
||||
Group: System/Libraries
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
Obsoletes: libavresample4 < %version-%release
|
||||
Provides: libavresample4 = %version-%release
|
||||
|
||||
%description -n libavresample4_0
|
||||
An audio resampling library that is being provided for drop-in
|
||||
compatibility with libav.
|
||||
|
||||
It is advised to use libswresample for new code.
|
||||
|
||||
%package libavresample-devel
|
||||
Summary: Development files for libavresample as present in FFmpeg
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libavresample-devel = %version-%release
|
||||
Obsoletes: libavresample-devel < %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: libavresample4_0 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavresample-devel
|
||||
An audio resampling library that is being provided for drop-in
|
||||
compatibility with libav.
|
||||
|
||||
It is advised to use libswresample for new code.
|
||||
|
||||
This subpackage contains the headers for FFmpeg's copy of libavresample.
|
||||
|
||||
%package -n libavutil56_70
|
||||
Summary: FFmpeg's utility library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libavutil56_70
|
||||
The libavutil library is a utility library to aid portable multimedia
|
||||
programming. It contains safe portable string functions, random
|
||||
number generators, data structures, additional mathematics functions,
|
||||
cryptography and multimedia related functionality (like enumerations
|
||||
for pixel and sample formats).
|
||||
|
||||
%package libavutil-devel
|
||||
Summary: Development files for FFmpeg's utility library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libavutil-devel = %version-%release
|
||||
Obsoletes: libavutil-devel < %version-%release
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libavutil-devel
|
||||
The libavutil library is a utility library to aid portable multimedia
|
||||
programming. It contains safe portable string functions, random
|
||||
number generators, data structures, additional mathematics functions,
|
||||
cryptography and multimedia related functionality (like enumerations
|
||||
for pixel and sample formats).
|
||||
|
||||
This subpackage contains the headers for FFmpeg libavutil.
|
||||
|
||||
%package -n libpostproc55_9
|
||||
Summary: FFmpeg post-processing library
|
||||
Group: System/Libraries
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
|
||||
%description -n libpostproc55_9
|
||||
A library with video postprocessing filters, such as deblocking and
|
||||
deringing filters, noise reduction, automatic contrast and brightness
|
||||
correction, linear/cubic interpolating deinterlacing.
|
||||
|
||||
%package libpostproc-devel
|
||||
Summary: Development files for the FFmpeg post-processing library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libpostproc-devel = %version-%release
|
||||
Obsoletes: libpostproc-devel < %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: libpostproc55_9 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libpostproc-devel
|
||||
A library with video postprocessing filters, such as deblocking and
|
||||
deringing filters, noise reduction, automatic contrast and brightness
|
||||
correction, linear/cubic interpolating deinterlacing.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libpostproc.
|
||||
|
||||
%package -n libswresample3_9
|
||||
Summary: FFmpeg software resampling library
|
||||
Group: System/Libraries
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
|
||||
%description -n libswresample3_9
|
||||
The libswresample library performs audio conversion between different
|
||||
sample rates, channel layout and channel formats.
|
||||
|
||||
%package libswresample-devel
|
||||
Summary: Development files for the FFmpeg software resampling library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libswresample-devel = %version-%release
|
||||
Obsoletes: libswresample-devel < %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: libswresample3_9 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libswresample-devel
|
||||
The libswresample library performs audio conversion between different
|
||||
sample rates, channel layout and channel formats.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libswresample.
|
||||
|
||||
%package -n libswscale5_9
|
||||
Summary: FFmpeg image scaling and colorspace/pixel conversion library
|
||||
Group: System/Libraries
|
||||
Requires: libavutil56_70 = %version-%release
|
||||
|
||||
%description -n libswscale5_9
|
||||
The libswscale library performs image scaling and colorspace and
|
||||
pixel format conversion operations.
|
||||
|
||||
%package libswscale-devel
|
||||
Summary: Development files for FFmpeg's image scaling and colorspace library
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libswscale-devel = %version-%release
|
||||
Conflicts: libswscale-devel
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Requires: libswscale5_9 = %version-%release
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description libswscale-devel
|
||||
The libswscale library performs image scaling and colorspace and
|
||||
pixel format conversion operations.
|
||||
|
||||
This subpackage contains the headers for FFmpeg libswscale.
|
||||
|
||||
%package private-devel
|
||||
Summary: Some FFmpeg private headers
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %name-libavcodec-devel = %version-%release
|
||||
Requires: %name-libavformat-devel = %version-%release
|
||||
Requires: %name-libavutil-devel = %version-%release
|
||||
Provides: ffmpeg-private-devel = %version
|
||||
Obsoletes: ffmpeg-private-devel < %version
|
||||
%devel_conflicts -c < -v %_major_version
|
||||
%devel_conflicts -c >= -v %_major_expected
|
||||
|
||||
%description private-devel
|
||||
FFmpeg is a multimedia framework, able to decode, encode,
|
||||
transcode, mux, demux, stream, filter and play several formats
|
||||
that humans and machines have created.
|
||||
|
||||
This package contains some private headers for libavformat, libavcodec and
|
||||
libavutil which are needed by libav-tools to build. No other package apart
|
||||
from libav should depend on these private headers which are expected to
|
||||
break compatibility without any notice.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %_name-%version
|
||||
|
||||
%build
|
||||
%ifarch %ix86 %arm
|
||||
%define _lto_cflags %nil
|
||||
%endif
|
||||
%if "%_lto_cflags" != ""
|
||||
%global _lto_cflags %_lto_cflags -ffat-lto-objects
|
||||
%endif
|
||||
CFLAGS="%optflags" CXXFLAGS="%optflags" \
|
||||
%if %suse_version > 1500
|
||||
%ifarch %ix86
|
||||
%else
|
||||
LDFLAGS="%_lto_cflags" \
|
||||
%endif
|
||||
%endif
|
||||
./configure \
|
||||
--prefix="%_prefix" \
|
||||
--libdir="%_libdir" \
|
||||
--shlibdir="%_libdir" \
|
||||
--incdir="%_includedir/ffmpeg" \
|
||||
--extra-cflags="%optflags" \
|
||||
--optflags="%optflags" \
|
||||
--disable-htmlpages \
|
||||
--enable-pic \
|
||||
--disable-stripping \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-gpl \
|
||||
--enable-version3 \
|
||||
%if %{with smbclient}
|
||||
--enable-libsmbclient \
|
||||
%endif
|
||||
--disable-openssl \
|
||||
--enable-avresample \
|
||||
--enable-gnutls \
|
||||
--enable-ladspa \
|
||||
%if %{with vulkan}
|
||||
--enable-vulkan \
|
||||
--enable-libglslang \
|
||||
%endif
|
||||
%if ! %{with cuda_sdk}
|
||||
--disable-cuda-sdk \
|
||||
%endif
|
||||
%if %{with libaom}
|
||||
--enable-libaom \
|
||||
%endif
|
||||
--enable-libass \
|
||||
--enable-libbluray \
|
||||
--enable-libbs2b \
|
||||
--enable-libcelt \
|
||||
--enable-libcdio \
|
||||
%if %{with codec2}
|
||||
--enable-libcodec2 \
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
|
||||
--enable-libdav1d \
|
||||
%endif
|
||||
--enable-libdc1394 \
|
||||
--enable-libdrm \
|
||||
--enable-libfontconfig \
|
||||
--enable-libfreetype \
|
||||
--enable-libfribidi \
|
||||
--enable-libgsm \
|
||||
--enable-libjack \
|
||||
--enable-libmp3lame \
|
||||
%if %{with mysofa}
|
||||
--enable-libmysofa \
|
||||
%endif
|
||||
--enable-libopenjpeg \
|
||||
%if %{with openmpt}
|
||||
--enable-libopenmpt \
|
||||
%endif
|
||||
--enable-libopus \
|
||||
--enable-libpulse \
|
||||
%if %{with librav1e}
|
||||
--enable-librav1e \
|
||||
%endif
|
||||
%if %{with rubberband}
|
||||
--enable-librubberband \
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
%if 0%{?suse_version} >= 1550
|
||||
--enable-libsvtav1 \
|
||||
%endif
|
||||
%endif
|
||||
%if %{with soxr}
|
||||
--enable-libsoxr \
|
||||
%endif
|
||||
--enable-libspeex \
|
||||
--enable-libssh \
|
||||
%if %{with srt}
|
||||
--enable-libsrt \
|
||||
%endif
|
||||
--enable-libtheora \
|
||||
--enable-libtwolame \
|
||||
%if %{with vidstab}
|
||||
--enable-libvidstab \
|
||||
%endif
|
||||
--enable-libvmaf \
|
||||
--enable-libvorbis \
|
||||
--enable-libv4l2 \
|
||||
--enable-libvpx \
|
||||
--enable-libwebp \
|
||||
--enable-libxml2 \
|
||||
%if %{with zimg}
|
||||
--enable-libzimg \
|
||||
%endif
|
||||
%if %{with zmq}
|
||||
--enable-libzmq \
|
||||
%endif
|
||||
--enable-libzvbi \
|
||||
%if 0%{?suse_version} > 1500
|
||||
%ifarch %ix86
|
||||
%else
|
||||
--enable-lto \
|
||||
%endif
|
||||
%endif
|
||||
%if %{with lv2}
|
||||
--enable-lv2 \
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
|
||||
%endif
|
||||
--enable-vaapi \
|
||||
--enable-vdpau \
|
||||
--enable-version3 \
|
||||
%if %{with fdk_aac_dlopen}
|
||||
--enable-libfdk-aac-dlopen \
|
||||
--enable-nonfree \
|
||||
%endif
|
||||
%if %{with opencore}
|
||||
--enable-libopencore-amrnb \
|
||||
--enable-libopencore-amrwb \
|
||||
%endif
|
||||
%if %{with amrwb}
|
||||
--enable-libvo-amrwbenc \
|
||||
%endif
|
||||
%if %{with x264}
|
||||
--enable-libx264 \
|
||||
%endif
|
||||
%if %{with x265}
|
||||
--enable-libx265 \
|
||||
%endif
|
||||
%if %{with librtmp}
|
||||
--enable-librtmp \
|
||||
%endif
|
||||
%if %{with xvid}
|
||||
--enable-libxvid \
|
||||
%endif
|
||||
%if !0%{?BUILD_ORIG}
|
||||
--enable-muxers \
|
||||
--enable-demuxers \
|
||||
--disable-encoders \
|
||||
--disable-decoders \
|
||||
--disable-decoder=mpeg4,h263,h264,hevc,vc1 \
|
||||
--enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_encoders)" \
|
||||
--enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_decoders)" \
|
||||
|
||||
for i in MPEG4 H263 H264 HEVC VC1; do
|
||||
grep -q "#define CONFIG_${i}_DECODER 0" config.h
|
||||
done
|
||||
%endif
|
||||
|
||||
cat config.h
|
||||
%make_build
|
||||
|
||||
%global extratools aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper probetest qt-faststart seek_print sidxindex trasher
|
||||
|
||||
for i in %extratools; do
|
||||
%make_build "tools/$i"
|
||||
done
|
||||
|
||||
%install
|
||||
b="%buildroot"
|
||||
%make_install install-man
|
||||
rm -Rf "$b/%_datadir/ffmpeg/examples"
|
||||
for i in %extratools; do
|
||||
cp -a "tools/$i" "$b/%_bindir/"
|
||||
done
|
||||
|
||||
# Install private headers required by libav-tools
|
||||
for i in libavformat/options_table.h libavformat/os_support.h \
|
||||
libavformat/internal.h libavcodec/options_table.h libavutil/libm.h \
|
||||
libavutil/internal.h libavutil/colorspace.h libavutil/timer.h \
|
||||
libavutil/x86/emms.h libavutil/aarch64/timer.h libavutil/arm/timer.h \
|
||||
libavutil/bfin/timer.h libavutil/ppc/timer.h libavutil/x86/timer.h; do
|
||||
mkdir -p "$b/%_includedir/ffmpeg/private/"`dirname $i`
|
||||
cp -a $i "$b/%_includedir/ffmpeg/private/$i"
|
||||
done
|
||||
|
||||
%ldconfig_scriptlets -n libavcodec58_134
|
||||
%ldconfig_scriptlets -n libavdevice58_13
|
||||
%ldconfig_scriptlets -n libavfilter7_110
|
||||
%ldconfig_scriptlets -n libavformat58_76
|
||||
%ldconfig_scriptlets -n libavresample4_0
|
||||
%ldconfig_scriptlets -n libavutil56_70
|
||||
%ldconfig_scriptlets -n libpostproc55_9
|
||||
%ldconfig_scriptlets -n libswresample3_9
|
||||
%ldconfig_scriptlets -n libswscale5_9
|
||||
|
||||
%files
|
||||
%doc Changelog CREDITS README.md
|
||||
%_bindir/aviocat
|
||||
%_bindir/cws2fws
|
||||
%_bindir/ffescape
|
||||
%_bindir/ffeval
|
||||
%_bindir/ffhash
|
||||
%_bindir/ffmpeg
|
||||
%_bindir/ffplay
|
||||
%_bindir/ffprobe
|
||||
%_bindir/fourcc2pixfmt
|
||||
%_bindir/graph2dot
|
||||
%_bindir/ismindex
|
||||
%_bindir/pktdumper
|
||||
%_bindir/probetest
|
||||
%_bindir/qt-faststart
|
||||
%_bindir/seek_print
|
||||
%_bindir/sidxindex
|
||||
%_bindir/trasher
|
||||
%_mandir/man1/ff*.1*
|
||||
%_datadir/ffmpeg/
|
||||
%_libdir/libavcodec.so.58
|
||||
%_libdir/libavdevice.so.58
|
||||
%_libdir/libavfilter.so.7
|
||||
%_libdir/libavformat.so.58
|
||||
%_libdir/libavresample.so.4
|
||||
%_libdir/libavutil.so.56
|
||||
%_libdir/libpostproc.so.55
|
||||
%_libdir/libswresample.so.3
|
||||
%_libdir/libswscale.so.5
|
||||
|
||||
%files -n libavcodec58_134
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavcodec.so.58.134*
|
||||
|
||||
%files -n libavdevice58_13
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavdevice.so.58.13*
|
||||
|
||||
%files -n libavfilter7_110
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavfilter.so.7.110*
|
||||
|
||||
%files -n libavformat58_76
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavformat.so.58.76*
|
||||
|
||||
%files -n libavresample4_0
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavresample.so.4.0*
|
||||
|
||||
%files -n libavutil56_70
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libavutil.so.56.70*
|
||||
|
||||
%files -n libpostproc55_9
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libpostproc.so.55.9*
|
||||
|
||||
%files -n libswresample3_9
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libswresample.so.3.9*
|
||||
|
||||
%files -n libswscale5_9
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
%_libdir/libswscale.so.5.9*
|
||||
|
||||
%files libavcodec-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavcodec/
|
||||
%_libdir/libavcodec.so
|
||||
%_libdir/pkgconfig/libavcodec.pc
|
||||
%_mandir/man3/libavcodec.3*
|
||||
|
||||
%files libavdevice-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavdevice/
|
||||
%_libdir/libavdevice.so
|
||||
%_libdir/pkgconfig/libavdevice.pc
|
||||
%_mandir/man3/libavdevice.3*
|
||||
|
||||
%files libavfilter-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavfilter/
|
||||
%_libdir/libavfilter.so
|
||||
%_libdir/pkgconfig/libavfilter.pc
|
||||
%_mandir/man3/libavfilter.3*
|
||||
|
||||
%files libavformat-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavformat/
|
||||
%_libdir/libavformat.so
|
||||
%_libdir/pkgconfig/libavformat.pc
|
||||
%_mandir/man3/libavformat.3*
|
||||
|
||||
%files libavresample-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavresample/
|
||||
%_libdir/libavresample.so
|
||||
%_libdir/pkgconfig/libavresample.pc
|
||||
|
||||
%files libavutil-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libavutil/
|
||||
%_libdir/libavutil.so
|
||||
%_libdir/pkgconfig/libavutil.pc
|
||||
%_mandir/man3/libavutil.3*
|
||||
|
||||
%files libpostproc-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libpostproc/
|
||||
%_libdir/libpostproc.so
|
||||
%_libdir/pkgconfig/libpostproc.pc
|
||||
|
||||
%files libswresample-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libswresample/
|
||||
%_libdir/libswresample.so
|
||||
%_libdir/pkgconfig/libswresample.pc
|
||||
%_mandir/man3/libswresample.3*
|
||||
|
||||
%files libswscale-devel
|
||||
%dir %_includedir/ffmpeg/
|
||||
%_includedir/ffmpeg/libswscale/
|
||||
%_libdir/libswscale.so
|
||||
%_libdir/pkgconfig/libswscale.pc
|
||||
%_mandir/man3/libswscale.3*
|
||||
|
||||
%files private-devel
|
||||
%_includedir/ffmpeg/private/
|
||||
|
||||
%changelog
|
17
ffmpeg-arm6l.diff
Normal file
17
ffmpeg-arm6l.diff
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
libavutil/arm/timer.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: ffmpeg-4.4.1/libavutil/arm/timer.h
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.1.orig/libavutil/arm/timer.h
|
||||
+++ ffmpeg-4.4.1/libavutil/arm/timer.h
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define AV_READ_TIME mach_absolute_time
|
||||
|
||||
-#elif HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__)
|
||||
+#elif HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_6ZK__)
|
||||
|
||||
#define AV_READ_TIME read_time
|
||||
|
41
ffmpeg-chromium.patch
Normal file
41
ffmpeg-chromium.patch
Normal file
@ -0,0 +1,41 @@
|
||||
commit 95aab0fd83619408995720ce53d7a74790580220
|
||||
author liberato@chromium.org <liberato@chromium.org> Thu Jul 08 02:01:22 2021
|
||||
committer liberato@chromium.org <liberato@chromium.org> Thu Jul 08 02:01:22 2021
|
||||
tree ac725b5e2c548c8142aa7096d8184d87d3876a49
|
||||
parent e073b7a22e4993e0a7cab80a42a21524e5349f95
|
||||
|
||||
Add av_stream_get_first_dts for Chromium
|
||||
|
||||
Index: ffmpeg-4.4.2/libavformat/avformat.h
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.2.orig/libavformat/avformat.h
|
||||
+++ ffmpeg-4.4.2/libavformat/avformat.h
|
||||
@@ -1141,6 +1141,10 @@ struct AVCodecParserContext *av_stream_g
|
||||
*/
|
||||
int64_t av_stream_get_end_pts(const AVStream *st);
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st);
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
#define AV_PROGRAM_RUNNING 1
|
||||
|
||||
/**
|
||||
Index: ffmpeg-4.4.2/libavformat/utils.c
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.2.orig/libavformat/utils.c
|
||||
+++ ffmpeg-4.4.2/libavformat/utils.c
|
||||
@@ -142,6 +142,13 @@ int64_t av_stream_get_end_pts(const AVSt
|
||||
return AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st)
|
||||
+{
|
||||
+ return st->first_dts;
|
||||
+}
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
|
||||
{
|
||||
return st->parser;
|
56
ffmpeg-codec-choice.diff
Normal file
56
ffmpeg-codec-choice.diff
Normal file
@ -0,0 +1,56 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
Edit the default codec selection such that
|
||||
|
||||
ffmpeg -i youtube.blah.webm foobar.mkv
|
||||
|
||||
without any further arguments can produce a result even on a
|
||||
reduced codec selection list.
|
||||
|
||||
---
|
||||
libavformat/matroskaenc.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: ffmpeg-4.4.1/libavformat/matroskaenc.c
|
||||
===================================================================
|
||||
--- ffmpeg-4.4.1.orig/libavformat/matroskaenc.c
|
||||
+++ ffmpeg-4.4.1/libavformat/matroskaenc.c
|
||||
@@ -2835,16 +2835,24 @@ static const AVClass matroska_class = {
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
|
||||
+#define PREFAUDIO \
|
||||
+ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \
|
||||
+ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \
|
||||
+ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \
|
||||
+ AV_CODEC_ID_AC3
|
||||
AVOutputFormat ff_matroska_muxer = {
|
||||
.name = "matroska",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
|
||||
.mime_type = "video/x-matroska",
|
||||
.extensions = "mkv",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||
- .video_codec = CONFIG_LIBX264_ENCODER ?
|
||||
- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
|
||||
+ .audio_codec = PREFAUDIO,
|
||||
+ .video_codec =
|
||||
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
|
||||
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
|
||||
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
|
||||
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
|
||||
+ AV_CODEC_ID_THEORA,
|
||||
.init = mkv_init,
|
||||
.deinit = mkv_deinit,
|
||||
.write_header = mkv_write_header,
|
||||
@@ -2906,8 +2914,7 @@ AVOutputFormat ff_matroska_audio_muxer =
|
||||
.mime_type = "audio/x-matroska",
|
||||
.extensions = "mka",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||