commit
1d44d3c224
@ -0,0 +1 @@
|
||||
32f50107b83ca74f310617cecc8fd9445de2b7e0 SOURCES/ffmpeg-free-7.0.2.tar.xz
|
@ -0,0 +1 @@
|
||||
SOURCES/ffmpeg-free-7.0.2.tar.xz
|
@ -0,0 +1,137 @@
|
||||
From 5176821735c397de2a108cd266a6c6759a5e0ffe Mon Sep 17 00:00:00 2001
|
||||
From: David Rosca <nowrep@gmail.com>
|
||||
Date: Wed, 8 May 2024 09:11:11 +0200
|
||||
Subject: [PATCH 1/2] lavc/vaapi_decode: Make it possible to send multiple
|
||||
slice params buffers
|
||||
|
||||
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
|
||||
Signed-off-by: David Rosca <nowrep@gmail.com>
|
||||
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
|
||||
(cherry picked from commit fe9d889dcd79ea18d4dfaa39df4ddbd4c8c3b15c)
|
||||
|
||||
[modified to drop h264/hevc/vc1 parts stripped in Fedora Linux]
|
||||
---
|
||||
libavcodec/vaapi_av1.c | 2 +-
|
||||
libavcodec/vaapi_decode.c | 3 ++-
|
||||
libavcodec/vaapi_decode.h | 1 +
|
||||
libavcodec/vaapi_mjpeg.c | 2 +-
|
||||
libavcodec/vaapi_mpeg2.c | 2 +-
|
||||
libavcodec/vaapi_mpeg4.c | 2 +-
|
||||
libavcodec/vaapi_vp8.c | 2 +-
|
||||
libavcodec/vaapi_vp9.c | 2 +-
|
||||
8 files changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c
|
||||
index 1f9a6071ba..03771dd3e0 100644
|
||||
--- a/libavcodec/vaapi_av1.c
|
||||
+++ b/libavcodec/vaapi_av1.c
|
||||
@@ -409,7 +409,7 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
|
||||
.tg_end = s->tg_end,
|
||||
};
|
||||
|
||||
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param,
|
||||
+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
|
||||
sizeof(VASliceParameterBufferAV1),
|
||||
buffer,
|
||||
size);
|
||||
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
|
||||
index ceac769c52..9344c21fd2 100644
|
||||
--- a/libavcodec/vaapi_decode.c
|
||||
+++ b/libavcodec/vaapi_decode.c
|
||||
@@ -62,6 +62,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
|
||||
int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
|
||||
VAAPIDecodePicture *pic,
|
||||
const void *params_data,
|
||||
+ int nb_params,
|
||||
size_t params_size,
|
||||
const void *slice_data,
|
||||
size_t slice_size)
|
||||
@@ -90,7 +91,7 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
|
||||
|
||||
vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context,
|
||||
VASliceParameterBufferType,
|
||||
- params_size, 1, (void*)params_data,
|
||||
+ params_size, nb_params, (void*)params_data,
|
||||
&pic->slice_buffers[index]);
|
||||
if (vas != VA_STATUS_SUCCESS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Failed to create slice "
|
||||
diff --git a/libavcodec/vaapi_decode.h b/libavcodec/vaapi_decode.h
|
||||
index 6beda14e52..702171e108 100644
|
||||
--- a/libavcodec/vaapi_decode.h
|
||||
+++ b/libavcodec/vaapi_decode.h
|
||||
@@ -73,6 +73,7 @@ int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
|
||||
int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
|
||||
VAAPIDecodePicture *pic,
|
||||
const void *params_data,
|
||||
+ int nb_params,
|
||||
size_t params_size,
|
||||
const void *slice_data,
|
||||
size_t slice_size);
|
||||
diff --git a/libavcodec/vaapi_mjpeg.c b/libavcodec/vaapi_mjpeg.c
|
||||
index 5b8d47bb2a..9557cf5f9b 100644
|
||||
--- a/libavcodec/vaapi_mjpeg.c
|
||||
+++ b/libavcodec/vaapi_mjpeg.c
|
||||
@@ -131,7 +131,7 @@ static int vaapi_mjpeg_decode_slice(AVCodecContext *avctx,
|
||||
sp.components[i].ac_table_selector = s->ac_index[i];
|
||||
}
|
||||
|
||||
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), buffer, size);
|
||||
+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), buffer, size);
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
|
||||
index eeb4e87321..171a742c7f 100644
|
||||
--- a/libavcodec/vaapi_mpeg2.c
|
||||
+++ b/libavcodec/vaapi_mpeg2.c
|
||||
@@ -162,7 +162,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
|
||||
};
|
||||
|
||||
err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
|
||||
- &slice_param, sizeof(slice_param),
|
||||
+ &slice_param, 1, sizeof(slice_param),
|
||||
buffer, size);
|
||||
if (err < 0) {
|
||||
ff_vaapi_decode_cancel(avctx, pic);
|
||||
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
|
||||
index 363b686e42..612de10cd7 100644
|
||||
--- a/libavcodec/vaapi_mpeg4.c
|
||||
+++ b/libavcodec/vaapi_mpeg4.c
|
||||
@@ -169,7 +169,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
|
||||
};
|
||||
|
||||
err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
|
||||
- &slice_param, sizeof(slice_param),
|
||||
+ &slice_param, 1, sizeof(slice_param),
|
||||
buffer, size);
|
||||
if (err < 0) {
|
||||
ff_vaapi_decode_cancel(avctx, pic);
|
||||
diff --git a/libavcodec/vaapi_vp8.c b/libavcodec/vaapi_vp8.c
|
||||
index 31137a45bd..66fdde1f39 100644
|
||||
--- a/libavcodec/vaapi_vp8.c
|
||||
+++ b/libavcodec/vaapi_vp8.c
|
||||
@@ -209,7 +209,7 @@ static int vaapi_vp8_decode_slice(AVCodecContext *avctx,
|
||||
for (i = 0; i < 8; i++)
|
||||
sp.partition_size[i+1] = s->coeff_partition_size[i];
|
||||
|
||||
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, sizeof(sp), data, data_size);
|
||||
+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &sp, 1, sizeof(sp), data, data_size);
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c
|
||||
index 9dc7d5e72b..ff11022db7 100644
|
||||
--- a/libavcodec/vaapi_vp9.c
|
||||
+++ b/libavcodec/vaapi_vp9.c
|
||||
@@ -158,7 +158,7 @@ static int vaapi_vp9_decode_slice(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
|
||||
- &slice_param, sizeof(slice_param),
|
||||
+ &slice_param, 1, sizeof(slice_param),
|
||||
buffer, size);
|
||||
if (err) {
|
||||
ff_vaapi_decode_cancel(avctx, pic);
|
||||
--
|
||||
2.45.1
|
||||
|
@ -0,0 +1,112 @@
|
||||
From 1740980b070897fd147b2d1a5259c9d7957d58a8 Mon Sep 17 00:00:00 2001
|
||||
From: David Rosca <nowrep@gmail.com>
|
||||
Date: Wed, 8 May 2024 09:11:13 +0200
|
||||
Subject: [PATCH 2/2] lavc/vaapi_av1: Avoid sending the same slice buffer
|
||||
multiple times
|
||||
|
||||
When there are multiple tiles in one slice buffer, use multiple slice
|
||||
params to avoid sending the same slice buffer multiple times and thus
|
||||
increasing the bitstream size the driver will need to upload to hw.
|
||||
|
||||
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
|
||||
Signed-off-by: David Rosca <nowrep@gmail.com>
|
||||
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
|
||||
(cherry picked from commit d2d911eb9a2fc6eb8d86b3ae025a56c1a2692fba)
|
||||
---
|
||||
libavcodec/vaapi_av1.c | 47 +++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 33 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c
|
||||
index 03771dd3e0..ea8dd4d93d 100644
|
||||
--- a/libavcodec/vaapi_av1.c
|
||||
+++ b/libavcodec/vaapi_av1.c
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "libavutil/frame.h"
|
||||
+#include "libavutil/mem.h"
|
||||
#include "hwaccel_internal.h"
|
||||
#include "vaapi_decode.h"
|
||||
#include "internal.h"
|
||||
@@ -42,6 +43,9 @@ typedef struct VAAPIAV1DecContext {
|
||||
*/
|
||||
VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES];
|
||||
AVFrame *tmp_frame;
|
||||
+
|
||||
+ int nb_slice_params;
|
||||
+ VASliceParameterBufferAV1 *slice_params;
|
||||
} VAAPIAV1DecContext;
|
||||
|
||||
static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf)
|
||||
@@ -97,6 +101,8 @@ static int vaapi_av1_decode_uninit(AVCodecContext *avctx)
|
||||
for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++)
|
||||
av_frame_free(&ctx->ref_tab[i].frame);
|
||||
|
||||
+ av_freep(&ctx->slice_params);
|
||||
+
|
||||
return ff_vaapi_decode_uninit(avctx);
|
||||
}
|
||||
|
||||
@@ -393,13 +399,24 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
|
||||
{
|
||||
const AV1DecContext *s = avctx->priv_data;
|
||||
VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;
|
||||
- VASliceParameterBufferAV1 slice_param;
|
||||
- int err = 0;
|
||||
+ VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
|
||||
+ int err, nb_params;
|
||||
+
|
||||
+ nb_params = s->tg_end - s->tg_start + 1;
|
||||
+ if (ctx->nb_slice_params < nb_params) {
|
||||
+ ctx->slice_params = av_realloc_array(ctx->slice_params,
|
||||
+ nb_params,
|
||||
+ sizeof(*ctx->slice_params));
|
||||
+ if (!ctx->slice_params) {
|
||||
+ ctx->nb_slice_params = 0;
|
||||
+ err = AVERROR(ENOMEM);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ ctx->nb_slice_params = nb_params;
|
||||
+ }
|
||||
|
||||
for (int i = s->tg_start; i <= s->tg_end; i++) {
|
||||
- memset(&slice_param, 0, sizeof(VASliceParameterBufferAV1));
|
||||
-
|
||||
- slice_param = (VASliceParameterBufferAV1) {
|
||||
+ ctx->slice_params[i - s->tg_start] = (VASliceParameterBufferAV1) {
|
||||
.slice_data_size = s->tile_group_info[i].tile_size,
|
||||
.slice_data_offset = s->tile_group_info[i].tile_offset,
|
||||
.slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
|
||||
@@ -408,18 +425,20 @@ static int vaapi_av1_decode_slice(AVCodecContext *avctx,
|
||||
.tg_start = s->tg_start,
|
||||
.tg_end = s->tg_end,
|
||||
};
|
||||
-
|
||||
- err = ff_vaapi_decode_make_slice_buffer(avctx, pic, &slice_param, 1,
|
||||
- sizeof(VASliceParameterBufferAV1),
|
||||
- buffer,
|
||||
- size);
|
||||
- if (err) {
|
||||
- ff_vaapi_decode_cancel(avctx, pic);
|
||||
- return err;
|
||||
- }
|
||||
}
|
||||
|
||||
+ err = ff_vaapi_decode_make_slice_buffer(avctx, pic, ctx->slice_params, nb_params,
|
||||
+ sizeof(VASliceParameterBufferAV1),
|
||||
+ buffer,
|
||||
+ size);
|
||||
+ if (err)
|
||||
+ goto fail;
|
||||
+
|
||||
return 0;
|
||||
+
|
||||
+fail:
|
||||
+ ff_vaapi_decode_cancel(avctx, pic);
|
||||
+ return err;
|
||||
}
|
||||
|
||||
const FFHWAccel ff_av1_vaapi_hwaccel = {
|
||||
--
|
||||
2.45.1
|
||||
|
@ -0,0 +1,473 @@
|
||||
## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review)
|
||||
aasc
|
||||
libfdk_aac # fdk-aac-free
|
||||
ac3
|
||||
acelp_kelvin
|
||||
adpcm_4xm
|
||||
adpcm_adx
|
||||
adpcm_afc
|
||||
adpcm_agm
|
||||
adpcm_aica
|
||||
adpcm_argo
|
||||
adpcm_ct
|
||||
adpcm_dtk
|
||||
adpcm_ea
|
||||
adpcm_ea_maxis_xa
|
||||
adpcm_ea_r1
|
||||
adpcm_ea_r2
|
||||
adpcm_ea_r3
|
||||
adpcm_ea_xas
|
||||
adpcm_g722
|
||||
adpcm_g726
|
||||
adpcm_g726le
|
||||
adpcm_ima_acorn
|
||||
adpcm_ima_alp
|
||||
adpcm_ima_amv
|
||||
adpcm_ima_apc
|
||||
adpcm_ima_apm
|
||||
adpcm_ima_cunning
|
||||
adpcm_ima_dat4
|
||||
adpcm_ima_dk3
|
||||
adpcm_ima_dk4
|
||||
adpcm_ima_ea_eacs
|
||||
adpcm_ima_ea_sead
|
||||
adpcm_ima_iss
|
||||
adpcm_ima_moflex
|
||||
adpcm_ima_mtf
|
||||
adpcm_ima_oki
|
||||
adpcm_ima_qt
|
||||
adpcm_ima_qt_at
|
||||
adpcm_ima_rad
|
||||
adpcm_ima_smjpeg
|
||||
adpcm_ima_ssi
|
||||
adpcm_ima_wav
|
||||
adpcm_ima_ws
|
||||
adpcm_ms
|
||||
adpcm_mtaf
|
||||
adpcm_psx
|
||||
adpcm_sbpro_2
|
||||
adpcm_sbpro_3
|
||||
adpcm_sbpro_4
|
||||
adpcm_swf
|
||||
adpcm_thp
|
||||
adpcm_thp_le
|
||||
adpcm_vima
|
||||
adpcm_xa
|
||||
adpcm_xmd
|
||||
adpcm_yamaha
|
||||
adpcm_zork
|
||||
alac
|
||||
alias_pix
|
||||
amrnb
|
||||
amrwb
|
||||
amv
|
||||
anm
|
||||
ansi # trivial
|
||||
anull
|
||||
apac
|
||||
ape
|
||||
apng # animated png
|
||||
arbc
|
||||
argo
|
||||
ass # trivial
|
||||
asv1
|
||||
asv2
|
||||
atrac1
|
||||
atrac3
|
||||
atrac3al
|
||||
atrac3p
|
||||
atrac3pal
|
||||
aura
|
||||
aura2
|
||||
av1 # libaom
|
||||
av1_qsv # libaom
|
||||
bethsoftvid # trivial
|
||||
bfi # trivial
|
||||
bink
|
||||
binkaudio_dct
|
||||
binkaudio_rdft
|
||||
bintext
|
||||
bitpacked # trivial
|
||||
bmp # trivial
|
||||
bmv_audio
|
||||
bmv_video
|
||||
bonk
|
||||
brender_pix
|
||||
c93
|
||||
cbd2_dpcm
|
||||
ccaption
|
||||
cdgraphics
|
||||
cdtoons
|
||||
cdxl
|
||||
cinepak
|
||||
clearvideo
|
||||
cljr
|
||||
cook
|
||||
cpia
|
||||
cscd
|
||||
cyuv
|
||||
dca
|
||||
dds
|
||||
derf_dpcm
|
||||
dfa
|
||||
dfpwm
|
||||
dirac # dirac
|
||||
dnxhd
|
||||
dolby_e
|
||||
dpx
|
||||
dsd_lsbf
|
||||
dsd_msbf
|
||||
dsicinaudio
|
||||
dsicinvideo
|
||||
dss_sp
|
||||
dvaudio
|
||||
dvbsub
|
||||
dvdsub
|
||||
dvvideo
|
||||
dxa
|
||||
dxtory
|
||||
eacmv
|
||||
eamad
|
||||
eatgq
|
||||
eatgv
|
||||
eatqi
|
||||
eightbps
|
||||
eightsvx_exp
|
||||
eightsvx_fib
|
||||
escape124
|
||||
escape130
|
||||
evrc
|
||||
exr # openEXR
|
||||
ffv1 # ffmpeg
|
||||
ffvhuff # ffmpeg
|
||||
ffwavesynth # pseudo
|
||||
fits
|
||||
flac # libFLAC
|
||||
flashsv
|
||||
flashsv2
|
||||
flic
|
||||
flv
|
||||
fmvc
|
||||
fourxm
|
||||
ftr # fdk-aac
|
||||
g723_1
|
||||
g729
|
||||
gdv
|
||||
gem
|
||||
gif # libpng
|
||||
gremlin_dpcm
|
||||
gsm # libgsm
|
||||
gsm_ms
|
||||
gsm_ms_at
|
||||
h261
|
||||
h263
|
||||
h263_v4l2m2m # hardware
|
||||
h263i
|
||||
h263p
|
||||
hap
|
||||
hca
|
||||
hcom
|
||||
hdr
|
||||
hnm4_video
|
||||
hq_hqa
|
||||
hqx
|
||||
huffyuv # trivial+zlib
|
||||
hymt # huffyuv-mt
|
||||
iac
|
||||
idcin
|
||||
idf
|
||||
iff_ilbm
|
||||
ilbc # ilbc
|
||||
imc
|
||||
indeo2
|
||||
indeo3
|
||||
indeo4
|
||||
indeo5
|
||||
interplay_acm
|
||||
interplay_dpcm
|
||||
interplay_video
|
||||
ipu
|
||||
jacosub
|
||||
jpeg2000 # openjpeg2
|
||||
jpegls
|
||||
jv
|
||||
kgv1
|
||||
kmvc
|
||||
lagarith
|
||||
libaribb24 # aribb24
|
||||
libaribcaption # libaribcaption
|
||||
libaom # libaom
|
||||
libaom_av1 # libaom
|
||||
libcodec2 # codec2
|
||||
libdav1d # av1
|
||||
libgsm # libgsm
|
||||
libgsm_ms # libgsm
|
||||
libilbc # ilbc
|
||||
libjxl # libjxl
|
||||
libopencore_amrnb # opencore-amr
|
||||
libopencore_amrwb # opencore-amr
|
||||
libopenh264 # openh264_dlopen
|
||||
libopenjpeg # openjpeg
|
||||
libopus # opus
|
||||
librsvg # librsvg
|
||||
libschroedinger # schroedinger
|
||||
libspeex # speex
|
||||
libvorbis # libvorbis
|
||||
libvpx_vp8 # libvpx
|
||||
libvpx_vp9 # libvpx
|
||||
libzvbi_teletext # zvbi
|
||||
loco
|
||||
lscr
|
||||
m101
|
||||
mace3
|
||||
mace6
|
||||
mdec
|
||||
media100
|
||||
metasound
|
||||
microdvd
|
||||
mimic
|
||||
misc4
|
||||
mjpeg # mjpegtools
|
||||
mjpeg_qsv # mjpegtools
|
||||
mjpegb
|
||||
mlp
|
||||
mmvideo
|
||||
motionpixels
|
||||
mp1 # twolame/lame
|
||||
mp1float # twolame/lame
|
||||
mp2 # twolame
|
||||
mp2float # twolame
|
||||
mp3 # lame
|
||||
mp3adu
|
||||
mp3adufloat
|
||||
mp3float # lame
|
||||
mp3on4
|
||||
mp3on4float
|
||||
mpc7
|
||||
mpc8
|
||||
mpeg1_v4l2m2m
|
||||
mpeg1video
|
||||
mpeg2_qsv
|
||||
mpeg2_v4l2m2m
|
||||
mpeg2video
|
||||
mpeg4
|
||||
mpeg4_v4l2m2m # hardware
|
||||
mpegvideo
|
||||
mpl2
|
||||
msa1
|
||||
mscc
|
||||
msmpeg4v1
|
||||
msmpeg4v2
|
||||
msmpeg4v3
|
||||
msnsiren
|
||||
msp2
|
||||
msrle
|
||||
mss1
|
||||
mss2
|
||||
msvideo1
|
||||
mszh
|
||||
mts2
|
||||
mv30
|
||||
mvc1
|
||||
mvc2
|
||||
mvdv
|
||||
mvha
|
||||
mwsc
|
||||
mxpeg
|
||||
nellymoser
|
||||
nuv
|
||||
on2avc
|
||||
opus # libopus
|
||||
paf_audio
|
||||
paf_video
|
||||
pam # trivial
|
||||
pbm # trivial
|
||||
pcm_alaw # trivial
|
||||
pcm_bluray
|
||||
pcm_dvd
|
||||
pcm_f16le # trivial
|
||||
pcm_f24le # trivial
|
||||
pcm_f32be # trivial
|
||||
pcm_f32le # trivial
|
||||
pcm_f64be # trivial
|
||||
pcm_f64le # trivial
|
||||
pcm_lxf # trivial
|
||||
pcm_mulaw # trivial
|
||||
pcm_s16be # trivial
|
||||
pcm_s16be_planar # trivial
|
||||
pcm_s16le # trivial
|
||||
pcm_s16le_planar # trivial
|
||||
pcm_s24be # trivial
|
||||
pcm_s24daud # trivial
|
||||
pcm_s24le # trivial
|
||||
pcm_s24le_planar # trivial
|
||||
pcm_s32be # trivial
|
||||
pcm_s32le # trivial
|
||||
pcm_s32le_planar # trivial
|
||||
pcm_s64be # trivial
|
||||
pcm_s64le # trivial
|
||||
pcm_s8 # trivial
|
||||
pcm_s8_planar # trivial
|
||||
pcm_sga # trivial
|
||||
pcm_u16be # trivial
|
||||
pcm_u16le # trivial
|
||||
pcm_u24be # trivial
|
||||
pcm_u24le # trivial
|
||||
pcm_u32be # trivial
|
||||
pcm_u32le # trivial
|
||||
pcm_u8 # trivial
|
||||
pcm_vidc # trivial
|
||||
pcx
|
||||
pfm # trivial
|
||||
pgm # trivial
|
||||
pgmyuv # trivial
|
||||
pgssub # mkvtoolnix
|
||||
pgx
|
||||
phm # trivial
|
||||
photocd
|
||||
pictor
|
||||
pjs
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
prosumer
|
||||
psd
|
||||
ptx
|
||||
qcelp
|
||||
qdm2
|
||||
qdmc
|
||||
qdraw
|
||||
qoa
|
||||
qoi
|
||||
qpeg
|
||||
qtrle
|
||||
r10k
|
||||
r210
|
||||
ra_144
|
||||
ra_288
|
||||
rasc
|
||||
rawvideo # trivial
|
||||
realtext
|
||||
rka
|
||||
rl2
|
||||
roq
|
||||
roq_dpcm
|
||||
rpza
|
||||
rscc
|
||||
rv10
|
||||
rv20
|
||||
s302m
|
||||
sami
|
||||
sanm
|
||||
sbc
|
||||
screenpresso
|
||||
sdx2_dpcm
|
||||
sgi # trivial
|
||||
sgirle # trivial
|
||||
shorten
|
||||
simbiosis_imx
|
||||
sipr
|
||||
siren
|
||||
smackaud
|
||||
smacker
|
||||
smc
|
||||
smvjpeg
|
||||
snow
|
||||
sol_dpcm
|
||||
sonic
|
||||
sp5x
|
||||
speedhq
|
||||
speex
|
||||
srgc
|
||||
srt # trivial
|
||||
ssa # trivial
|
||||
stl
|
||||
subrip
|
||||
subviewer
|
||||
subviewer1
|
||||
sunrast # trivial
|
||||
svq1
|
||||
svq3
|
||||
tak
|
||||
targa # trivial
|
||||
targa_y216
|
||||
tdsc
|
||||
text # trivial
|
||||
theora # libtheora
|
||||
thp
|
||||
tiertexseqvideo
|
||||
tiff # libtiff
|
||||
tmv
|
||||
truehd
|
||||
truemotion1
|
||||
truemotion2
|
||||
truemotion2rt
|
||||
truespeech
|
||||
tscc
|
||||
tscc2
|
||||
tta
|
||||
twinvq
|
||||
txd
|
||||
ulti
|
||||
utvideo
|
||||
v210 # trivial
|
||||
v210x # trivial
|
||||
v308 # trivial
|
||||
v408 # trivial
|
||||
v410 # trivial
|
||||
vb
|
||||
vble
|
||||
vcr1
|
||||
vmdaudio
|
||||
vmdvideo
|
||||
vmnc
|
||||
vnull
|
||||
vorbis # libvorbis
|
||||
vp3 # libav
|
||||
vp4 # libav
|
||||
vp5 # libav
|
||||
vp6 # libav
|
||||
vp6a # libav
|
||||
vp6f # libav
|
||||
vp7 # libav
|
||||
vp8 # libvpx
|
||||
vp8_qsv # libvpx
|
||||
vp8_v4l2m2m # libvpx
|
||||
vp9 # libvpx
|
||||
vp9_qsv # libvpx
|
||||
vp9_v4l2m2m # libvpx
|
||||
vplayer
|
||||
vqa
|
||||
vqc
|
||||
wady_dpcm
|
||||
wavarc
|
||||
wavpack
|
||||
wbmp
|
||||
wcmv
|
||||
webp # libwebp
|
||||
webvtt # trivial
|
||||
wmav1
|
||||
wmav2
|
||||
wmavoice
|
||||
wmv1
|
||||
wmv2
|
||||
wnv1
|
||||
wrapped_avframe # passthrough
|
||||
ws_snd1
|
||||
xan_dpcm
|
||||
xan_wc3
|
||||
xan_wc4
|
||||
xbin
|
||||
xbm # trivial
|
||||
xface
|
||||
xl
|
||||
xpm
|
||||
xsub
|
||||
xwd # xwd
|
||||
y41p # trivial
|
||||
ylc
|
||||
yop
|
||||
yuv4 # trivial
|
||||
zero12v
|
||||
zerocodec
|
||||
zlib # zlib
|
||||
zmbv # dosbox
|
@ -0,0 +1,208 @@
|
||||
## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review)
|
||||
a64multi
|
||||
a64multi5
|
||||
aac
|
||||
libfdk_aac # fdk-aac-free
|
||||
ac3
|
||||
adpcm_adx
|
||||
adpcm_argo
|
||||
adpcm_g722
|
||||
adpcm_g726
|
||||
adpcm_g726le
|
||||
adpcm_ima_alp
|
||||
adpcm_ima_amv
|
||||
adpcm_ima_apm
|
||||
adpcm_ima_qt
|
||||
adpcm_ima_ssi
|
||||
adpcm_ima_wav
|
||||
adpcm_ima_ws
|
||||
adpcm_ms
|
||||
adpcm_swf
|
||||
adpcm_yamaha
|
||||
alac
|
||||
alias_pix
|
||||
amv
|
||||
anull
|
||||
apng # libpng
|
||||
ass # trivial
|
||||
asv1
|
||||
asv2
|
||||
av1_amf
|
||||
av1_nvenc
|
||||
av1_qsv
|
||||
av1_vaapi
|
||||
bitpacked # trivial
|
||||
bmp # trivial
|
||||
cinepak
|
||||
cljr
|
||||
dca
|
||||
dfpwm
|
||||
dnxhd
|
||||
dpx
|
||||
dvbsub
|
||||
dvdsub
|
||||
dvvideo
|
||||
exr
|
||||
ffv1
|
||||
ffvhuff # trivial+zlib
|
||||
flac # libFLAC
|
||||
flashsv
|
||||
flashsv2
|
||||
flv
|
||||
g723_1
|
||||
gif # libpng
|
||||
h261
|
||||
h263
|
||||
h263_v4l2m2m # hardware
|
||||
h263p
|
||||
h264_amf # hardware
|
||||
h264_nvenc # hardware
|
||||
h264_qsv # hardware
|
||||
h264_v4l2m2m # hardware
|
||||
h264_vaapi # hardware
|
||||
hap
|
||||
hdr
|
||||
hevc_amf # hardware
|
||||
hevc_nvenc # hardware
|
||||
hevc_qsv # hardware
|
||||
hevc_v4l2m2m # hardware
|
||||
hevc_vaapi # hardware
|
||||
huffyuv # trivial+zlib
|
||||
ilbc # ilbc
|
||||
jpeg2000
|
||||
jpegls
|
||||
libaom
|
||||
libaom_av1 # libaom
|
||||
libcodec2 # codec2
|
||||
libgsm # libgsm
|
||||
libgsm_ms # libgsm
|
||||
libilbc # ilbc
|
||||
libjxl # libjxl
|
||||
libmp3lame # lame
|
||||
libopencore_amrnb
|
||||
libopenh264 # openh264_dlopen
|
||||
libopenjpeg # openjpeg
|
||||
libopus # opus
|
||||
librav1e # rav1e
|
||||
libspeex # speex
|
||||
libsvtav1
|
||||
libtheora # libtheora
|
||||
libtwolame # twolame
|
||||
libvo_amrwbenc
|
||||
libvorbis # libvorbis
|
||||
libvpx_vp8 # libvpx
|
||||
libvpx_vp9 # libvpx
|
||||
libwebp # libwebp
|
||||
libwebp_anim # libwebp
|
||||
libxvid # xvidcore
|
||||
mjpeg # mjpegtools
|
||||
mjpeg_qsv # mjpegtools
|
||||
mjpeg_vaapi # mjpegtools
|
||||
mlp
|
||||
mp2 # twolame
|
||||
mp2fixed # twolame
|
||||
mpeg1video
|
||||
mpeg2_qsv
|
||||
mpeg2_vaapi
|
||||
mpeg2video
|
||||
mpeg4
|
||||
mpeg4_v4l2m2m # hardware
|
||||
msmpeg4v2
|
||||
msmpeg4v3
|
||||
msvideo1
|
||||
nellymoser
|
||||
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
|
||||
phm # trivial
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
qoi
|
||||
qtrle
|
||||
r10k # trivial
|
||||
r210 # trivial
|
||||
ra_144
|
||||
rawvideo # trivial
|
||||
roq
|
||||
roq_dpcm
|
||||
rpza
|
||||
rv10
|
||||
rv20
|
||||
s302m
|
||||
sbc
|
||||
sgi # trivial
|
||||
smc
|
||||
snow
|
||||
sonic
|
||||
sonic_ls
|
||||
speedhq
|
||||
srt # trivial
|
||||
ssa # trivial
|
||||
subrip # trivial
|
||||
sunrast # trivial
|
||||
svq1
|
||||
targa # trivial
|
||||
text # trivial
|
||||
tiff # libtiff
|
||||
truehd
|
||||
tta
|
||||
ttml
|
||||
utvideo
|
||||
v210 # trivial
|
||||
v308 # trivial
|
||||
v408 # trivial
|
||||
v410 # trivial
|
||||
vc1_qsv # hardware
|
||||
vc1_v4l2m2m # hardware
|
||||
vc2 # dirac
|
||||
vnull
|
||||
vorbis # libvorbis
|
||||
vp8_qsv # libvpx
|
||||
vp8_v4l2m2m # libvpx
|
||||
vp8_vaapi # libvpx
|
||||
vp9_qsv # libvpx
|
||||
vp9_vaapi # libvpx
|
||||
wavpack
|
||||
wbmp
|
||||
webvtt # trivial
|
||||
wmav1
|
||||
wmav2
|
||||
wmv1
|
||||
wmv2
|
||||
wrapped_avframe # passthrough
|
||||
xbm # (X11)
|
||||
xface
|
||||
xsub
|
||||
xwd # xwd
|
||||
y41p # trivial
|
||||
yuv4 # trivial
|
||||
zlib # zlib
|
||||
zmbv # dosbox
|
@ -0,0 +1,11 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmatZQYYHGZmbXBlZy1k
|
||||
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYIlcIAKF1VWqnhhKkBHSxEnH8ipUH
|
||||
nlJmPitKaJTwgtAtHGH8DL4XlgUwxfws9YohJ6V2fz/LjD+4rcU1BB9lMKNTaEW3
|
||||
g27lIRHXC571OGgBKJFadhsbULtUu9oUOIcqS28zOl3fsok/G7NVd3ajkpiRUPhu
|
||||
LRXUXNbCIwtXbIdS0yECpiRcHMj/hX6nkY3yHrmWXAts/TtmIQyaNTbnC4ervA1s
|
||||
Ijc4cY/unb6OD9DpmC6DznVykyfzc2GjjCiNxRXrljp+MaZ7jBEMwjXfOIATwBwj
|
||||
gCN+N6nlxc5e3gMOGcAJy93iD9HpbgVDAn6S6jnB/z5+Tyv6ZeP+sytsgOCNjlQ=
|
||||
=R372
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,27 @@
|
||||
From: Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
fdk-aac-free-devel is GPL compatible
|
||||
|
||||
See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112
|
||||
|
||||
Index: ffmpeg-7.0/configure
|
||||
===================================================================
|
||||
--- ffmpeg-7.0.orig/configure 2022-02-09 20:07:49.490888877 +0100
|
||||
+++ ffmpeg-7.0/configure 2022-02-09 20:08:30.102854308 +0100
|
||||
@@ -1872,7 +1872,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||
|
||||
EXTERNAL_LIBRARY_NONFREE_LIST="
|
||||
decklink
|
||||
- libfdk_aac
|
||||
libtls
|
||||
"
|
||||
|
||||
@@ -1912,6 +1911,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libcodec2
|
||||
libdav1d
|
||||
libdc1394
|
||||
+ libfdk_aac
|
||||
libflite
|
||||
libfontconfig
|
||||
libfreetype
|
||||
|
@ -0,0 +1,46 @@
|
||||
From d32aacab65a322b66d6a1b48f6cdb03e42bde0f9 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Liberato <liberato@chromium.org>
|
||||
Date: Wed, 7 Jul 2021 19:01:22 -0700
|
||||
Subject: [PATCH] Add av_stream_get_first_dts for Chromium
|
||||
|
||||
---
|
||||
libavformat/avformat.h | 4 ++++
|
||||
libavformat/utils.c | 7 +++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
|
||||
index 1916aa2dc5..e6682849fa 100644
|
||||
--- a/libavformat/avformat.h
|
||||
+++ b/libavformat/avformat.h
|
||||
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup {
|
||||
|
||||
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
|
||||
|
||||
+// 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
|
||||
|
||||
/**
|
||||
diff --git a/libavformat/utils.c b/libavformat/utils.c
|
||||
index cf4d68bff9..7d750abf88 100644
|
||||
--- a/libavformat/utils.c
|
||||
+++ b/libavformat/utils.c
|
||||
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void)
|
||||
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
|
||||
}
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st)
|
||||
+{
|
||||
+ return cffstream(st)->first_dts;
|
||||
+}
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
/* an arbitrarily chosen "sane" max packet size -- 50M */
|
||||
#define SANE_CHUNK_SIZE (50000000)
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,58 @@
|
||||
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 | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: ffmpeg-7.0/libavformat/matroskaenc.c
|
||||
===================================================================
|
||||
--- ffmpeg-7.0.orig/libavformat/matroskaenc.c
|
||||
+++ ffmpeg-7.0/libavformat/matroskaenc.c
|
||||
@@ -3540,16 +3540,25 @@ static int mkv_query_codec(enum AVCodecI
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#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
|
||||
+
|
||||
const FFOutputFormat ff_matroska_muxer = {
|
||||
.p.name = "matroska",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
|
||||
.p.mime_type = "video/x-matroska",
|
||||
.p.extensions = "mkv",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||
- .p.video_codec = CONFIG_LIBX264_ENCODER ?
|
||||
- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
|
||||
+ .p.audio_codec = PREFAUDIO,
|
||||
+ .p.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,
|
||||
@@ -3617,8 +3626,7 @@ const FFOutputFormat ff_matroska_audio_m
|
||||
.p.mime_type = "audio/x-matroska",
|
||||
.p.extensions = "mka",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||
+ .p.audio_codec = PREFAUDIO,
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.init = mkv_init,
|
||||
.deinit = mkv_deinit,
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# shellcheck disable=2181
|
||||
|
||||
export LC_COLLATE="C.UTF-8"
|
||||
|
||||
FF_PKGNAME="ffmpeg"
|
||||
FF_PKGNAME_SUFFIX="-free"
|
||||
FF_VERSION="$(rpmspec -P ./*.spec | grep ^Version | sed -e 's/Version:[ ]*//g')"
|
||||
FF_TARBALL_URL="https://ffmpeg.org/releases/${FF_PKGNAME}-${FF_VERSION}.tar.xz"
|
||||
FF_TARBALL="$(basename "${FF_TARBALL_URL}")"
|
||||
FF_GPG_ARMOR_FILE="${FF_TARBALL}.asc"
|
||||
FF_PKG_DIR="$(pwd)"
|
||||
FF_KEYRING="${FF_PKG_DIR}/ffmpeg.keyring"
|
||||
FF_TMPDIR=$(mktemp --tmpdir -d ffmpeg-XXXXXXXX)
|
||||
FF_PATH="${FF_TMPDIR}/${FF_PKGNAME}-${FF_VERSION}"
|
||||
|
||||
cleanup_tmpdir() {
|
||||
# shellcheck disable=2164
|
||||
popd 2>/dev/null
|
||||
rm -rf "${FF_TMPDIR}"
|
||||
}
|
||||
trap cleanup_tmpdir SIGINT
|
||||
|
||||
cleanup_and_exit()
|
||||
{
|
||||
cleanup_tmpdir
|
||||
|
||||
if test "$1" = 0 -o -z "$1"; then
|
||||
exit 0
|
||||
else
|
||||
# shellcheck disable=2086
|
||||
exit ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ! -w "${FF_TARBALL}" ]]; then
|
||||
echo ">>> Downloading tarball"
|
||||
wget "${FF_TARBALL_URL}"
|
||||
fi
|
||||
if [[ ! -w "${FF_TARBALL}.asc" ]]; then
|
||||
echo ">>> Downloading signature"
|
||||
wget "${FF_TARBALL_URL}.asc"
|
||||
fi
|
||||
|
||||
echo ">>> Verifying ${FF_TARBALL} GPG signature"
|
||||
gpgv2 --quiet --keyring "${FF_KEYRING}" "${FF_GPG_ARMOR_FILE}" "${FF_TARBALL}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: GPG signature verification failed"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
echo
|
||||
|
||||
echo ">>> Unpacking ${FF_TARBALL}"
|
||||
|
||||
tar -xf "${FF_TARBALL}" -C "${FF_TMPDIR}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to unpack ${FF_TARBALL}"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -r ffmpeg_free_sources ]]; then
|
||||
echo "ERROR: ffmpeg_free_sources doesn't exist!"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
readarray -t keepfiles < ffmpeg_free_sources
|
||||
|
||||
pushd "${FF_PATH}" || cleanup_and_exit 1
|
||||
|
||||
echo
|
||||
echo ">>> Cleaning up sources for new tarball ..."
|
||||
|
||||
# Get file list from ffmpeg
|
||||
mapfile -d '' filelist < <(find ./ -type f -printf '%P\0')
|
||||
|
||||
# Sort arrays
|
||||
readarray -t keepfiles_sorted < <(printf '%s\0' "${keepfiles[@]}" | sort -z | xargs -0n1)
|
||||
readarray -t filelist_sorted < <(printf '%s\0' "${filelist[@]}" | sort -z | xargs -0n1)
|
||||
|
||||
# Compare arrays and remove files which are left over
|
||||
comm -2 -3 -z <(printf '%s\0' "${filelist_sorted[@]}") <(printf '%s\0' "${keepfiles_sorted[@]}") | xargs -0 rm -f
|
||||
|
||||
readarray -t removed_files < <(comm -1 -3 -z <(printf '%s\0' "${filelist_sorted[@]}") <(printf '%s\0' "${keepfiles_sorted[@]}") | xargs -0n1)
|
||||
if [[ "${#removed_files[@]}" -ge 1 ]]; then
|
||||
if [[ "${#removed_files[@]}" -eq 1 ]] && [[ -z "${removed_files[0]}" ]]; then
|
||||
echo "... done"
|
||||
else
|
||||
echo "File not in upstream tarball anymore (please cleanup 'ffmpeg_free_sources'):"
|
||||
for f in "${removed_files[@]}"; do
|
||||
if [[ -z "${f}" ]]; then
|
||||
continue
|
||||
fi
|
||||
echo " * ${f}"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
||||
popd || cleanup_and_exit 1 # /FF_PATH
|
||||
|
||||
pushd "${FF_TMPDIR}" || cleanup_and_exit 1
|
||||
|
||||
echo ">>> Create new tarball ${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz ..."
|
||||
tar -cJf "${FF_PKG_DIR}/${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz" "${FF_PKGNAME}-${FF_VERSION}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Creating tarball failed"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
popd || cleanup_and_exit 1 # /FF_TMPDIR
|
||||
|
||||
du -sh "${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz"
|
||||
echo
|
||||
|
||||
cleanup_and_exit 0
|
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# shellcheck disable=2181
|
||||
|
||||
export LC_COLLATE="C.UTF-8"
|
||||
|
||||
cleanup_and_exit()
|
||||
{
|
||||
if test "$1" = 0 -o -z "$1"; then
|
||||
exit 0
|
||||
else
|
||||
# shellcheck disable=2086
|
||||
exit ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
echo ">>> Collect information from ${1}"
|
||||
build_log="$(readlink -f "${1}")"
|
||||
if [[ -z "${build_log}" ]] || [[ ! -r "${build_log}" ]]; then
|
||||
echo "Build log doesn't exist: %{build_log}"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
asm_files="$(grep "^gcc.*\.c$" "${build_log}" | awk 'NF>1{print $NF}' | sort)"
|
||||
c_files="$(grep "^nasm.*\.asm$" "${build_log}" | awk 'NF>1{print $NF}' | sort)"
|
||||
|
||||
# shellcheck disable=2206
|
||||
new_sources=(${asm_files}
|
||||
${c_files})
|
||||
|
||||
# Sort arrays
|
||||
readarray -t new_sources_sorted < <(printf '%s\0' "${new_sources[@]}" | sort -z | xargs -0n1)
|
||||
|
||||
# Create a backup for a diff
|
||||
cp -a ffmpeg_free_sources ffmpeg_free_sources.orig
|
||||
cp -a ffmpeg_free_sources ffmpeg_free_sources.new
|
||||
printf "%s\n" "${new_sources_sorted[@]}" >> ffmpeg_free_sources.new
|
||||
# Update ffmpeg_free_sources
|
||||
echo ">>> Updating ffmpeg_free_sources"
|
||||
sort < ffmpeg_free_sources.new | uniq | sed '/^$/d' > ffmpeg_free_sources
|
||||
echo ">>> Differences in file list"
|
||||
diff -u ffmpeg_free_sources.orig ffmpeg_free_sources
|
||||
rm -f ffmpeg_free_sources.new
|
||||
|
||||
cleanup_and_exit 0
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue