From 80880a5e8c196bd7cb067b1c2690f6c498755119c46d2fd85a8c9793c4372072 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 17 Jun 2020 12:22:47 +0000 Subject: [PATCH 01/13] add note to self on prefer-dav1d.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=121 --- ffmpeg-prefer-dav1d-for-playback.patch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffmpeg-prefer-dav1d-for-playback.patch b/ffmpeg-prefer-dav1d-for-playback.patch index 57fa6f3..b5bd0e3 100644 --- a/ffmpeg-prefer-dav1d-for-playback.patch +++ b/ffmpeg-prefer-dav1d-for-playback.patch @@ -1,3 +1,7 @@ +16Jun2020/22:55 < zaitor:#opensuse-factory> fyi, when you or someone else bumps +ffmpeg to 4.3 release, the prefer-dav1d.patch should be dropped, upstream +solved it in a more elegant way than that patch + Index: ffmpeg-4.2.1/libavcodec/allcodecs.c =================================================================== --- ffmpeg-4.2.1.orig/libavcodec/allcodecs.c From d9e05c28517e3e6da0435a4540c9eade491000d127c506ebc62e2ff68f349909 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 17 Jun 2020 16:37:53 +0000 Subject: [PATCH 02/13] - Update to release 4.3 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=122 --- ...5159bc13da374b83f5627879c607acce180b.patch | 32 - ffmpeg-4.2.3.tar.xz | 3 - ffmpeg-4.2.3.tar.xz.asc | 11 - ffmpeg-4.3.tar.xz | 3 + ffmpeg-4.3.tar.xz.asc | 11 + ffmpeg-4.changes | 19 + ffmpeg-4.spec | 21 +- ffmpeg-codec-choice.diff | 14 +- ffmpeg-prefer-dav1d-for-playback.patch | 23 - ...4_swscale_fix_altivec_vsx_recent_gcc.patch | 50 - ...scale_replace_illegal_vector_keyword.patch | 1360 ----------------- 11 files changed, 47 insertions(+), 1500 deletions(-) delete mode 100644 929e5159bc13da374b83f5627879c607acce180b.patch delete mode 100644 ffmpeg-4.2.3.tar.xz delete mode 100644 ffmpeg-4.2.3.tar.xz.asc create mode 100644 ffmpeg-4.3.tar.xz create mode 100644 ffmpeg-4.3.tar.xz.asc delete mode 100644 ffmpeg-prefer-dav1d-for-playback.patch delete mode 100644 ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch delete mode 100644 ffmpeg4_swscale_replace_illegal_vector_keyword.patch diff --git a/929e5159bc13da374b83f5627879c607acce180b.patch b/929e5159bc13da374b83f5627879c607acce180b.patch deleted file mode 100644 index f343ea4..0000000 --- a/929e5159bc13da374b83f5627879c607acce180b.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 929e5159bc13da374b83f5627879c607acce180b Mon Sep 17 00:00:00 2001 -From: Gilles Bouthenot -Date: Wed, 8 Jan 2020 19:47:55 +0100 -Subject: [PATCH] avformat/id3v2enc: fix bad ID3v2 tag length - ---- - libavformat/id3v2enc.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -Index: ffmpeg-4.2.1/libavformat/id3v2enc.c -=================================================================== ---- ffmpeg-4.2.1.orig/libavformat/id3v2enc.c -+++ ffmpeg-4.2.1/libavformat/id3v2enc.c -@@ -268,15 +268,15 @@ static int write_ctoc(AVFormatContext *s - if ((ret = avio_open_dyn_buf(&dyn_bc)) < 0) - goto fail; - -- id3->len += avio_put_str(dyn_bc, "toc"); -+ avio_put_str(dyn_bc, "toc"); - avio_w8(dyn_bc, 0x03); - avio_w8(dyn_bc, s->nb_chapters); - for (int i = 0; i < s->nb_chapters; i++) { - snprintf(name, 122, "ch%d", i); -- id3->len += avio_put_str(dyn_bc, name); -+ avio_put_str(dyn_bc, name); - } - len = avio_close_dyn_buf(dyn_bc, &dyn_buf); -- id3->len += 16 + ID3v2_HEADER_SIZE; -+ id3->len += len + ID3v2_HEADER_SIZE; - - avio_wb32(s->pb, MKBETAG('C', 'T', 'O', 'C')); - avio_wb32(s->pb, len); diff --git a/ffmpeg-4.2.3.tar.xz b/ffmpeg-4.2.3.tar.xz deleted file mode 100644 index 1b6e144..0000000 --- a/ffmpeg-4.2.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9df6c90aed1337634c1fb026fb01c154c29c82a64ea71291ff2da9aacb9aad31 -size 9101192 diff --git a/ffmpeg-4.2.3.tar.xz.asc b/ffmpeg-4.2.3.tar.xz.asc deleted file mode 100644 index 0e497f7..0000000 --- a/ffmpeg-4.2.3.tar.xz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQEcBAABCAAGBQJexrUWAAoJELQyLwTWdljYzyUIAKCrYZuodL55ImESh1AQsoGc -Ju/is8LniYbxakom+fQCiEhg/TpVkaOVssawGexeIaJ+idauS+W2NGMsBVLB4dGg -YhZJfUmYkapXAU4KTlUO62JDazOGqFgMtyTCtVnvo6mF5hwcJsELykQs1fj1ao38 -5LEuW7n1rwB57P6y2wJYScKtQVJjsEONv6a2wHdzSxN461SFNzlPPTowAzDR3Dyu -KPV0n6OEfAinC5ZyzT/P6r733F/JChKbiMrkJmesR1wt/ZLI2MtItQxJX3ylx8B8 -Z0UsJLcFgoQVSJbWMneMizjrYeBLRjHtRZwQlKj51vlc6kr9UCD3wh/SMoIoc5A= -=OK3T ------END PGP SIGNATURE----- diff --git a/ffmpeg-4.3.tar.xz b/ffmpeg-4.3.tar.xz new file mode 100644 index 0000000..6d5f2a2 --- /dev/null +++ b/ffmpeg-4.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d0ad06484f44bcb97eba5e93c40bcb893890f9f64aeb43e46cd9bb4cbd6795d +size 9378360 diff --git a/ffmpeg-4.3.tar.xz.asc b/ffmpeg-4.3.tar.xz.asc new file mode 100644 index 0000000..1f0173d --- /dev/null +++ b/ffmpeg-4.3.tar.xz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAl7nxeAYHGZmbXBlZy1k +ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYJecH/3uHwKTAMgNjUAbNE1uF/Vw7 +aoVaQrNP2faDLheLtmQ0YePDeO2jUhSUmbWylvzN2GFw1CxAXpo0LL2VjdP/JSWv +OFBxz5zjsehJNLIBvrp0yoAroQY/V5UExfsrggfr3Va0vnC/Sa3h0Kekg5Z4JHaY +7axHaQMy77a8VSr7fJjb9EWwiNKJgpJeBN/jcZ/Go8nWawIqFYOkzWA3BLwWkrNF +EH7Fpb0Al7C0mvNlYImFdWWzvlfQ0FJi/1+brrh8UIfOvFJu/eW5vhGEVYb3q0hR +/bmzcXCVQYym6qfVB/7EEijfezMBiFm8ax1+xaOEaY8cJAkjbFTfAHZod3Re6dU= +=1Fy2 +-----END PGP SIGNATURE----- diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index 72cd17f..fd5c9b4 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Jun 17 16:32:04 UTC 2020 - Jan Engelhardt + +- Update to release 4.3 + * A plethora of new video filters + * Intel QSV-accelerated VP9 decoding + * VDPAU VP9 hwaccel + * QSV-accelerated VP9 encoding + * AV1 frame merge bitstream filter + * AV1 Annex B demuxer + * Expanded styling support for 3GPP Timed Text Subtitles + * Support for muxing PCM and PGS in M2TS +- Drop ffmpeg-prefer-dav1d-for-playback.patch + (solved differently) +- Drop ffmpeg4_swscale_replace_illegal_vector_keyword.patch, + ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch, + 929e5159bc13da374b83f5627879c607acce180b.patch + (merged) + ------------------------------------------------------------------- Fri Jun 5 16:21:42 UTC 2020 - Bjørn Lie diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 5ee01e3..5cfb467 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -92,7 +92,7 @@ %define _major_version 4 %define _major_expected 5 Name: ffmpeg-4 -Version: 4.2.3 +Version: 4.3 Release: 0 Summary: Library for working with various multimedia formats License: GPL-3.0-or-later @@ -107,17 +107,10 @@ Source3: ffmpeg-4-rpmlintrc Source4: enable_decoders Source5: enable_encoders Source99: baselibs.conf -Patch2: ffmpeg-arm6l.diff -Patch3: ffmpeg-new-coder-errors.diff -Patch4: ffmpeg-codec-choice.diff -Patch5: ffmpeg-prefer-dav1d-for-playback.patch -Patch6: ffmpeg-4.2-dlopen-fdk_aac.patch -# pending review upstream ML and issue#7861 -# http://ffmpeg.org/pipermail/ffmpeg-devel/2019-August/247759.html -# https://trac.ffmpeg.org/ticket/7861 -Patch7: ffmpeg4_swscale_replace_illegal_vector_keyword.patch -Patch8: ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch -Patch9: 929e5159bc13da374b83f5627879c607acce180b.patch +Patch1: ffmpeg-arm6l.diff +Patch2: ffmpeg-new-coder-errors.diff +Patch3: ffmpeg-codec-choice.diff +Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel @@ -205,7 +198,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sleX_version} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -682,7 +675,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sleX_version} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif diff --git a/ffmpeg-codec-choice.diff b/ffmpeg-codec-choice.diff index d318b1b..269fa63 100644 --- a/ffmpeg-codec-choice.diff +++ b/ffmpeg-codec-choice.diff @@ -11,11 +11,11 @@ reduced codec selection list. libavformat/matroskaenc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) -Index: ffmpeg-4.2/libavformat/matroskaenc.c +Index: ffmpeg-4.3/libavformat/matroskaenc.c =================================================================== ---- ffmpeg-4.2.orig/libavformat/matroskaenc.c -+++ ffmpeg-4.2/libavformat/matroskaenc.c -@@ -2798,16 +2798,24 @@ static const AVClass matroska_class = { +--- ffmpeg-4.3.orig/libavformat/matroskaenc.c ++++ ffmpeg-4.3/libavformat/matroskaenc.c +@@ -2805,16 +2805,24 @@ static const AVClass matroska_class = { .version = LIBAVUTIL_VERSION_INT, }; @@ -42,9 +42,9 @@ Index: ffmpeg-4.2/libavformat/matroskaenc.c + CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \ + AV_CODEC_ID_THEORA, .init = mkv_init, + .deinit = mkv_deinit, .write_header = mkv_write_header, - .write_packet = mkv_write_flush_packet, -@@ -2867,8 +2875,7 @@ AVOutputFormat ff_matroska_audio_muxer = +@@ -2876,8 +2884,7 @@ AVOutputFormat ff_matroska_audio_muxer = .mime_type = "audio/x-matroska", .extensions = "mka", .priv_data_size = sizeof(MatroskaMuxContext), @@ -53,4 +53,4 @@ Index: ffmpeg-4.2/libavformat/matroskaenc.c + .audio_codec = PREFAUDIO, .video_codec = AV_CODEC_ID_NONE, .init = mkv_init, - .write_header = mkv_write_header, + .deinit = mkv_deinit, diff --git a/ffmpeg-prefer-dav1d-for-playback.patch b/ffmpeg-prefer-dav1d-for-playback.patch deleted file mode 100644 index b5bd0e3..0000000 --- a/ffmpeg-prefer-dav1d-for-playback.patch +++ /dev/null @@ -1,23 +0,0 @@ -16Jun2020/22:55 < zaitor:#opensuse-factory> fyi, when you or someone else bumps -ffmpeg to 4.3 release, the prefer-dav1d.patch should be dropped, upstream -solved it in a more elegant way than that patch - -Index: ffmpeg-4.2.1/libavcodec/allcodecs.c -=================================================================== ---- ffmpeg-4.2.1.orig/libavcodec/allcodecs.c -+++ ffmpeg-4.2.1/libavcodec/allcodecs.c -@@ -679,13 +679,13 @@ extern AVCodec ff_pcm_mulaw_at_encoder; - extern AVCodec ff_pcm_mulaw_at_decoder; - extern AVCodec ff_qdmc_at_decoder; - extern AVCodec ff_qdm2_at_decoder; -+extern AVCodec ff_libdav1d_decoder; - extern AVCodec ff_libaom_av1_decoder; - extern AVCodec ff_libaom_av1_encoder; - extern AVCodec ff_libaribb24_decoder; - extern AVCodec ff_libcelt_decoder; - extern AVCodec ff_libcodec2_encoder; - extern AVCodec ff_libcodec2_decoder; --extern AVCodec ff_libdav1d_decoder; - extern AVCodec ff_libdavs2_decoder; - extern AVCodec ff_libfdk_aac_encoder; - extern AVCodec ff_libfdk_aac_decoder; diff --git a/ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch b/ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch deleted file mode 100644 index 613d32d..0000000 --- a/ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch +++ /dev/null @@ -1,50 +0,0 @@ -From daniel at octaforge.org Tue Aug 6 18:55:37 2019 -From: daniel at octaforge.org (Daniel Kolesa) -Date: Tue, 6 Aug 2019 17:55:37 +0200 -Subject: [FFmpeg-devel] [PATCH 2/2] swscale: Fix AltiVec/VSX build with - recent GCC -In-Reply-To: <20190806155537.25535-1-daniel@octaforge.org> -References: <20190806155537.25535-1-daniel@octaforge.org> -Message-ID: <20190806155537.25535-3-daniel@octaforge.org> - -The argument to vec_splat_u16 must be a literal. By making the -function always inline and marking the arguments const, gcc can -turn those into literals, and avoid build errors like: - -swscale_vsx.c:165:53: error: argument 1 must be a 5-bit signed literal - -Signed-off-by: Daniel Kolesa ---- - libswscale/ppc/swscale_vsx.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -Index: ffmpeg-4.2/libswscale/ppc/swscale_vsx.c -=================================================================== ---- ffmpeg-4.2.orig/libswscale/ppc/swscale_vsx.c -+++ ffmpeg-4.2/libswscale/ppc/swscale_vsx.c -@@ -154,8 +154,10 @@ static void yuv2plane1_nbps_u(const int1 - } - } - --static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, -- int big_endian, int output_bits) -+static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src, -+ uint16_t *dest, int dstW, -+ const int big_endian, -+ const int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; - const int shift = 15 - output_bits; -@@ -273,8 +275,10 @@ static void yuv2plane1_16_u(const int32_ - } - } - --static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, -- int big_endian, int output_bits) -+static av_always_inline void yuv2plane1_16_vsx(const int32_t *src, -+ uint16_t *dest, int dstW, -+ const int big_endian, -+ int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; - const int shift = 3; diff --git a/ffmpeg4_swscale_replace_illegal_vector_keyword.patch b/ffmpeg4_swscale_replace_illegal_vector_keyword.patch deleted file mode 100644 index 35a9e0a..0000000 --- a/ffmpeg4_swscale_replace_illegal_vector_keyword.patch +++ /dev/null @@ -1,1360 +0,0 @@ -From daniel at octaforge.org Tue Aug 6 18:55:36 2019 -From: daniel at octaforge.org (Daniel Kolesa) -Date: Tue, 6 Aug 2019 17:55:36 +0200 -Subject: [FFmpeg-devel] [PATCH 1/2] swscale: Replace illegal vector keyword - usage in altivec code -In-Reply-To: <20190806155537.25535-1-daniel@octaforge.org> -References: <20190806155537.25535-1-daniel@octaforge.org> -Message-ID: <20190806155537.25535-2-daniel@octaforge.org> - -While this technically compiles in current ffmpeg, this is only -because ffmpeg is compiled in strict ISO C mode, which disables -the builtin 'vector' keyword for AltiVec/VSX. Instead this gets -replaced with a macro inside altivec.h, which defines vector to -be actually __vector, which accepts random types. - -Normally, the vector keyword should be used only with plain -scalar non-typedef types, such as unsigned int. But we have the -vec_(s|u)(8|16|32) macros, which can be used in a portable manner, -in util_altivec.h in libavutil. - -This is also consistent with other AltiVec/VSX code elsewhere in -the tree. - -Signed-off-by: Daniel Kolesa ---- - libswscale/ppc/swscale_altivec.c | 36 - - libswscale/ppc/swscale_vsx.c | 882 +++++++++++++++++++-------------------- - 2 files changed, 459 insertions(+), 459 deletions(-) - -Index: ffmpeg-4.2.1/libswscale/ppc/swscale_altivec.c -=================================================================== ---- ffmpeg-4.2.1.orig/libswscale/ppc/swscale_altivec.c -+++ ffmpeg-4.2.1/libswscale/ppc/swscale_altivec.c -@@ -153,13 +153,13 @@ static void yuv2plane1_float_altivec(con - const int add = (1 << (shift - 1)); - const int clip = (1 << 16) - 1; - const float fmult = 1.0f / 65535.0f; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) vec_splat_u32(shift); -- const vector uint32_t vlargest = (vector uint32_t) {clip, clip, clip, clip}; -- const vector float vmul = (vector float) {fmult, fmult, fmult, fmult}; -- const vector float vzero = (vector float) {0, 0, 0, 0}; -- vector uint32_t v; -- vector float vd; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) vec_splat_u32(shift); -+ const vec_u32 vlargest = (vec_u32) {clip, clip, clip, clip}; -+ const vec_f vmul = (vec_f) {fmult, fmult, fmult, fmult}; -+ const vec_f vzero = (vec_f) {0, 0, 0, 0}; -+ vec_u32 v; -+ vec_f vd; - int i; - - yuv2plane1_float_u(src, dest, dst_u, 0); -@@ -186,15 +186,15 @@ static void yuv2plane1_float_bswap_altiv - const int add = (1 << (shift - 1)); - const int clip = (1 << 16) - 1; - const float fmult = 1.0f / 65535.0f; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) vec_splat_u32(shift); -- const vector uint32_t vlargest = (vector uint32_t) {clip, clip, clip, clip}; -- const vector float vmul = (vector float) {fmult, fmult, fmult, fmult}; -- const vector float vzero = (vector float) {0, 0, 0, 0}; -- const vector uint32_t vswapbig = (vector uint32_t) {16, 16, 16, 16}; -- const vector uint16_t vswapsmall = vec_splat_u16(8); -- vector uint32_t v; -- vector float vd; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) vec_splat_u32(shift); -+ const vec_u32 vlargest = (vec_u32) {clip, clip, clip, clip}; -+ const vec_f vmul = (vec_f) {fmult, fmult, fmult, fmult}; -+ const vec_f vzero = (vec_f) {0, 0, 0, 0}; -+ const vec_u32 vswapbig = (vec_u32) {16, 16, 16, 16}; -+ const vec_u16 vswapsmall = vec_splat_u16(8); -+ vec_u32 v; -+ vec_f vd; - int i; - - yuv2plane1_float_bswap_u(src, dest, dst_u, 0); -@@ -208,8 +208,8 @@ static void yuv2plane1_float_bswap_altiv - vd = vec_ctf(v, 0); - vd = vec_madd(vd, vmul, vzero); - -- vd = (vector float) vec_rl((vector uint32_t) vd, vswapbig); -- vd = (vector float) vec_rl((vector uint16_t) vd, vswapsmall); -+ vd = (vec_f) vec_rl((vec_u32) vd, vswapbig); -+ vd = (vec_f) vec_rl((vec_u16) vd, vswapsmall); - - vec_st(vd, 0, (float *) &dest[i]); - } -Index: ffmpeg-4.2.1/libswscale/ppc/swscale_vsx.c -=================================================================== ---- ffmpeg-4.2.1.orig/libswscale/ppc/swscale_vsx.c -+++ ffmpeg-4.2.1/libswscale/ppc/swscale_vsx.c -@@ -103,9 +103,9 @@ static void yuv2plane1_8_vsx(const int16 - const int dst_u = -(uintptr_t)dest & 15; - int i, j; - LOCAL_ALIGNED(16, int16_t, val, [16]); -- const vector uint16_t shifts = (vector uint16_t) {7, 7, 7, 7, 7, 7, 7, 7}; -- vector int16_t vi, vileft, ditherleft, ditherright; -- vector uint8_t vd; -+ const vec_u16 shifts = (vec_u16) {7, 7, 7, 7, 7, 7, 7, 7}; -+ vec_s16 vi, vileft, ditherleft, ditherright; -+ vec_u8 vd; - - for (j = 0; j < 16; j++) { - val[j] = dither[(dst_u + offset + j) & 7]; -@@ -161,11 +161,11 @@ static void yuv2plane1_nbps_vsx(const in - const int shift = 15 - output_bits; - const int add = (1 << (shift - 1)); - const int clip = (1 << output_bits) - 1; -- const vector uint16_t vadd = (vector uint16_t) {add, add, add, add, add, add, add, add}; -- const vector uint16_t vswap = (vector uint16_t) vec_splat_u16(big_endian ? 8 : 0); -- const vector uint16_t vshift = (vector uint16_t) vec_splat_u16(shift); -- const vector uint16_t vlargest = (vector uint16_t) {clip, clip, clip, clip, clip, clip, clip, clip}; -- vector uint16_t v; -+ const vec_u16 vadd = (vec_u16) {add, add, add, add, add, add, add, add}; -+ const vec_u16 vswap = (vec_u16) vec_splat_u16(big_endian ? 8 : 0); -+ const vec_u16 vshift = (vec_u16) vec_splat_u16(shift); -+ const vec_u16 vlargest = (vec_u16) {clip, clip, clip, clip, clip, clip, clip, clip}; -+ vec_u16 v; - int i; - - yuv2plane1_nbps_u(src, dest, dst_u, big_endian, output_bits, 0); -@@ -209,20 +209,20 @@ static void yuv2planeX_nbps_vsx(const in - const int add = (1 << (shift - 1)); - const int clip = (1 << output_bits) - 1; - const uint16_t swap = big_endian ? 8 : 0; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) {shift, shift, shift, shift}; -- const vector uint16_t vswap = (vector uint16_t) {swap, swap, swap, swap, swap, swap, swap, swap}; -- const vector uint16_t vlargest = (vector uint16_t) {clip, clip, clip, clip, clip, clip, clip, clip}; -- const vector int16_t vzero = vec_splat_s16(0); -- const vector uint8_t vperm = (vector uint8_t) {0, 1, 8, 9, 2, 3, 10, 11, 4, 5, 12, 13, 6, 7, 14, 15}; -- vector int16_t vfilter[MAX_FILTER_SIZE], vin; -- vector uint16_t v; -- vector uint32_t vleft, vright, vtmp; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) {shift, shift, shift, shift}; -+ const vec_u16 vswap = (vec_u16) {swap, swap, swap, swap, swap, swap, swap, swap}; -+ const vec_u16 vlargest = (vec_u16) {clip, clip, clip, clip, clip, clip, clip, clip}; -+ const vec_s16 vzero = vec_splat_s16(0); -+ const vec_u8 vperm = (vec_u8) {0, 1, 8, 9, 2, 3, 10, 11, 4, 5, 12, 13, 6, 7, 14, 15}; -+ vec_s16 vfilter[MAX_FILTER_SIZE], vin; -+ vec_u16 v; -+ vec_u32 vleft, vright, vtmp; - int i, j; - - for (i = 0; i < filterSize; i++) { -- vfilter[i] = (vector int16_t) {filter[i], filter[i], filter[i], filter[i], -- filter[i], filter[i], filter[i], filter[i]}; -+ vfilter[i] = (vec_s16) {filter[i], filter[i], filter[i], filter[i], -+ filter[i], filter[i], filter[i], filter[i]}; - } - - yuv2planeX_nbps_u(filter, filterSize, src, dest, dst_u, big_endian, output_bits, 0); -@@ -232,16 +232,16 @@ static void yuv2planeX_nbps_vsx(const in - - for (j = 0; j < filterSize; j++) { - vin = vec_vsx_ld(0, &src[j][i]); -- vtmp = (vector uint32_t) vec_mule(vin, vfilter[j]); -+ vtmp = (vec_u32) vec_mule(vin, vfilter[j]); - vleft = vec_add(vleft, vtmp); -- vtmp = (vector uint32_t) vec_mulo(vin, vfilter[j]); -+ vtmp = (vec_u32) vec_mulo(vin, vfilter[j]); - vright = vec_add(vright, vtmp); - } - - vleft = vec_sra(vleft, vshift); - vright = vec_sra(vright, vshift); - v = vec_packsu(vleft, vright); -- v = (vector uint16_t) vec_max((vector int16_t) v, vzero); -+ v = (vec_u16) vec_max((vec_s16) v, vzero); - v = vec_min(v, vlargest); - v = vec_rl(v, vswap); - v = vec_perm(v, v, vperm); -@@ -279,11 +279,11 @@ static void yuv2plane1_16_vsx(const int3 - const int dst_u = -(uintptr_t)dest & 7; - const int shift = 3; - const int add = (1 << (shift - 1)); -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint16_t vswap = (vector uint16_t) vec_splat_u16(big_endian ? 8 : 0); -- const vector uint32_t vshift = (vector uint32_t) vec_splat_u32(shift); -- vector uint32_t v, v2; -- vector uint16_t vd; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u16 vswap = (vec_u16) vec_splat_u16(big_endian ? 8 : 0); -+ const vec_u32 vshift = (vec_u32) vec_splat_u32(shift); -+ vec_u32 v, v2; -+ vec_u16 vd; - int i; - - yuv2plane1_16_u(src, dest, dst_u, big_endian, output_bits, 0); -@@ -341,18 +341,18 @@ static void yuv2planeX_16_vsx(const int1 - const int bias = 0x8000; - const int add = (1 << (shift - 1)) - 0x40000000; - const uint16_t swap = big_endian ? 8 : 0; -- const vector uint32_t vadd = (vector uint32_t) {add, add, add, add}; -- const vector uint32_t vshift = (vector uint32_t) {shift, shift, shift, shift}; -- const vector uint16_t vswap = (vector uint16_t) {swap, swap, swap, swap, swap, swap, swap, swap}; -- const vector uint16_t vbias = (vector uint16_t) {bias, bias, bias, bias, bias, bias, bias, bias}; -- vector int32_t vfilter[MAX_FILTER_SIZE]; -- vector uint16_t v; -- vector uint32_t vleft, vright, vtmp; -- vector int32_t vin32l, vin32r; -+ const vec_u32 vadd = (vec_u32) {add, add, add, add}; -+ const vec_u32 vshift = (vec_u32) {shift, shift, shift, shift}; -+ const vec_u16 vswap = (vec_u16) {swap, swap, swap, swap, swap, swap, swap, swap}; -+ const vec_u16 vbias = (vec_u16) {bias, bias, bias, bias, bias, bias, bias, bias}; -+ vec_s32 vfilter[MAX_FILTER_SIZE]; -+ vec_u16 v; -+ vec_u32 vleft, vright, vtmp; -+ vec_s32 vin32l, vin32r; - int i, j; - - for (i = 0; i < filterSize; i++) { -- vfilter[i] = (vector int32_t) {filter[i], filter[i], filter[i], filter[i]}; -+ vfilter[i] = (vec_s32) {filter[i], filter[i], filter[i], filter[i]}; - } - - yuv2planeX_16_u(filter, filterSize, src, dest, dst_u, big_endian, output_bits, 0); -@@ -364,15 +364,15 @@ static void yuv2planeX_16_vsx(const int1 - vin32l = vec_vsx_ld(0, &src[j][i]); - vin32r = vec_vsx_ld(0, &src[j][i + 4]); - -- vtmp = (vector uint32_t) vec_mul(vin32l, vfilter[j]); -+ vtmp = (vec_u32) vec_mul(vin32l, vfilter[j]); - vleft = vec_add(vleft, vtmp); -- vtmp = (vector uint32_t) vec_mul(vin32r, vfilter[j]); -+ vtmp = (vec_u32) vec_mul(vin32r, vfilter[j]); - vright = vec_add(vright, vtmp); - } - - vleft = vec_sra(vleft, vshift); - vright = vec_sra(vright, vshift); -- v = (vector uint16_t) vec_packs((vector int32_t) vleft, (vector int32_t) vright); -+ v = (vec_u16) vec_packs((vec_s32) vleft, (vec_s32) vright); - v = vec_add(v, vbias); - v = vec_rl(v, vswap); - vec_st(v, 0, &dest[i]); -@@ -478,9 +478,9 @@ yuv2NBPSX(16, LE, 0, 16, int32_t) - out0 = vec_mergeh(bd, gd); \ - out1 = vec_mergeh(rd, ad); \ - \ -- tmp8 = (vector uint8_t) vec_mergeh((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergeh((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 0, dest); \ -- tmp8 = (vector uint8_t) vec_mergel((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergel((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 16, dest); \ - \ - dest += 32; \ -@@ -489,9 +489,9 @@ yuv2NBPSX(16, LE, 0, 16, int32_t) - out0 = vec_mergeh(rd, gd); \ - out1 = vec_mergeh(bd, ad); \ - \ -- tmp8 = (vector uint8_t) vec_mergeh((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergeh((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 0, dest); \ -- tmp8 = (vector uint8_t) vec_mergel((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergel((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 16, dest); \ - \ - dest += 32; \ -@@ -500,9 +500,9 @@ yuv2NBPSX(16, LE, 0, 16, int32_t) - out0 = vec_mergeh(ad, rd); \ - out1 = vec_mergeh(gd, bd); \ - \ -- tmp8 = (vector uint8_t) vec_mergeh((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergeh((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 0, dest); \ -- tmp8 = (vector uint8_t) vec_mergel((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergel((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 16, dest); \ - \ - dest += 32; \ -@@ -511,9 +511,9 @@ yuv2NBPSX(16, LE, 0, 16, int32_t) - out0 = vec_mergeh(ad, bd); \ - out1 = vec_mergeh(gd, rd); \ - \ -- tmp8 = (vector uint8_t) vec_mergeh((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergeh((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 0, dest); \ -- tmp8 = (vector uint8_t) vec_mergel((vector uint16_t) out0, (vector uint16_t) out1); \ -+ tmp8 = (vec_u8) vec_mergel((vec_u16) out0, (vec_u16) out1); \ - vec_vsx_st(tmp8, 16, dest); \ - \ - dest += 32; \ -@@ -528,48 +528,48 @@ yuv2rgb_full_X_vsx_template(SwsContext * - const int16_t **alpSrc, uint8_t *dest, - int dstW, int y, enum AVPixelFormat target, int hasAlpha) - { -- vector int16_t vv; -- vector int32_t vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -- vector int32_t R_l, R_r, G_l, G_r, B_l, B_r; -- vector int32_t tmp, tmp2, tmp3, tmp4; -- vector uint16_t rd16, gd16, bd16; -- vector uint8_t rd, bd, gd, ad, out0, out1, tmp8; -- vector int16_t vlumFilter[MAX_FILTER_SIZE], vchrFilter[MAX_FILTER_SIZE]; -- const vector int32_t ystart = vec_splats(1 << 9); -- const vector int32_t uvstart = vec_splats((1 << 9) - (128 << 19)); -- const vector uint16_t zero16 = vec_splat_u16(0); -- const vector int32_t y_offset = vec_splats(c->yuv2rgb_y_offset); -- const vector int32_t y_coeff = vec_splats(c->yuv2rgb_y_coeff); -- const vector int32_t y_add = vec_splats(1 << 21); -- const vector int32_t v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -- const vector int32_t v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -- const vector int32_t u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -- const vector int32_t u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -- const vector int32_t rgbclip = vec_splats(1 << 30); -- const vector int32_t zero32 = vec_splat_s32(0); -- const vector uint32_t shift22 = vec_splats(22U); -- const vector uint32_t shift10 = vec_splat_u32(10); -+ vec_s16 vv; -+ vec_s32 vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -+ vec_s32 R_l, R_r, G_l, G_r, B_l, B_r; -+ vec_s32 tmp, tmp2, tmp3, tmp4; -+ vec_u16 rd16, gd16, bd16; -+ vec_u8 rd, bd, gd, ad, out0, out1, tmp8; -+ vec_s16 vlumFilter[MAX_FILTER_SIZE], vchrFilter[MAX_FILTER_SIZE]; -+ const vec_s32 ystart = vec_splats(1 << 9); -+ const vec_s32 uvstart = vec_splats((1 << 9) - (128 << 19)); -+ const vec_u16 zero16 = vec_splat_u16(0); -+ const vec_s32 y_offset = vec_splats(c->yuv2rgb_y_offset); -+ const vec_s32 y_coeff = vec_splats(c->yuv2rgb_y_coeff); -+ const vec_s32 y_add = vec_splats(1 << 21); -+ const vec_s32 v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -+ const vec_s32 v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -+ const vec_s32 u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -+ const vec_s32 u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -+ const vec_s32 rgbclip = vec_splats(1 << 30); -+ const vec_s32 zero32 = vec_splat_s32(0); -+ const vec_u32 shift22 = vec_splats(22U); -+ const vec_u32 shift10 = vec_splat_u32(10); - int i, j; - - // Various permutations -- const vector uint8_t perm3rg0 = (vector uint8_t) {0x0, 0x10, 0, -- 0x1, 0x11, 0, -- 0x2, 0x12, 0, -- 0x3, 0x13, 0, -- 0x4, 0x14, 0, -- 0x5 }; -- const vector uint8_t perm3rg1 = (vector uint8_t) { 0x15, 0, -- 0x6, 0x16, 0, -- 0x7, 0x17, 0 }; -- const vector uint8_t perm3tb0 = (vector uint8_t) {0x0, 0x1, 0x10, -- 0x3, 0x4, 0x11, -- 0x6, 0x7, 0x12, -- 0x9, 0xa, 0x13, -- 0xc, 0xd, 0x14, -- 0xf }; -- const vector uint8_t perm3tb1 = (vector uint8_t) { 0x0, 0x15, -- 0x2, 0x3, 0x16, -- 0x5, 0x6, 0x17 }; -+ const vec_u8 perm3rg0 = (vec_u8) {0x0, 0x10, 0, -+ 0x1, 0x11, 0, -+ 0x2, 0x12, 0, -+ 0x3, 0x13, 0, -+ 0x4, 0x14, 0, -+ 0x5 }; -+ const vec_u8 perm3rg1 = (vec_u8) { 0x15, 0, -+ 0x6, 0x16, 0, -+ 0x7, 0x17, 0 }; -+ const vec_u8 perm3tb0 = (vec_u8) {0x0, 0x1, 0x10, -+ 0x3, 0x4, 0x11, -+ 0x6, 0x7, 0x12, -+ 0x9, 0xa, 0x13, -+ 0xc, 0xd, 0x14, -+ 0xf }; -+ const vec_u8 perm3tb1 = (vec_u8) { 0x0, 0x15, -+ 0x2, 0x3, 0x16, -+ 0x5, 0x6, 0x17 }; - - ad = vec_splats((uint8_t) 255); - -@@ -685,52 +685,52 @@ yuv2rgb_full_2_vsx_template(SwsContext * - *abuf1 = hasAlpha ? abuf[1] : NULL; - const int16_t yalpha1 = 4096 - yalpha; - const int16_t uvalpha1 = 4096 - uvalpha; -- vector int16_t vy, vu, vv, A = vec_splat_s16(0); -- vector int32_t vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -- vector int32_t R_l, R_r, G_l, G_r, B_l, B_r; -- vector int32_t tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -- vector uint16_t rd16, gd16, bd16; -- vector uint8_t rd, bd, gd, ad, out0, out1, tmp8; -- const vector int16_t vyalpha1 = vec_splats(yalpha1); -- const vector int16_t vuvalpha1 = vec_splats(uvalpha1); -- const vector int16_t vyalpha = vec_splats((int16_t) yalpha); -- const vector int16_t vuvalpha = vec_splats((int16_t) uvalpha); -- const vector uint16_t zero16 = vec_splat_u16(0); -- const vector int32_t y_offset = vec_splats(c->yuv2rgb_y_offset); -- const vector int32_t y_coeff = vec_splats(c->yuv2rgb_y_coeff); -- const vector int32_t y_add = vec_splats(1 << 21); -- const vector int32_t v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -- const vector int32_t v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -- const vector int32_t u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -- const vector int32_t u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -- const vector int32_t rgbclip = vec_splats(1 << 30); -- const vector int32_t zero32 = vec_splat_s32(0); -- const vector uint32_t shift19 = vec_splats(19U); -- const vector uint32_t shift22 = vec_splats(22U); -- const vector uint32_t shift10 = vec_splat_u32(10); -- const vector int32_t dec128 = vec_splats(128 << 19); -- const vector int32_t add18 = vec_splats(1 << 18); -+ vec_s16 vy, vu, vv, A = vec_splat_s16(0); -+ vec_s32 vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -+ vec_s32 R_l, R_r, G_l, G_r, B_l, B_r; -+ vec_s32 tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -+ vec_u16 rd16, gd16, bd16; -+ vec_u8 rd, bd, gd, ad, out0, out1, tmp8; -+ const vec_s16 vyalpha1 = vec_splats(yalpha1); -+ const vec_s16 vuvalpha1 = vec_splats(uvalpha1); -+ const vec_s16 vyalpha = vec_splats((int16_t) yalpha); -+ const vec_s16 vuvalpha = vec_splats((int16_t) uvalpha); -+ const vec_u16 zero16 = vec_splat_u16(0); -+ const vec_s32 y_offset = vec_splats(c->yuv2rgb_y_offset); -+ const vec_s32 y_coeff = vec_splats(c->yuv2rgb_y_coeff); -+ const vec_s32 y_add = vec_splats(1 << 21); -+ const vec_s32 v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -+ const vec_s32 v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -+ const vec_s32 u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -+ const vec_s32 u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -+ const vec_s32 rgbclip = vec_splats(1 << 30); -+ const vec_s32 zero32 = vec_splat_s32(0); -+ const vec_u32 shift19 = vec_splats(19U); -+ const vec_u32 shift22 = vec_splats(22U); -+ const vec_u32 shift10 = vec_splat_u32(10); -+ const vec_s32 dec128 = vec_splats(128 << 19); -+ const vec_s32 add18 = vec_splats(1 << 18); - int i; - - // Various permutations -- const vector uint8_t perm3rg0 = (vector uint8_t) {0x0, 0x10, 0, -- 0x1, 0x11, 0, -- 0x2, 0x12, 0, -- 0x3, 0x13, 0, -- 0x4, 0x14, 0, -- 0x5 }; -- const vector uint8_t perm3rg1 = (vector uint8_t) { 0x15, 0, -- 0x6, 0x16, 0, -- 0x7, 0x17, 0 }; -- const vector uint8_t perm3tb0 = (vector uint8_t) {0x0, 0x1, 0x10, -- 0x3, 0x4, 0x11, -- 0x6, 0x7, 0x12, -- 0x9, 0xa, 0x13, -- 0xc, 0xd, 0x14, -- 0xf }; -- const vector uint8_t perm3tb1 = (vector uint8_t) { 0x0, 0x15, -- 0x2, 0x3, 0x16, -- 0x5, 0x6, 0x17 }; -+ const vec_u8 perm3rg0 = (vec_u8) {0x0, 0x10, 0, -+ 0x1, 0x11, 0, -+ 0x2, 0x12, 0, -+ 0x3, 0x13, 0, -+ 0x4, 0x14, 0, -+ 0x5 }; -+ const vec_u8 perm3rg1 = (vec_u8) { 0x15, 0, -+ 0x6, 0x16, 0, -+ 0x7, 0x17, 0 }; -+ const vec_u8 perm3tb0 = (vec_u8) {0x0, 0x1, 0x10, -+ 0x3, 0x4, 0x11, -+ 0x6, 0x7, 0x12, -+ 0x9, 0xa, 0x13, -+ 0xc, 0xd, 0x14, -+ 0xf }; -+ const vec_u8 perm3tb1 = (vec_u8) { 0x0, 0x15, -+ 0x2, 0x3, 0x16, -+ 0x5, 0x6, 0x17 }; - - av_assert2(yalpha <= 4096U); - av_assert2(uvalpha <= 4096U); -@@ -759,7 +759,7 @@ yuv2rgb_full_2_vsx_template(SwsContext * - tmp3 = vec_sra(tmp3, shift19); - tmp4 = vec_sra(tmp4, shift19); - A = vec_packs(tmp3, tmp4); -- ad = vec_packsu(A, (vector int16_t) zero16); -+ ad = vec_packsu(A, (vec_s16) zero16); - } else { - ad = vec_splats((uint8_t) 255); - } -@@ -807,60 +807,60 @@ yuv2rgb_2_vsx_template(SwsContext *c, co - *abuf1 = hasAlpha ? abuf[1] : NULL; - const int16_t yalpha1 = 4096 - yalpha; - const int16_t uvalpha1 = 4096 - uvalpha; -- vector int16_t vy, vu, vv, A = vec_splat_s16(0); -- vector int32_t vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -- vector int32_t R_l, R_r, G_l, G_r, B_l, B_r, vud32_l, vud32_r, vvd32_l, vvd32_r; -- vector int32_t tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -- vector uint16_t rd16, gd16, bd16; -- vector uint8_t rd, bd, gd, ad, out0, out1, tmp8; -- const vector int16_t vyalpha1 = vec_splats(yalpha1); -- const vector int16_t vuvalpha1 = vec_splats(uvalpha1); -- const vector int16_t vyalpha = vec_splats((int16_t) yalpha); -- const vector int16_t vuvalpha = vec_splats((int16_t) uvalpha); -- const vector uint16_t zero16 = vec_splat_u16(0); -- const vector int32_t y_offset = vec_splats(c->yuv2rgb_y_offset); -- const vector int32_t y_coeff = vec_splats(c->yuv2rgb_y_coeff); -- const vector int32_t y_add = vec_splats(1 << 21); -- const vector int32_t v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -- const vector int32_t v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -- const vector int32_t u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -- const vector int32_t u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -- const vector int32_t rgbclip = vec_splats(1 << 30); -- const vector int32_t zero32 = vec_splat_s32(0); -- const vector uint32_t shift19 = vec_splats(19U); -- const vector uint32_t shift22 = vec_splats(22U); -- const vector uint32_t shift10 = vec_splat_u32(10); -- const vector int32_t dec128 = vec_splats(128 << 19); -- const vector int32_t add18 = vec_splats(1 << 18); -+ vec_s16 vy, vu, vv, A = vec_splat_s16(0); -+ vec_s32 vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32; -+ vec_s32 R_l, R_r, G_l, G_r, B_l, B_r, vud32_l, vud32_r, vvd32_l, vvd32_r; -+ vec_s32 tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -+ vec_u16 rd16, gd16, bd16; -+ vec_u8 rd, bd, gd, ad, out0, out1, tmp8; -+ const vec_s16 vyalpha1 = vec_splats(yalpha1); -+ const vec_s16 vuvalpha1 = vec_splats(uvalpha1); -+ const vec_s16 vyalpha = vec_splats((int16_t) yalpha); -+ const vec_s16 vuvalpha = vec_splats((int16_t) uvalpha); -+ const vec_u16 zero16 = vec_splat_u16(0); -+ const vec_s32 y_offset = vec_splats(c->yuv2rgb_y_offset); -+ const vec_s32 y_coeff = vec_splats(c->yuv2rgb_y_coeff); -+ const vec_s32 y_add = vec_splats(1 << 21); -+ const vec_s32 v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -+ const vec_s32 v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -+ const vec_s32 u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -+ const vec_s32 u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -+ const vec_s32 rgbclip = vec_splats(1 << 30); -+ const vec_s32 zero32 = vec_splat_s32(0); -+ const vec_u32 shift19 = vec_splats(19U); -+ const vec_u32 shift22 = vec_splats(22U); -+ const vec_u32 shift10 = vec_splat_u32(10); -+ const vec_s32 dec128 = vec_splats(128 << 19); -+ const vec_s32 add18 = vec_splats(1 << 18); - int i; - - // Various permutations -- const vector uint8_t doubleleft = (vector uint8_t) {0, 1, 2, 3, -- 0, 1, 2, 3, -- 4, 5, 6, 7, -- 4, 5, 6, 7 }; -- const vector uint8_t doubleright = (vector uint8_t) {8, 9, 10, 11, -- 8, 9, 10, 11, -- 12, 13, 14, 15, -- 12, 13, 14, 15 }; -- const vector uint8_t perm3rg0 = (vector uint8_t) {0x0, 0x10, 0, -- 0x1, 0x11, 0, -- 0x2, 0x12, 0, -- 0x3, 0x13, 0, -- 0x4, 0x14, 0, -- 0x5 }; -- const vector uint8_t perm3rg1 = (vector uint8_t) { 0x15, 0, -- 0x6, 0x16, 0, -- 0x7, 0x17, 0 }; -- const vector uint8_t perm3tb0 = (vector uint8_t) {0x0, 0x1, 0x10, -- 0x3, 0x4, 0x11, -- 0x6, 0x7, 0x12, -- 0x9, 0xa, 0x13, -- 0xc, 0xd, 0x14, -- 0xf }; -- const vector uint8_t perm3tb1 = (vector uint8_t) { 0x0, 0x15, -- 0x2, 0x3, 0x16, -- 0x5, 0x6, 0x17 }; -+ const vec_u8 doubleleft = (vec_u8) {0, 1, 2, 3, -+ 0, 1, 2, 3, -+ 4, 5, 6, 7, -+ 4, 5, 6, 7 }; -+ const vec_u8 doubleright = (vec_u8) {8, 9, 10, 11, -+ 8, 9, 10, 11, -+ 12, 13, 14, 15, -+ 12, 13, 14, 15 }; -+ const vec_u8 perm3rg0 = (vec_u8) {0x0, 0x10, 0, -+ 0x1, 0x11, 0, -+ 0x2, 0x12, 0, -+ 0x3, 0x13, 0, -+ 0x4, 0x14, 0, -+ 0x5 }; -+ const vec_u8 perm3rg1 = (vec_u8) { 0x15, 0, -+ 0x6, 0x16, 0, -+ 0x7, 0x17, 0 }; -+ const vec_u8 perm3tb0 = (vec_u8) {0x0, 0x1, 0x10, -+ 0x3, 0x4, 0x11, -+ 0x6, 0x7, 0x12, -+ 0x9, 0xa, 0x13, -+ 0xc, 0xd, 0x14, -+ 0xf }; -+ const vec_u8 perm3tb1 = (vec_u8) { 0x0, 0x15, -+ 0x2, 0x3, 0x16, -+ 0x5, 0x6, 0x17 }; - - av_assert2(yalpha <= 4096U); - av_assert2(uvalpha <= 4096U); -@@ -889,7 +889,7 @@ yuv2rgb_2_vsx_template(SwsContext *c, co - tmp3 = vec_sra(tmp3, shift19); - tmp4 = vec_sra(tmp4, shift19); - A = vec_packs(tmp3, tmp4); -- ad = vec_packsu(A, (vector int16_t) zero16); -+ ad = vec_packsu(A, (vec_s16) zero16); - } else { - ad = vec_splats((uint8_t) 255); - } -@@ -978,51 +978,51 @@ yuv2rgb_full_1_vsx_template(SwsContext * - { - const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; - const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; -- vector int16_t vy, vu, vv, A = vec_splat_s16(0), tmp16; -- vector int32_t vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32, tmp32_2; -- vector int32_t R_l, R_r, G_l, G_r, B_l, B_r; -- vector uint16_t rd16, gd16, bd16; -- vector uint8_t rd, bd, gd, ad, out0, out1, tmp8; -- const vector uint16_t zero16 = vec_splat_u16(0); -- const vector int32_t y_offset = vec_splats(c->yuv2rgb_y_offset); -- const vector int32_t y_coeff = vec_splats(c->yuv2rgb_y_coeff); -- const vector int32_t y_add = vec_splats(1 << 21); -- const vector int32_t v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -- const vector int32_t v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -- const vector int32_t u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -- const vector int32_t u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -- const vector int32_t rgbclip = vec_splats(1 << 30); -- const vector int32_t zero32 = vec_splat_s32(0); -- const vector uint32_t shift2 = vec_splat_u32(2); -- const vector uint32_t shift22 = vec_splats(22U); -- const vector uint16_t sub7 = vec_splats((uint16_t) (128 << 7)); -- const vector uint16_t sub8 = vec_splats((uint16_t) (128 << 8)); -- const vector int16_t mul4 = vec_splat_s16(4); -- const vector int16_t mul8 = vec_splat_s16(8); -- const vector int16_t add64 = vec_splat_s16(64); -- const vector uint16_t shift7 = vec_splat_u16(7); -- const vector int16_t max255 = vec_splat_s16(255); -+ vec_s16 vy, vu, vv, A = vec_splat_s16(0), tmp16; -+ vec_s32 vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32, tmp32_2; -+ vec_s32 R_l, R_r, G_l, G_r, B_l, B_r; -+ vec_u16 rd16, gd16, bd16; -+ vec_u8 rd, bd, gd, ad, out0, out1, tmp8; -+ const vec_u16 zero16 = vec_splat_u16(0); -+ const vec_s32 y_offset = vec_splats(c->yuv2rgb_y_offset); -+ const vec_s32 y_coeff = vec_splats(c->yuv2rgb_y_coeff); -+ const vec_s32 y_add = vec_splats(1 << 21); -+ const vec_s32 v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -+ const vec_s32 v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -+ const vec_s32 u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -+ const vec_s32 u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -+ const vec_s32 rgbclip = vec_splats(1 << 30); -+ const vec_s32 zero32 = vec_splat_s32(0); -+ const vec_u32 shift2 = vec_splat_u32(2); -+ const vec_u32 shift22 = vec_splats(22U); -+ const vec_u16 sub7 = vec_splats((uint16_t) (128 << 7)); -+ const vec_u16 sub8 = vec_splats((uint16_t) (128 << 8)); -+ const vec_s16 mul4 = vec_splat_s16(4); -+ const vec_s16 mul8 = vec_splat_s16(8); -+ const vec_s16 add64 = vec_splat_s16(64); -+ const vec_u16 shift7 = vec_splat_u16(7); -+ const vec_s16 max255 = vec_splat_s16(255); - int i; - - // Various permutations -- const vector uint8_t perm3rg0 = (vector uint8_t) {0x0, 0x10, 0, -- 0x1, 0x11, 0, -- 0x2, 0x12, 0, -- 0x3, 0x13, 0, -- 0x4, 0x14, 0, -- 0x5 }; -- const vector uint8_t perm3rg1 = (vector uint8_t) { 0x15, 0, -- 0x6, 0x16, 0, -- 0x7, 0x17, 0 }; -- const vector uint8_t perm3tb0 = (vector uint8_t) {0x0, 0x1, 0x10, -- 0x3, 0x4, 0x11, -- 0x6, 0x7, 0x12, -- 0x9, 0xa, 0x13, -- 0xc, 0xd, 0x14, -- 0xf }; -- const vector uint8_t perm3tb1 = (vector uint8_t) { 0x0, 0x15, -- 0x2, 0x3, 0x16, -- 0x5, 0x6, 0x17 }; -+ const vec_u8 perm3rg0 = (vec_u8) {0x0, 0x10, 0, -+ 0x1, 0x11, 0, -+ 0x2, 0x12, 0, -+ 0x3, 0x13, 0, -+ 0x4, 0x14, 0, -+ 0x5 }; -+ const vec_u8 perm3rg1 = (vec_u8) { 0x15, 0, -+ 0x6, 0x16, 0, -+ 0x7, 0x17, 0 }; -+ const vec_u8 perm3tb0 = (vec_u8) {0x0, 0x1, 0x10, -+ 0x3, 0x4, 0x11, -+ 0x6, 0x7, 0x12, -+ 0x9, 0xa, 0x13, -+ 0xc, 0xd, 0x14, -+ 0xf }; -+ const vec_u8 perm3tb1 = (vec_u8) { 0x0, 0x15, -+ 0x2, 0x3, 0x16, -+ 0x5, 0x6, 0x17 }; - - for (i = 0; i < dstW; i += 8) { // The x86 asm also overwrites padding bytes. - vy = vec_ld(0, &buf0[i]); -@@ -1034,8 +1034,8 @@ yuv2rgb_full_1_vsx_template(SwsContext * - vu = vec_ld(0, &ubuf0[i]); - vv = vec_ld(0, &vbuf0[i]); - if (uvalpha < 2048) { -- vu = (vector int16_t) vec_sub((vector uint16_t) vu, sub7); -- vv = (vector int16_t) vec_sub((vector uint16_t) vv, sub7); -+ vu = (vec_s16) vec_sub((vec_u16) vu, sub7); -+ vv = (vec_s16) vec_sub((vec_u16) vv, sub7); - - tmp32 = vec_mule(vu, mul4); - tmp32_2 = vec_mulo(vu, mul4); -@@ -1048,10 +1048,10 @@ yuv2rgb_full_1_vsx_template(SwsContext * - } else { - tmp16 = vec_ld(0, &ubuf1[i]); - vu = vec_add(vu, tmp16); -- vu = (vector int16_t) vec_sub((vector uint16_t) vu, sub8); -+ vu = (vec_s16) vec_sub((vec_u16) vu, sub8); - tmp16 = vec_ld(0, &vbuf1[i]); - vv = vec_add(vv, tmp16); -- vv = (vector int16_t) vec_sub((vector uint16_t) vv, sub8); -+ vv = (vec_s16) vec_sub((vec_u16) vv, sub8); - - vu32_l = vec_mule(vu, mul8); - vu32_r = vec_mulo(vu, mul8); -@@ -1064,7 +1064,7 @@ yuv2rgb_full_1_vsx_template(SwsContext * - A = vec_add(A, add64); - A = vec_sr(A, shift7); - A = vec_max(A, max255); -- ad = vec_packsu(A, (vector int16_t) zero16); -+ ad = vec_packsu(A, (vec_s16) zero16); - } else { - ad = vec_splats((uint8_t) 255); - } -@@ -1107,60 +1107,60 @@ yuv2rgb_1_vsx_template(SwsContext *c, co - { - const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; - const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; -- vector int16_t vy, vu, vv, A = vec_splat_s16(0), tmp16; -- vector int32_t vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32, tmp32_2; -- vector int32_t vud32_l, vud32_r, vvd32_l, vvd32_r; -- vector int32_t R_l, R_r, G_l, G_r, B_l, B_r; -- vector uint16_t rd16, gd16, bd16; -- vector uint8_t rd, bd, gd, ad, out0, out1, tmp8; -- const vector uint16_t zero16 = vec_splat_u16(0); -- const vector int32_t y_offset = vec_splats(c->yuv2rgb_y_offset); -- const vector int32_t y_coeff = vec_splats(c->yuv2rgb_y_coeff); -- const vector int32_t y_add = vec_splats(1 << 21); -- const vector int32_t v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -- const vector int32_t v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -- const vector int32_t u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -- const vector int32_t u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -- const vector int32_t rgbclip = vec_splats(1 << 30); -- const vector int32_t zero32 = vec_splat_s32(0); -- const vector uint32_t shift2 = vec_splat_u32(2); -- const vector uint32_t shift22 = vec_splats(22U); -- const vector uint16_t sub7 = vec_splats((uint16_t) (128 << 7)); -- const vector uint16_t sub8 = vec_splats((uint16_t) (128 << 8)); -- const vector int16_t mul4 = vec_splat_s16(4); -- const vector int16_t mul8 = vec_splat_s16(8); -- const vector int16_t add64 = vec_splat_s16(64); -- const vector uint16_t shift7 = vec_splat_u16(7); -- const vector int16_t max255 = vec_splat_s16(255); -+ vec_s16 vy, vu, vv, A = vec_splat_s16(0), tmp16; -+ vec_s32 vy32_l, vy32_r, vu32_l, vu32_r, vv32_l, vv32_r, tmp32, tmp32_2; -+ vec_s32 vud32_l, vud32_r, vvd32_l, vvd32_r; -+ vec_s32 R_l, R_r, G_l, G_r, B_l, B_r; -+ vec_u16 rd16, gd16, bd16; -+ vec_u8 rd, bd, gd, ad, out0, out1, tmp8; -+ const vec_u16 zero16 = vec_splat_u16(0); -+ const vec_s32 y_offset = vec_splats(c->yuv2rgb_y_offset); -+ const vec_s32 y_coeff = vec_splats(c->yuv2rgb_y_coeff); -+ const vec_s32 y_add = vec_splats(1 << 21); -+ const vec_s32 v2r_coeff = vec_splats(c->yuv2rgb_v2r_coeff); -+ const vec_s32 v2g_coeff = vec_splats(c->yuv2rgb_v2g_coeff); -+ const vec_s32 u2g_coeff = vec_splats(c->yuv2rgb_u2g_coeff); -+ const vec_s32 u2b_coeff = vec_splats(c->yuv2rgb_u2b_coeff); -+ const vec_s32 rgbclip = vec_splats(1 << 30); -+ const vec_s32 zero32 = vec_splat_s32(0); -+ const vec_u32 shift2 = vec_splat_u32(2); -+ const vec_u32 shift22 = vec_splats(22U); -+ const vec_u16 sub7 = vec_splats((uint16_t) (128 << 7)); -+ const vec_u16 sub8 = vec_splats((uint16_t) (128 << 8)); -+ const vec_s16 mul4 = vec_splat_s16(4); -+ const vec_s16 mul8 = vec_splat_s16(8); -+ const vec_s16 add64 = vec_splat_s16(64); -+ const vec_u16 shift7 = vec_splat_u16(7); -+ const vec_s16 max255 = vec_splat_s16(255); - int i; - - // Various permutations -- const vector uint8_t doubleleft = (vector uint8_t) {0, 1, 2, 3, -- 0, 1, 2, 3, -- 4, 5, 6, 7, -- 4, 5, 6, 7 }; -- const vector uint8_t doubleright = (vector uint8_t) {8, 9, 10, 11, -- 8, 9, 10, 11, -- 12, 13, 14, 15, -- 12, 13, 14, 15 }; -- const vector uint8_t perm3rg0 = (vector uint8_t) {0x0, 0x10, 0, -- 0x1, 0x11, 0, -- 0x2, 0x12, 0, -- 0x3, 0x13, 0, -- 0x4, 0x14, 0, -- 0x5 }; -- const vector uint8_t perm3rg1 = (vector uint8_t) { 0x15, 0, -- 0x6, 0x16, 0, -- 0x7, 0x17, 0 }; -- const vector uint8_t perm3tb0 = (vector uint8_t) {0x0, 0x1, 0x10, -- 0x3, 0x4, 0x11, -- 0x6, 0x7, 0x12, -- 0x9, 0xa, 0x13, -- 0xc, 0xd, 0x14, -- 0xf }; -- const vector uint8_t perm3tb1 = (vector uint8_t) { 0x0, 0x15, -- 0x2, 0x3, 0x16, -- 0x5, 0x6, 0x17 }; -+ const vec_u8 doubleleft = (vec_u8) {0, 1, 2, 3, -+ 0, 1, 2, 3, -+ 4, 5, 6, 7, -+ 4, 5, 6, 7 }; -+ const vec_u8 doubleright = (vec_u8) {8, 9, 10, 11, -+ 8, 9, 10, 11, -+ 12, 13, 14, 15, -+ 12, 13, 14, 15 }; -+ const vec_u8 perm3rg0 = (vec_u8) {0x0, 0x10, 0, -+ 0x1, 0x11, 0, -+ 0x2, 0x12, 0, -+ 0x3, 0x13, 0, -+ 0x4, 0x14, 0, -+ 0x5 }; -+ const vec_u8 perm3rg1 = (vec_u8) { 0x15, 0, -+ 0x6, 0x16, 0, -+ 0x7, 0x17, 0 }; -+ const vec_u8 perm3tb0 = (vec_u8) {0x0, 0x1, 0x10, -+ 0x3, 0x4, 0x11, -+ 0x6, 0x7, 0x12, -+ 0x9, 0xa, 0x13, -+ 0xc, 0xd, 0x14, -+ 0xf }; -+ const vec_u8 perm3tb1 = (vec_u8) { 0x0, 0x15, -+ 0x2, 0x3, 0x16, -+ 0x5, 0x6, 0x17 }; - - for (i = 0; i < (dstW + 1) >> 1; i += 8) { // The x86 asm also overwrites padding bytes. - vy = vec_ld(0, &buf0[i * 2]); -@@ -1172,8 +1172,8 @@ yuv2rgb_1_vsx_template(SwsContext *c, co - vu = vec_ld(0, &ubuf0[i]); - vv = vec_ld(0, &vbuf0[i]); - if (uvalpha < 2048) { -- vu = (vector int16_t) vec_sub((vector uint16_t) vu, sub7); -- vv = (vector int16_t) vec_sub((vector uint16_t) vv, sub7); -+ vu = (vec_s16) vec_sub((vec_u16) vu, sub7); -+ vv = (vec_s16) vec_sub((vec_u16) vv, sub7); - - tmp32 = vec_mule(vu, mul4); - tmp32_2 = vec_mulo(vu, mul4); -@@ -1186,10 +1186,10 @@ yuv2rgb_1_vsx_template(SwsContext *c, co - } else { - tmp16 = vec_ld(0, &ubuf1[i]); - vu = vec_add(vu, tmp16); -- vu = (vector int16_t) vec_sub((vector uint16_t) vu, sub8); -+ vu = (vec_s16) vec_sub((vec_u16) vu, sub8); - tmp16 = vec_ld(0, &vbuf1[i]); - vv = vec_add(vv, tmp16); -- vv = (vector int16_t) vec_sub((vector uint16_t) vv, sub8); -+ vv = (vec_s16) vec_sub((vec_u16) vv, sub8); - - vu32_l = vec_mule(vu, mul8); - vu32_r = vec_mulo(vu, mul8); -@@ -1202,7 +1202,7 @@ yuv2rgb_1_vsx_template(SwsContext *c, co - A = vec_add(A, add64); - A = vec_sr(A, shift7); - A = vec_max(A, max255); -- ad = vec_packsu(A, (vector int16_t) zero16); -+ ad = vec_packsu(A, (vec_s16) zero16); - } else { - ad = vec_splats((uint8_t) 255); - } -@@ -1358,41 +1358,41 @@ YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_fu - YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, AV_PIX_FMT_BGR24, 0) - - static av_always_inline void --write422(const vector int16_t vy1, const vector int16_t vy2, -- const vector int16_t vu, const vector int16_t vv, -+write422(const vec_s16 vy1, const vec_s16 vy2, -+ const vec_s16 vu, const vec_s16 vv, - uint8_t *dest, const enum AVPixelFormat target) - { -- vector uint8_t vd1, vd2, tmp; -- const vector uint8_t yuyv1 = (vector uint8_t) { -- 0x0, 0x10, 0x1, 0x18, -- 0x2, 0x11, 0x3, 0x19, -- 0x4, 0x12, 0x5, 0x1a, -- 0x6, 0x13, 0x7, 0x1b }; -- const vector uint8_t yuyv2 = (vector uint8_t) { -- 0x8, 0x14, 0x9, 0x1c, -- 0xa, 0x15, 0xb, 0x1d, -- 0xc, 0x16, 0xd, 0x1e, -- 0xe, 0x17, 0xf, 0x1f }; -- const vector uint8_t yvyu1 = (vector uint8_t) { -- 0x0, 0x18, 0x1, 0x10, -- 0x2, 0x19, 0x3, 0x11, -- 0x4, 0x1a, 0x5, 0x12, -- 0x6, 0x1b, 0x7, 0x13 }; -- const vector uint8_t yvyu2 = (vector uint8_t) { -- 0x8, 0x1c, 0x9, 0x14, -- 0xa, 0x1d, 0xb, 0x15, -- 0xc, 0x1e, 0xd, 0x16, -- 0xe, 0x1f, 0xf, 0x17 }; -- const vector uint8_t uyvy1 = (vector uint8_t) { -- 0x10, 0x0, 0x18, 0x1, -- 0x11, 0x2, 0x19, 0x3, -- 0x12, 0x4, 0x1a, 0x5, -- 0x13, 0x6, 0x1b, 0x7 }; -- const vector uint8_t uyvy2 = (vector uint8_t) { -- 0x14, 0x8, 0x1c, 0x9, -- 0x15, 0xa, 0x1d, 0xb, -- 0x16, 0xc, 0x1e, 0xd, -- 0x17, 0xe, 0x1f, 0xf }; -+ vec_u8 vd1, vd2, tmp; -+ const vec_u8 yuyv1 = (vec_u8) { -+ 0x0, 0x10, 0x1, 0x18, -+ 0x2, 0x11, 0x3, 0x19, -+ 0x4, 0x12, 0x5, 0x1a, -+ 0x6, 0x13, 0x7, 0x1b }; -+ const vec_u8 yuyv2 = (vec_u8) { -+ 0x8, 0x14, 0x9, 0x1c, -+ 0xa, 0x15, 0xb, 0x1d, -+ 0xc, 0x16, 0xd, 0x1e, -+ 0xe, 0x17, 0xf, 0x1f }; -+ const vec_u8 yvyu1 = (vec_u8) { -+ 0x0, 0x18, 0x1, 0x10, -+ 0x2, 0x19, 0x3, 0x11, -+ 0x4, 0x1a, 0x5, 0x12, -+ 0x6, 0x1b, 0x7, 0x13 }; -+ const vec_u8 yvyu2 = (vec_u8) { -+ 0x8, 0x1c, 0x9, 0x14, -+ 0xa, 0x1d, 0xb, 0x15, -+ 0xc, 0x1e, 0xd, 0x16, -+ 0xe, 0x1f, 0xf, 0x17 }; -+ const vec_u8 uyvy1 = (vec_u8) { -+ 0x10, 0x0, 0x18, 0x1, -+ 0x11, 0x2, 0x19, 0x3, -+ 0x12, 0x4, 0x1a, 0x5, -+ 0x13, 0x6, 0x1b, 0x7 }; -+ const vec_u8 uyvy2 = (vec_u8) { -+ 0x14, 0x8, 0x1c, 0x9, -+ 0x15, 0xa, 0x1d, 0xb, -+ 0x16, 0xc, 0x1e, 0xd, -+ 0x17, 0xe, 0x1f, 0xf }; - - vd1 = vec_packsu(vy1, vy2); - vd2 = vec_packsu(vu, vv); -@@ -1428,11 +1428,11 @@ yuv2422_X_vsx_template(SwsContext *c, co - int y, enum AVPixelFormat target) - { - int i, j; -- vector int16_t vy1, vy2, vu, vv; -- vector int32_t vy32[4], vu32[2], vv32[2], tmp, tmp2, tmp3, tmp4; -- vector int16_t vlumFilter[MAX_FILTER_SIZE], vchrFilter[MAX_FILTER_SIZE]; -- const vector int32_t start = vec_splats(1 << 18); -- const vector uint32_t shift19 = vec_splats(19U); -+ vec_s16 vy1, vy2, vu, vv; -+ vec_s32 vy32[4], vu32[2], vv32[2], tmp, tmp2, tmp3, tmp4; -+ vec_s16 vlumFilter[MAX_FILTER_SIZE], vchrFilter[MAX_FILTER_SIZE]; -+ const vec_s32 start = vec_splats(1 << 18); -+ const vec_u32 shift19 = vec_splats(19U); - - for (i = 0; i < lumFilterSize; i++) - vlumFilter[i] = vec_splats(lumFilter[i]); -@@ -1539,11 +1539,11 @@ yuv2422_2_vsx_template(SwsContext *c, co - *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; - const int16_t yalpha1 = 4096 - yalpha; - const int16_t uvalpha1 = 4096 - uvalpha; -- vector int16_t vy1, vy2, vu, vv; -- vector int32_t tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -- const vector int16_t vyalpha1 = vec_splats(yalpha1); -- const vector int16_t vuvalpha1 = vec_splats(uvalpha1); -- const vector uint32_t shift19 = vec_splats(19U); -+ vec_s16 vy1, vy2, vu, vv; -+ vec_s32 tmp, tmp2, tmp3, tmp4, tmp5, tmp6; -+ const vec_s16 vyalpha1 = vec_splats(yalpha1); -+ const vec_s16 vuvalpha1 = vec_splats(uvalpha1); -+ const vec_u32 shift19 = vec_splats(19U); - int i; - av_assert2(yalpha <= 4096U); - av_assert2(uvalpha <= 4096U); -@@ -1568,11 +1568,11 @@ yuv2422_1_vsx_template(SwsContext *c, co - int uvalpha, int y, enum AVPixelFormat target) - { - const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; -- vector int16_t vy1, vy2, vu, vv, tmp; -- const vector int16_t add64 = vec_splats((int16_t) 64); -- const vector int16_t add128 = vec_splats((int16_t) 128); -- const vector uint16_t shift7 = vec_splat_u16(7); -- const vector uint16_t shift8 = vec_splat_u16(8); -+ vec_s16 vy1, vy2, vu, vv, tmp; -+ const vec_s16 add64 = vec_splats((int16_t) 64); -+ const vec_s16 add128 = vec_splats((int16_t) 128); -+ const vec_u16 shift7 = vec_splat_u16(7); -+ const vec_u16 shift8 = vec_splat_u16(8); - int i; - - if (uvalpha < 2048) { -@@ -1666,18 +1666,18 @@ static void hyscale_fast_vsx(SwsContext - { - int i; - unsigned int xpos = 0, xx; -- vector uint8_t vin, vin2, vperm; -- vector int8_t vmul, valpha; -- vector int16_t vtmp, vtmp2, vtmp3, vtmp4; -- vector uint16_t vd_l, vd_r, vcoord16[2]; -- vector uint32_t vcoord[4]; -- const vector uint32_t vadd = (vector uint32_t) { -+ vec_u8 vin, vin2, vperm; -+ vec_s8 vmul, valpha; -+ vec_s16 vtmp, vtmp2, vtmp3, vtmp4; -+ vec_u16 vd_l, vd_r, vcoord16[2]; -+ vec_u32 vcoord[4]; -+ const vec_u32 vadd = (vec_u32) { - 0, - xInc * 1, - xInc * 2, - xInc * 3, - }; -- const vector uint16_t vadd16 = (vector uint16_t) { // Modulo math -+ const vec_u16 vadd16 = (vec_u16) { // Modulo math - 0, - xInc * 1, - xInc * 2, -@@ -1687,10 +1687,10 @@ static void hyscale_fast_vsx(SwsContext - xInc * 6, - xInc * 7, - }; -- const vector uint32_t vshift16 = vec_splats((uint32_t) 16); -- const vector uint16_t vshift9 = vec_splat_u16(9); -- const vector uint8_t vzero = vec_splat_u8(0); -- const vector uint16_t vshift = vec_splat_u16(7); -+ const vec_u32 vshift16 = vec_splats((uint32_t) 16); -+ const vec_u16 vshift9 = vec_splat_u16(9); -+ const vec_u8 vzero = vec_splat_u8(0); -+ const vec_u16 vshift = vec_splat_u16(7); - - for (i = 0; i < dstWidth; i += 16) { - vcoord16[0] = vec_splats((uint16_t) xpos); -@@ -1701,7 +1701,7 @@ static void hyscale_fast_vsx(SwsContext - - vcoord16[0] = vec_sr(vcoord16[0], vshift9); - vcoord16[1] = vec_sr(vcoord16[1], vshift9); -- valpha = (vector int8_t) vec_pack(vcoord16[0], vcoord16[1]); -+ valpha = (vec_s8) vec_pack(vcoord16[0], vcoord16[1]); - - xx = xpos >> 16; - vin = vec_vsx_ld(0, &src[xx]); -@@ -1730,22 +1730,22 @@ static void hyscale_fast_vsx(SwsContext - vin2 = vec_vsx_ld(1, &src[xx]); - vin2 = vec_perm(vin2, vin2, vperm); - -- vmul = (vector int8_t) vec_sub(vin2, vin); -+ vmul = (vec_s8) vec_sub(vin2, vin); - vtmp = vec_mule(vmul, valpha); - vtmp2 = vec_mulo(vmul, valpha); - vtmp3 = vec_mergeh(vtmp, vtmp2); - vtmp4 = vec_mergel(vtmp, vtmp2); - -- vd_l = (vector uint16_t) vec_mergeh(vin, vzero); -- vd_r = (vector uint16_t) vec_mergel(vin, vzero); -+ vd_l = (vec_u16) vec_mergeh(vin, vzero); -+ vd_r = (vec_u16) vec_mergel(vin, vzero); - vd_l = vec_sl(vd_l, vshift); - vd_r = vec_sl(vd_r, vshift); - -- vd_l = vec_add(vd_l, (vector uint16_t) vtmp3); -- vd_r = vec_add(vd_r, (vector uint16_t) vtmp4); -+ vd_l = vec_add(vd_l, (vec_u16) vtmp3); -+ vd_r = vec_add(vd_r, (vec_u16) vtmp4); - -- vec_st((vector int16_t) vd_l, 0, &dst[i]); -- vec_st((vector int16_t) vd_r, 0, &dst[i + 8]); -+ vec_st((vec_s16) vd_l, 0, &dst[i]); -+ vec_st((vec_s16) vd_r, 0, &dst[i + 8]); - - xpos += xInc * 16; - } -@@ -1773,8 +1773,8 @@ static void hyscale_fast_vsx(SwsContext - vd_l = vec_add(vd_l, vtmp3); \ - vd_r = vec_add(vd_r, vtmp4); \ - \ -- vec_st((vector int16_t) vd_l, 0, &out[i]); \ -- vec_st((vector int16_t) vd_r, 0, &out[i + 8]) -+ vec_st((vec_s16) vd_l, 0, &out[i]); \ -+ vec_st((vec_s16) vd_r, 0, &out[i + 8]) - - static void hcscale_fast_vsx(SwsContext *c, int16_t *dst1, int16_t *dst2, - int dstWidth, const uint8_t *src1, -@@ -1782,19 +1782,19 @@ static void hcscale_fast_vsx(SwsContext - { - int i; - unsigned int xpos = 0, xx; -- vector uint8_t vin, vin2, vperm; -- vector uint8_t valpha, valphaxor; -- vector uint16_t vtmp, vtmp2, vtmp3, vtmp4; -- vector uint16_t vd_l, vd_r, vcoord16[2]; -- vector uint32_t vcoord[4]; -- const vector uint8_t vxor = vec_splats((uint8_t) 127); -- const vector uint32_t vadd = (vector uint32_t) { -+ vec_u8 vin, vin2, vperm; -+ vec_u8 valpha, valphaxor; -+ vec_u16 vtmp, vtmp2, vtmp3, vtmp4; -+ vec_u16 vd_l, vd_r, vcoord16[2]; -+ vec_u32 vcoord[4]; -+ const vec_u8 vxor = vec_splats((uint8_t) 127); -+ const vec_u32 vadd = (vec_u32) { - 0, - xInc * 1, - xInc * 2, - xInc * 3, - }; -- const vector uint16_t vadd16 = (vector uint16_t) { // Modulo math -+ const vec_u16 vadd16 = (vec_u16) { // Modulo math - 0, - xInc * 1, - xInc * 2, -@@ -1804,8 +1804,8 @@ static void hcscale_fast_vsx(SwsContext - xInc * 6, - xInc * 7, - }; -- const vector uint32_t vshift16 = vec_splats((uint32_t) 16); -- const vector uint16_t vshift9 = vec_splat_u16(9); -+ const vec_u32 vshift16 = vec_splats((uint32_t) 16); -+ const vec_u16 vshift9 = vec_splat_u16(9); - - for (i = 0; i < dstWidth; i += 16) { - vcoord16[0] = vec_splats((uint16_t) xpos); -@@ -1859,29 +1859,29 @@ static void hScale8To19_vsx(SwsContext * - { - int i, j; - int32_t *dst = (int32_t *) _dst; -- vector int16_t vfilter, vin; -- vector uint8_t vin8; -- vector int32_t vout; -- const vector uint8_t vzero = vec_splat_u8(0); -- const vector uint8_t vunusedtab[8] = { -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -- (vector uint8_t) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, -+ vec_s16 vfilter, vin; -+ vec_u8 vin8; -+ vec_s32 vout; -+ const vec_u8 vzero = vec_splat_u8(0); -+ const vec_u8 vunusedtab[8] = { -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -+ (vec_u8) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, - }; -- const vector uint8_t vunused = vunusedtab[filterSize % 8]; -+ const vec_u8 vunused = vunusedtab[filterSize % 8]; - - if (filterSize == 1) { - for (i = 0; i < dstW; i++) { -@@ -1898,14 +1898,14 @@ static void hScale8To19_vsx(SwsContext * - vout = vec_splat_s32(0); - for (j = 0; j < filterSize; j += 8) { - vin8 = vec_vsx_ld(0, &src[srcPos + j]); -- vin = (vector int16_t) vec_mergeh(vin8, vzero); -+ vin = (vec_s16) vec_mergeh(vin8, vzero); - if (j + 8 > filterSize) // Remove the unused elements on the last round -- vin = vec_perm(vin, (vector int16_t) vzero, vunused); -+ vin = vec_perm(vin, (vec_s16) vzero, vunused); - - vfilter = vec_vsx_ld(0, &filter[filterSize * i + j]); - vout = vec_msums(vin, vfilter, vout); - } -- vout = vec_sums(vout, (vector int32_t) vzero); -+ vout = vec_sums(vout, (vec_s32) vzero); - dst[i] = FFMIN(vout[3] >> 3, (1 << 19) - 1); - } - } -@@ -1921,28 +1921,28 @@ static void hScale16To19_vsx(SwsContext - const uint16_t *src = (const uint16_t *) _src; - int bits = desc->comp[0].depth - 1; - int sh = bits - 4; -- vector int16_t vfilter, vin; -- vector int32_t vout, vtmp, vtmp2, vfilter32_l, vfilter32_r; -- const vector uint8_t vzero = vec_splat_u8(0); -- const vector uint8_t vunusedtab[8] = { -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -- (vector uint8_t) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, -+ vec_s16 vfilter, vin; -+ vec_s32 vout, vtmp, vtmp2, vfilter32_l, vfilter32_r; -+ const vec_u8 vzero = vec_splat_u8(0); -+ const vec_u8 vunusedtab[8] = { -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -+ (vec_u8) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, - }; -- const vector uint8_t vunused = vunusedtab[filterSize % 8]; -+ const vec_u8 vunused = vunusedtab[filterSize % 8]; - - if ((isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16) { - sh = 9; -@@ -1966,16 +1966,16 @@ static void hScale16To19_vsx(SwsContext - const int srcPos = filterPos[i]; - vout = vec_splat_s32(0); - for (j = 0; j < filterSize; j += 8) { -- vin = (vector int16_t) vec_vsx_ld(0, &src[srcPos + j]); -+ vin = (vec_s16) vec_vsx_ld(0, &src[srcPos + j]); - if (j + 8 > filterSize) // Remove the unused elements on the last round -- vin = vec_perm(vin, (vector int16_t) vzero, vunused); -+ vin = vec_perm(vin, (vec_s16) vzero, vunused); - - vfilter = vec_vsx_ld(0, &filter[filterSize * i + j]); - vfilter32_l = vec_unpackh(vfilter); - vfilter32_r = vec_unpackl(vfilter); - -- vtmp = (vector int32_t) vec_mergeh(vin, (vector int16_t) vzero); -- vtmp2 = (vector int32_t) vec_mergel(vin, (vector int16_t) vzero); -+ vtmp = (vec_s32) vec_mergeh(vin, (vec_s16) vzero); -+ vtmp2 = (vec_s32) vec_mergel(vin, (vec_s16) vzero); - - vtmp = vec_mul(vtmp, vfilter32_l); - vtmp2 = vec_mul(vtmp2, vfilter32_r); -@@ -1983,7 +1983,7 @@ static void hScale16To19_vsx(SwsContext - vout = vec_adds(vout, vtmp); - vout = vec_adds(vout, vtmp2); - } -- vout = vec_sums(vout, (vector int32_t) vzero); -+ vout = vec_sums(vout, (vec_s32) vzero); - dst[i] = FFMIN(vout[3] >> sh, (1 << 19) - 1); - } - } -@@ -1997,28 +1997,28 @@ static void hScale16To15_vsx(SwsContext - int i, j; - const uint16_t *src = (const uint16_t *) _src; - int sh = desc->comp[0].depth - 1; -- vector int16_t vfilter, vin; -- vector int32_t vout, vtmp, vtmp2, vfilter32_l, vfilter32_r; -- const vector uint8_t vzero = vec_splat_u8(0); -- const vector uint8_t vunusedtab[8] = { -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -- (vector uint8_t) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -- (vector uint8_t) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -- 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, -+ vec_s16 vfilter, vin; -+ vec_s32 vout, vtmp, vtmp2, vfilter32_l, vfilter32_r; -+ const vec_u8 vzero = vec_splat_u8(0); -+ const vec_u8 vunusedtab[8] = { -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}, -+ (vec_u8) {0x0, 0x1, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x10, 0x10, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x10, 0x10, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0x10, 0x10, 0x10, 0x10}, -+ (vec_u8) {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, -+ 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0x10, 0x10}, - }; -- const vector uint8_t vunused = vunusedtab[filterSize % 8]; -+ const vec_u8 vunused = vunusedtab[filterSize % 8]; - - if (sh<15) { - sh = isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8 ? 13 : (desc->comp[0].depth - 1); -@@ -2042,16 +2042,16 @@ static void hScale16To15_vsx(SwsContext - const int srcPos = filterPos[i]; - vout = vec_splat_s32(0); - for (j = 0; j < filterSize; j += 8) { -- vin = (vector int16_t) vec_vsx_ld(0, &src[srcPos + j]); -+ vin = (vec_s16) vec_vsx_ld(0, &src[srcPos + j]); - if (j + 8 > filterSize) // Remove the unused elements on the last round -- vin = vec_perm(vin, (vector int16_t) vzero, vunused); -+ vin = vec_perm(vin, (vec_s16) vzero, vunused); - - vfilter = vec_vsx_ld(0, &filter[filterSize * i + j]); - vfilter32_l = vec_unpackh(vfilter); - vfilter32_r = vec_unpackl(vfilter); - -- vtmp = (vector int32_t) vec_mergeh(vin, (vector int16_t) vzero); -- vtmp2 = (vector int32_t) vec_mergel(vin, (vector int16_t) vzero); -+ vtmp = (vec_s32) vec_mergeh(vin, (vec_s16) vzero); -+ vtmp2 = (vec_s32) vec_mergel(vin, (vec_s16) vzero); - - vtmp = vec_mul(vtmp, vfilter32_l); - vtmp2 = vec_mul(vtmp2, vfilter32_r); -@@ -2059,7 +2059,7 @@ static void hScale16To15_vsx(SwsContext - vout = vec_adds(vout, vtmp); - vout = vec_adds(vout, vtmp2); - } -- vout = vec_sums(vout, (vector int32_t) vzero); -+ vout = vec_sums(vout, (vec_s32) vzero); - dst[i] = FFMIN(vout[3] >> sh, (1 << 15) - 1); - } - } From 74e3fe2705aa58af37f8baccb69417e0f5f28391adb3d06c14c45ae91f43700b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 18 Jun 2020 03:38:01 +0000 Subject: [PATCH 03/13] - Add ffmpeg-altivec-build.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=123 --- ffmpeg-4.changes | 1 + ffmpeg-4.spec | 5 +++-- ffmpeg-altivec-build.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 ffmpeg-altivec-build.patch diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index fd5c9b4..bfb2790 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -16,6 +16,7 @@ Wed Jun 17 16:32:04 UTC 2020 - Jan Engelhardt ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch, 929e5159bc13da374b83f5627879c607acce180b.patch (merged) +- Add ffmpeg-altivec-build.patch ------------------------------------------------------------------- Fri Jun 5 16:21:42 UTC 2020 - Bjørn Lie diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 5cfb467..604e9cf 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -111,6 +111,7 @@ Patch1: ffmpeg-arm6l.diff Patch2: ffmpeg-new-coder-errors.diff Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch +Patch5: ffmpeg-altivec-build.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel @@ -198,7 +199,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?sleX_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -675,7 +676,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sleX_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif diff --git a/ffmpeg-altivec-build.patch b/ffmpeg-altivec-build.patch new file mode 100644 index 0000000..312a0d4 --- /dev/null +++ b/ffmpeg-altivec-build.patch @@ -0,0 +1,27 @@ +From: Jan Engelhardt +Date: 2020-06-18 00:40:03.633300733 +0200 + +The standard ppc64 build tries to compile yuv2rgb_altivec, but this fails +because -mvsx is not in use. + +libswscale/ppc/yuv2rgb_altivec.c: In function 'altivec_yuv2_abgr': +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: implicit declaration of function 'vec_xl'; did you mean 'vec_rl'? [-Werror=implicit-funct +ion-declaration] + 338 | y0 = vec_xl(0, y1i); \ +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type '__vector unsigned char' {aka '__vector(16) unsigned char'} from type 'int' + 338 | y0 = vec_xl(0, y1i); \ + +--- + libswscale/ppc/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ffmpeg-4.3/libswscale/ppc/Makefile +=================================================================== +--- ffmpeg-4.3.orig/libswscale/ppc/Makefile ++++ ffmpeg-4.3/libswscale/ppc/Makefile +@@ -1,4 +1,4 @@ +-OBJS += ppc/swscale_altivec.o \ ++VSX-OBJS += ppc/swscale_altivec.o \ + ppc/yuv2rgb_altivec.o \ + ppc/yuv2yuv_altivec.o \ + ppc/swscale_vsx.o From d0c6488c335c12fd8d87d2b83ac33a56dec232d29868075e83b02dbb16d36151 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 18 Jun 2020 03:55:02 +0000 Subject: [PATCH 04/13] Remove ffmpeg-altivec-build.patch again. osc build with qemu did not complete; and real build completed but failed to link. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=124 --- ffmpeg-4.changes | 1 - ffmpeg-4.spec | 1 - ffmpeg-altivec-build.patch | 27 --------------------------- 3 files changed, 29 deletions(-) delete mode 100644 ffmpeg-altivec-build.patch diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index bfb2790..fd5c9b4 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -16,7 +16,6 @@ Wed Jun 17 16:32:04 UTC 2020 - Jan Engelhardt ffmpeg4_swscale_fix_altivec_vsx_recent_gcc.patch, 929e5159bc13da374b83f5627879c607acce180b.patch (merged) -- Add ffmpeg-altivec-build.patch ------------------------------------------------------------------- Fri Jun 5 16:21:42 UTC 2020 - Bjørn Lie diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 604e9cf..9a66f75 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -111,7 +111,6 @@ Patch1: ffmpeg-arm6l.diff Patch2: ffmpeg-new-coder-errors.diff Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch -Patch5: ffmpeg-altivec-build.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel diff --git a/ffmpeg-altivec-build.patch b/ffmpeg-altivec-build.patch deleted file mode 100644 index 312a0d4..0000000 --- a/ffmpeg-altivec-build.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Jan Engelhardt -Date: 2020-06-18 00:40:03.633300733 +0200 - -The standard ppc64 build tries to compile yuv2rgb_altivec, but this fails -because -mvsx is not in use. - -libswscale/ppc/yuv2rgb_altivec.c: In function 'altivec_yuv2_abgr': -libswscale/ppc/yuv2rgb_altivec.c:338:18: error: implicit declaration of function 'vec_xl'; did you mean 'vec_rl'? [-Werror=implicit-funct -ion-declaration] - 338 | y0 = vec_xl(0, y1i); \ -libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type '__vector unsigned char' {aka '__vector(16) unsigned char'} from type 'int' - 338 | y0 = vec_xl(0, y1i); \ - ---- - libswscale/ppc/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: ffmpeg-4.3/libswscale/ppc/Makefile -=================================================================== ---- ffmpeg-4.3.orig/libswscale/ppc/Makefile -+++ ffmpeg-4.3/libswscale/ppc/Makefile -@@ -1,4 +1,4 @@ --OBJS += ppc/swscale_altivec.o \ -+VSX-OBJS += ppc/swscale_altivec.o \ - ppc/yuv2rgb_altivec.o \ - ppc/yuv2yuv_altivec.o \ - ppc/swscale_vsx.o From 2a43e2c0bb1ececf05cf083f84afee2a65d784f936ce5c16529d7ef994d57152 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 4 Jul 2020 22:16:36 +0000 Subject: [PATCH 05/13] - Add soversion.patch to workaround upstream ABI breakage. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=125 --- baselibs.conf | 18 ++--- ffmpeg-4.changes | 5 ++ ffmpeg-4.spec | 169 ++++++++++++++++++++++++----------------------- soversion.patch | 41 ++++++++++++ 4 files changed, 140 insertions(+), 93 deletions(-) create mode 100644 soversion.patch diff --git a/baselibs.conf b/baselibs.conf index a1e21dc..aa2578a 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1,9 @@ -libavcodec58 -libavdevice58 -libavfilter7 -libavformat58 -libavresample4 -libavutil56 -libpostproc55 -libswresample3 -libswscale5 +libavcodec58suse0 +libavdevice58suse0 +libavfilter7suse0 +libavformat58suse0 +libavresample4suse0 +libavutil56suse0 +libpostproc55suse0 +libswresample3suse0 +libswscale5suse0 diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index fd5c9b4..e4eab4e 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 4 22:09:51 UTC 2020 - Jan Engelhardt + +- Add soversion.patch to workaround upstream ABI breakage. + ------------------------------------------------------------------- Wed Jun 17 16:32:04 UTC 2020 - Jan Engelhardt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 9a66f75..8142d48 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -111,6 +111,7 @@ 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 BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel @@ -198,7 +199,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?xsle_version} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -236,15 +237,15 @@ Provides: ffmpeg-tools = %version Obsoletes: ffmpeg-tools < %version Provides: ffmpeg = %version Obsoletes: ffmpeg < %version -Requires: libavcodec58 = %version-%release -Requires: libavdevice58 = %version-%release -Requires: libavfilter7 = %version-%release -Requires: libavformat58 = %version-%release -Requires: libavresample4 = %version-%release -Requires: libavutil56 = %version-%release -Requires: libpostproc55 = %version-%release -Requires: libswresample3 = %version-%release -Requires: libswscale5 = %version-%release +Requires: libavcodec58suse0 = %version-%release +Requires: libavdevice58suse0 = %version-%release +Requires: libavfilter7suse0 = %version-%release +Requires: libavformat58suse0 = %version-%release +Requires: libavresample4suse0 = %version-%release +Requires: libavutil56suse0 = %version-%release +Requires: libpostproc55suse0 = %version-%release +Requires: libswresample3suse0 = %version-%release +Requires: libswscale5suse0 = %version-%release %description FFmpeg is a multimedia framework, able to decode, encode, @@ -255,12 +256,12 @@ that humans and machines have created. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavcodec58 +%package -n libavcodec58suse0 Summary: FFmpeg codec library # For mozillas Group: System/Libraries -Requires: libavutil56 = %version-%release -Requires: libswresample3 = %version-%release +Requires: libavutil56suse0 = %version-%release +Requires: libswresample3suse0 = %version-%release Provides: libavcodec = %version-%release %if 0%{?BUILD_ORIG} Provides: libavcodec-full = %version-%release @@ -268,7 +269,7 @@ Provides: libavcodec-full = %version-%release Provides: libavcodec58(unrestricted) %endif -%description -n libavcodec58 +%description -n libavcodec58suse0 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. @@ -284,7 +285,7 @@ Provides: libavcodec-devel = %version-%release Obsoletes: libavcodec-devel < %version-%release Requires: %name-libavresample-devel = %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavcodec58 = %version-%release +Requires: libavcodec58suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -295,15 +296,15 @@ subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice58 +%package -n libavdevice58suse0 Summary: FFmpeg device library Group: System/Libraries -Requires: libavcodec58 = %version-%release -Requires: libavfilter7 = %version-%release -Requires: libavformat58 = %version-%release -Requires: libavutil56 = %version-%release +Requires: libavcodec58suse0 = %version-%release +Requires: libavfilter7suse0 = %version-%release +Requires: libavformat58suse0 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libavdevice58 +%description -n libavdevice58suse0 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, @@ -324,7 +325,7 @@ 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 = %version-%release +Requires: libavdevice58suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -336,18 +337,18 @@ DShow, and ALSA. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavfilter7 +%package -n libavfilter7suse0 Summary: FFmpeg audio and video filtering library Group: System/Libraries -Requires: libavcodec58 = %version-%release -Requires: libavformat58 = %version-%release -Requires: libavresample4 = %version-%release -Requires: libavutil56 = %version-%release -Requires: libpostproc55 = %version-%release -Requires: libswresample3 = %version-%release -Requires: libswscale5 = %version-%release +Requires: libavcodec58suse0 = %version-%release +Requires: libavformat58suse0 = %version-%release +Requires: libavresample4suse0 = %version-%release +Requires: libavutil56suse0 = %version-%release +Requires: libpostproc55suse0 = %version-%release +Requires: libswresample3suse0 = %version-%release +Requires: libswscale5suse0 = %version-%release -%description -n libavfilter7 +%description -n libavfilter7suse0 The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. @@ -363,7 +364,7 @@ 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 = %version-%release +Requires: libavfilter7suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -373,13 +374,13 @@ framework containing several filters, sources and sinks. This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat58 +%package -n libavformat58suse0 Summary: FFmpeg's stream format library Group: System/Libraries -Requires: libavcodec58 = %version-%release -Requires: libavutil56 = %version-%release +Requires: libavcodec58suse0 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libavformat58 +%description -n libavformat58suse0 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 @@ -397,7 +398,7 @@ 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 = %version-%release +Requires: libavformat58suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -409,12 +410,12 @@ container formats. This subpackage contains the headers for FFmpeg libavformat. -%package -n libavresample4 +%package -n libavresample4suse0 Summary: FFmpeg alternate audio resampling library Group: System/Libraries -Requires: libavutil56 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libavresample4 +%description -n libavresample4suse0 An audio resampling library that is being provided for drop-in compatibility with libav. @@ -426,7 +427,7 @@ Group: Development/Libraries/C and C++ Provides: libavresample-devel = %version-%release Obsoletes: libavresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavresample4 = %version-%release +Requires: libavresample4suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -438,11 +439,11 @@ It is advised to use libswresample for new code. This subpackage contains the headers for FFmpeg's copy of libavresample. -%package -n libavutil56 +%package -n libavutil56suse0 Summary: FFmpeg's utility library Group: System/Libraries -%description -n libavutil56 +%description -n libavutil56suse0 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, @@ -454,7 +455,7 @@ 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 = %version-%release +Requires: libavutil56suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -467,12 +468,12 @@ for pixel and sample formats). This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc55 +%package -n libpostproc55suse0 Summary: FFmpeg post-processing library Group: System/Libraries -Requires: libavutil56 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libpostproc55 +%description -n libpostproc55suse0 A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. @@ -483,7 +484,7 @@ Group: Development/Libraries/C and C++ Provides: libpostproc-devel = %version-%release Obsoletes: libpostproc-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libpostproc55 = %version-%release +Requires: libpostproc55suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -494,12 +495,12 @@ correction, linear/cubic interpolating deinterlacing. This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample3 +%package -n libswresample3suse0 Summary: FFmpeg software resampling library Group: System/Libraries -Requires: libavutil56 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libswresample3 +%description -n libswresample3suse0 The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. @@ -509,7 +510,7 @@ Group: Development/Libraries/C and C++ Provides: libswresample-devel = %version-%release Obsoletes: libswresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libswresample3 = %version-%release +Requires: libswresample3suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -519,12 +520,12 @@ sample rates, channel layout and channel formats. This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale5 +%package -n libswscale5suse0 Summary: FFmpeg image scaling and colorspace/pixel conversion library Group: System/Libraries -Requires: libavutil56 = %version-%release +Requires: libavutil56suse0 = %version-%release -%description -n libswscale5 +%description -n libswscale5suse0 The libswscale library performs image scaling and colorspace and pixel format conversion operations. @@ -534,7 +535,7 @@ Group: Development/Libraries/C and C++ Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel Requires: %name-libavutil-devel = %version-%release -Requires: libswscale5 = %version-%release +Requires: libswscale5suse0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -675,7 +676,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?xsle_version} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif @@ -746,24 +747,24 @@ for i in libavformat/options_table.h libavformat/os_support.h \ cp -a $i "$b/%_includedir/ffmpeg/private/$i" done -%post -n libavcodec58 -p /sbin/ldconfig -%postun -n libavcodec58 -p /sbin/ldconfig -%post -n libavdevice58 -p /sbin/ldconfig -%postun -n libavdevice58 -p /sbin/ldconfig -%post -n libavfilter7 -p /sbin/ldconfig -%postun -n libavfilter7 -p /sbin/ldconfig -%post -n libavformat58 -p /sbin/ldconfig -%postun -n libavformat58 -p /sbin/ldconfig -%post -n libavresample4 -p /sbin/ldconfig -%postun -n libavresample4 -p /sbin/ldconfig -%post -n libavutil56 -p /sbin/ldconfig -%postun -n libavutil56 -p /sbin/ldconfig -%post -n libpostproc55 -p /sbin/ldconfig -%postun -n libpostproc55 -p /sbin/ldconfig -%post -n libswresample3 -p /sbin/ldconfig -%postun -n libswresample3 -p /sbin/ldconfig -%post -n libswscale5 -p /sbin/ldconfig -%postun -n libswscale5 -p /sbin/ldconfig +%post -n libavcodec58suse0 -p /sbin/ldconfig +%postun -n libavcodec58suse0 -p /sbin/ldconfig +%post -n libavdevice58suse0 -p /sbin/ldconfig +%postun -n libavdevice58suse0 -p /sbin/ldconfig +%post -n libavfilter7suse0 -p /sbin/ldconfig +%postun -n libavfilter7suse0 -p /sbin/ldconfig +%post -n libavformat58suse0 -p /sbin/ldconfig +%postun -n libavformat58suse0 -p /sbin/ldconfig +%post -n libavresample4suse0 -p /sbin/ldconfig +%postun -n libavresample4suse0 -p /sbin/ldconfig +%post -n libavutil56suse0 -p /sbin/ldconfig +%postun -n libavutil56suse0 -p /sbin/ldconfig +%post -n libpostproc55suse0 -p /sbin/ldconfig +%postun -n libpostproc55suse0 -p /sbin/ldconfig +%post -n libswresample3suse0 -p /sbin/ldconfig +%postun -n libswresample3suse0 -p /sbin/ldconfig +%post -n libswscale5suse0 -p /sbin/ldconfig +%postun -n libswscale5suse0 -p /sbin/ldconfig %files %doc Changelog CREDITS README.md @@ -771,39 +772,39 @@ done %_mandir/man1/ff*.1* %_datadir/ffmpeg/ -%files -n libavcodec58 +%files -n libavcodec58suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavcodec.so.* -%files -n libavdevice58 +%files -n libavdevice58suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavdevice.so.* -%files -n libavfilter7 +%files -n libavfilter7suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavfilter.so.* -%files -n libavformat58 +%files -n libavformat58suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavformat.so.* -%files -n libavresample4 +%files -n libavresample4suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavresample.so.* -%files -n libavutil56 +%files -n libavutil56suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavutil.so.* -%files -n libpostproc55 +%files -n libpostproc55suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libpostproc.so.* -%files -n libswresample3 +%files -n libswresample3suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libswresample.so.* -%files -n libswscale5 +%files -n libswscale5suse0 %license COPYING.GPLv2 LICENSE.md %_libdir/libswscale.so.* diff --git a/soversion.patch b/soversion.patch new file mode 100644 index 0000000..911455a --- /dev/null +++ b/soversion.patch @@ -0,0 +1,41 @@ +From: Jan Engelhardt +Date: 2020-07-04 23:56:54.411950316 +0200 + +User frispete wrote on 2020-6-26 22:13+0000 at +https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4#comment-1257440 +: """Unfortunately, this version is binary incompatible to 4.2.3 in some +aspects. Chromium crashes when accessing some sites, e.g. +https://www.xometry.com/ and push the quote button. Blender cannot export PNG +files anymore""" + +And indeed: + +$ abidiff b42/usr/lib/debug/usr/lib64/libavcodec.so.58.54.100-4.2.3-1.1.x86_64.debug \ + b43/usr/lib/debug/usr/lib64/libavcodec.so.58.91.100-4.3-136.2.x86_64.debug + + [...] in pointed to type 'struct AVCodecContext' at avcodec.h:526:1: + type size changed from 8448 to 8576 (in bits) + [...] + underlying type 'struct AVDCT' at avdct.h:29:1 changed: + type size changed from 896 to 960 (in bits) + +As this struct is made public by way of presenting it in /usr/include, +I conclude: bad upstream, bad upstream! + +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ffmpeg-4.3/configure +=================================================================== +--- ffmpeg-4.3.orig/configure ++++ ffmpeg-4.3/configure +@@ -3794,7 +3794,7 @@ SLIBPREF="lib" + SLIBSUF=".so" + SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)' + SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' +-SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' ++SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)suse0' + LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"' + SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)' + SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' From 44525cb3bff5d98ab246e372c2a28a8fe6910c33e00bf80e2db080e8c9adc2f8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 4 Jul 2020 23:06:30 +0000 Subject: [PATCH 06/13] the @sle expansion is really silly, breaks quilt OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=126 --- ffmpeg-4.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 8142d48..3623d5b 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -199,7 +199,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?xsle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -676,7 +676,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?xsle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif From 75e16319838b5b5a0bff6b086107ec96844a08ba90652263fd9b637923713721 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 6 Jul 2020 11:34:00 +0000 Subject: [PATCH 07/13] Rework soversion.patch based on outcome of mailing list interactions OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=127 --- baselibs.conf | 18 ++--- ffmpeg-4.changes | 2 +- ffmpeg-4.spec | 177 ++++++++++++++++++++++++----------------------- soversion.patch | 26 +++---- 4 files changed, 108 insertions(+), 115 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index aa2578a..9c1a05c 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1,9 @@ -libavcodec58suse0 -libavdevice58suse0 -libavfilter7suse0 -libavformat58suse0 -libavresample4suse0 -libavutil56suse0 -libpostproc55suse0 -libswresample3suse0 -libswscale5suse0 +libavcodec58_91 +libavdevice58_10 +libavfilter7_85 +libavformat58_45 +libavresample4_0 +libavutil56_51 +libpostproc55_7 +libswresample3_7 +libswscale5_7 diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index e4eab4e..f090ee9 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Sat Jul 4 22:09:51 UTC 2020 - Jan Engelhardt -- Add soversion.patch to workaround upstream ABI breakage. +- Add soversion.patch to workaround ELF ABI breakage. ------------------------------------------------------------------- Wed Jun 17 16:32:04 UTC 2020 - Jan Engelhardt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 3623d5b..9d2e14c 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -199,7 +199,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_vxersion} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -237,15 +237,15 @@ Provides: ffmpeg-tools = %version Obsoletes: ffmpeg-tools < %version Provides: ffmpeg = %version Obsoletes: ffmpeg < %version -Requires: libavcodec58suse0 = %version-%release -Requires: libavdevice58suse0 = %version-%release -Requires: libavfilter7suse0 = %version-%release -Requires: libavformat58suse0 = %version-%release -Requires: libavresample4suse0 = %version-%release -Requires: libavutil56suse0 = %version-%release -Requires: libpostproc55suse0 = %version-%release -Requires: libswresample3suse0 = %version-%release -Requires: libswscale5suse0 = %version-%release +Requires: libavcodec58_91 = %version-%release +Requires: libavdevice58_10 = %version-%release +Requires: libavfilter7_85 = %version-%release +Requires: libavformat58_45 = %version-%release +Requires: libavresample4_0 = %version-%release +Requires: libavutil56_51 = %version-%release +Requires: libpostproc55_7 = %version-%release +Requires: libswresample3_7 = %version-%release +Requires: libswscale5_7 = %version-%release %description FFmpeg is a multimedia framework, able to decode, encode, @@ -256,20 +256,21 @@ that humans and machines have created. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavcodec58suse0 +%package -n libavcodec58_91 Summary: FFmpeg codec library -# For mozillas Group: System/Libraries -Requires: libavutil56suse0 = %version-%release -Requires: libswresample3suse0 = %version-%release -Provides: libavcodec = %version-%release +Requires: libavutil56_51 = %version-%release +Requires: libswresample3_7 = %version-%release %if 0%{?BUILD_ORIG} Provides: libavcodec-full = %version-%release -# This can be required by packages likes vlc-codecs - following the shlib name to not get random lib providers -Provides: libavcodec58(unrestricted) +# This can be (and is) required by packages like vlc-codecs - +# do follow the shlib name to not get random lib providers +Provides: libavcodec58_91(unrestricted) %endif +# For mozillas +Provides: libavcodec = %version-%release -%description -n libavcodec58suse0 +%description -n libavcodec58_91 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. @@ -285,7 +286,7 @@ Provides: libavcodec-devel = %version-%release Obsoletes: libavcodec-devel < %version-%release Requires: %name-libavresample-devel = %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavcodec58suse0 = %version-%release +Requires: libavcodec58_91 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -296,15 +297,15 @@ subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice58suse0 +%package -n libavdevice58_10 Summary: FFmpeg device library Group: System/Libraries -Requires: libavcodec58suse0 = %version-%release -Requires: libavfilter7suse0 = %version-%release -Requires: libavformat58suse0 = %version-%release -Requires: libavutil56suse0 = %version-%release +Requires: libavcodec58_91 = %version-%release +Requires: libavfilter7_85 = %version-%release +Requires: libavformat58_45 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libavdevice58suse0 +%description -n libavdevice58_10 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, @@ -325,7 +326,7 @@ 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: libavdevice58suse0 = %version-%release +Requires: libavdevice58_10 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -337,18 +338,18 @@ DShow, and ALSA. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavfilter7suse0 +%package -n libavfilter7_85 Summary: FFmpeg audio and video filtering library Group: System/Libraries -Requires: libavcodec58suse0 = %version-%release -Requires: libavformat58suse0 = %version-%release -Requires: libavresample4suse0 = %version-%release -Requires: libavutil56suse0 = %version-%release -Requires: libpostproc55suse0 = %version-%release -Requires: libswresample3suse0 = %version-%release -Requires: libswscale5suse0 = %version-%release +Requires: libavcodec58_91 = %version-%release +Requires: libavformat58_10 = %version-%release +Requires: libavresample4_0 = %version-%release +Requires: libavutil56_51 = %version-%release +Requires: libpostproc55_7 = %version-%release +Requires: libswresample3_7 = %version-%release +Requires: libswscale5_7 = %version-%release -%description -n libavfilter7suse0 +%description -n libavfilter7_85 The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. @@ -364,7 +365,7 @@ 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: libavfilter7suse0 = %version-%release +Requires: libavfilter7_85 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -374,13 +375,13 @@ framework containing several filters, sources and sinks. This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat58suse0 +%package -n libavformat58_45 Summary: FFmpeg's stream format library Group: System/Libraries -Requires: libavcodec58suse0 = %version-%release -Requires: libavutil56suse0 = %version-%release +Requires: libavcodec58_91 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libavformat58suse0 +%description -n libavformat58_45 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 @@ -398,7 +399,7 @@ Obsoletes: libavformat-devel < %version-%release Requires: %name-libavcodec-devel = %version-%release Requires: %name-libavutil-devel = %version-%release Requires: %name-libswresample-devel = %version-%release -Requires: libavformat58suse0 = %version-%release +Requires: libavformat58_45 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -410,12 +411,12 @@ container formats. This subpackage contains the headers for FFmpeg libavformat. -%package -n libavresample4suse0 +%package -n libavresample4_0 Summary: FFmpeg alternate audio resampling library Group: System/Libraries -Requires: libavutil56suse0 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libavresample4suse0 +%description -n libavresample4_0 An audio resampling library that is being provided for drop-in compatibility with libav. @@ -427,7 +428,7 @@ Group: Development/Libraries/C and C++ Provides: libavresample-devel = %version-%release Obsoletes: libavresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavresample4suse0 = %version-%release +Requires: libavresample4_0 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -439,11 +440,11 @@ It is advised to use libswresample for new code. This subpackage contains the headers for FFmpeg's copy of libavresample. -%package -n libavutil56suse0 +%package -n libavutil56_51 Summary: FFmpeg's utility library Group: System/Libraries -%description -n libavutil56suse0 +%description -n libavutil56_51 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, @@ -455,7 +456,7 @@ 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: libavutil56suse0 = %version-%release +Requires: libavutil56_51 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -468,12 +469,12 @@ for pixel and sample formats). This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc55suse0 +%package -n libpostproc55_7 Summary: FFmpeg post-processing library Group: System/Libraries -Requires: libavutil56suse0 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libpostproc55suse0 +%description -n libpostproc55_7 A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. @@ -484,7 +485,7 @@ Group: Development/Libraries/C and C++ Provides: libpostproc-devel = %version-%release Obsoletes: libpostproc-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libpostproc55suse0 = %version-%release +Requires: libpostproc55_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -495,12 +496,12 @@ correction, linear/cubic interpolating deinterlacing. This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample3suse0 +%package -n libswresample3_7 Summary: FFmpeg software resampling library Group: System/Libraries -Requires: libavutil56suse0 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libswresample3suse0 +%description -n libswresample3_7 The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. @@ -510,7 +511,7 @@ Group: Development/Libraries/C and C++ Provides: libswresample-devel = %version-%release Obsoletes: libswresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libswresample3suse0 = %version-%release +Requires: libswresample3_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -520,12 +521,12 @@ sample rates, channel layout and channel formats. This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale5suse0 +%package -n libswscale5_7 Summary: FFmpeg image scaling and colorspace/pixel conversion library Group: System/Libraries -Requires: libavutil56suse0 = %version-%release +Requires: libavutil56_51 = %version-%release -%description -n libswscale5suse0 +%description -n libswscale5_7 The libswscale library performs image scaling and colorspace and pixel format conversion operations. @@ -535,7 +536,7 @@ Group: Development/Libraries/C and C++ Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel Requires: %name-libavutil-devel = %version-%release -Requires: libswscale5suse0 = %version-%release +Requires: libswscale5_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -676,7 +677,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_vxersion} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif @@ -747,24 +748,24 @@ for i in libavformat/options_table.h libavformat/os_support.h \ cp -a $i "$b/%_includedir/ffmpeg/private/$i" done -%post -n libavcodec58suse0 -p /sbin/ldconfig -%postun -n libavcodec58suse0 -p /sbin/ldconfig -%post -n libavdevice58suse0 -p /sbin/ldconfig -%postun -n libavdevice58suse0 -p /sbin/ldconfig -%post -n libavfilter7suse0 -p /sbin/ldconfig -%postun -n libavfilter7suse0 -p /sbin/ldconfig -%post -n libavformat58suse0 -p /sbin/ldconfig -%postun -n libavformat58suse0 -p /sbin/ldconfig -%post -n libavresample4suse0 -p /sbin/ldconfig -%postun -n libavresample4suse0 -p /sbin/ldconfig -%post -n libavutil56suse0 -p /sbin/ldconfig -%postun -n libavutil56suse0 -p /sbin/ldconfig -%post -n libpostproc55suse0 -p /sbin/ldconfig -%postun -n libpostproc55suse0 -p /sbin/ldconfig -%post -n libswresample3suse0 -p /sbin/ldconfig -%postun -n libswresample3suse0 -p /sbin/ldconfig -%post -n libswscale5suse0 -p /sbin/ldconfig -%postun -n libswscale5suse0 -p /sbin/ldconfig +%post -n libavcodec58_91 -p /sbin/ldconfig +%postun -n libavcodec58_91 -p /sbin/ldconfig +%post -n libavdevice58_10 -p /sbin/ldconfig +%postun -n libavdevice58_10 -p /sbin/ldconfig +%post -n libavfilter7_85 -p /sbin/ldconfig +%postun -n libavfilter7_85 -p /sbin/ldconfig +%post -n libavformat58_45 -p /sbin/ldconfig +%postun -n libavformat58_45 -p /sbin/ldconfig +%post -n libavresample4_0 -p /sbin/ldconfig +%postun -n libavresample4_0 -p /sbin/ldconfig +%post -n libavutil56_51 -p /sbin/ldconfig +%postun -n libavutil56_51 -p /sbin/ldconfig +%post -n libpostproc55_7 -p /sbin/ldconfig +%postun -n libpostproc55_7 -p /sbin/ldconfig +%post -n libswresample3_7 -p /sbin/ldconfig +%postun -n libswresample3_7 -p /sbin/ldconfig +%post -n libswscale5_7 -p /sbin/ldconfig +%postun -n libswscale5_7 -p /sbin/ldconfig %files %doc Changelog CREDITS README.md @@ -772,39 +773,39 @@ done %_mandir/man1/ff*.1* %_datadir/ffmpeg/ -%files -n libavcodec58suse0 +%files -n libavcodec58_91 %license COPYING.GPLv2 LICENSE.md %_libdir/libavcodec.so.* -%files -n libavdevice58suse0 +%files -n libavdevice58_10 %license COPYING.GPLv2 LICENSE.md %_libdir/libavdevice.so.* -%files -n libavfilter7suse0 +%files -n libavfilter7_85 %license COPYING.GPLv2 LICENSE.md %_libdir/libavfilter.so.* -%files -n libavformat58suse0 +%files -n libavformat58_45 %license COPYING.GPLv2 LICENSE.md %_libdir/libavformat.so.* -%files -n libavresample4suse0 +%files -n libavresample4_0 %license COPYING.GPLv2 LICENSE.md %_libdir/libavresample.so.* -%files -n libavutil56suse0 +%files -n libavutil56_51 %license COPYING.GPLv2 LICENSE.md %_libdir/libavutil.so.* -%files -n libpostproc55suse0 +%files -n libpostproc55_7 %license COPYING.GPLv2 LICENSE.md %_libdir/libpostproc.so.* -%files -n libswresample3suse0 +%files -n libswresample3_7 %license COPYING.GPLv2 LICENSE.md %_libdir/libswresample.so.* -%files -n libswscale5suse0 +%files -n libswscale5_7 %license COPYING.GPLv2 LICENSE.md %_libdir/libswscale.so.* diff --git a/soversion.patch b/soversion.patch index 911455a..8fb428c 100644 --- a/soversion.patch +++ b/soversion.patch @@ -4,23 +4,15 @@ Date: 2020-07-04 23:56:54.411950316 +0200 User frispete wrote on 2020-6-26 22:13+0000 at https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4#comment-1257440 : """Unfortunately, this version is binary incompatible to 4.2.3 in some -aspects. Chromium crashes when accessing some sites, e.g. -https://www.xometry.com/ and push the quote button. Blender cannot export PNG -files anymore""" +aspects. [...]""" -And indeed: - -$ abidiff b42/usr/lib/debug/usr/lib64/libavcodec.so.58.54.100-4.2.3-1.1.x86_64.debug \ - b43/usr/lib/debug/usr/lib64/libavcodec.so.58.91.100-4.3-136.2.x86_64.debug - - [...] in pointed to type 'struct AVCodecContext' at avcodec.h:526:1: - type size changed from 8448 to 8576 (in bits) - [...] - underlying type 'struct AVDCT' at avdct.h:29:1 changed: - type size changed from 896 to 960 (in bits) - -As this struct is made public by way of presenting it in /usr/include, -I conclude: bad upstream, bad upstream! +Further discussion on the mailing list explored this topic, and +revealed that ELF symbol versioning is lacklusterly implemented in +ffmpeg, which can cause inadvertent mixing of library versions on +openSUSE, and precompiled Linux distributions in general. It is +unclear when upstream will have implemented a solution. Until then, +we will need to tighten the requirements between packages, to which +end we stretch the SOVERSION to include MINOR. --- configure | 2 +- @@ -35,7 +27,7 @@ Index: ffmpeg-4.3/configure SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)' SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' -SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' -+SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)suse0' ++SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)' LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"' SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)' SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' From 3f671edcdce0cd19445d1c4c25f4c03062ad4c6e4128a4ebc0b1fd117520bd98 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 6 Jul 2020 11:36:04 +0000 Subject: [PATCH 08/13] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=128 --- ffmpeg-4.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 9d2e14c..54051bd 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -342,7 +342,7 @@ This subpackage contains the headers for FFmpeg libavcodec. Summary: FFmpeg audio and video filtering library Group: System/Libraries Requires: libavcodec58_91 = %version-%release -Requires: libavformat58_10 = %version-%release +Requires: libavformat58_45 = %version-%release Requires: libavresample4_0 = %version-%release Requires: libavutil56_51 = %version-%release Requires: libpostproc55_7 = %version-%release From 7b5a6a679f1c55361b67a21c8258035436d566546a7333179211b9937ee59695 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 6 Jul 2020 12:57:43 +0000 Subject: [PATCH 09/13] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=129 --- baselibs.conf | 2 ++ ffmpeg-4.spec | 2 ++ 2 files changed, 4 insertions(+) diff --git a/baselibs.conf b/baselibs.conf index 9c1a05c..ddf12ca 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -3,6 +3,8 @@ libavdevice58_10 libavfilter7_85 libavformat58_45 libavresample4_0 + obsoletes "libavresample4 < -" + provides "libavresample4 = -" libavutil56_51 libpostproc55_7 libswresample3_7 diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 54051bd..c8e01f8 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -415,6 +415,8 @@ This subpackage contains the headers for FFmpeg libavformat. Summary: FFmpeg alternate audio resampling library Group: System/Libraries Requires: libavutil56_51 = %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 From 30fc53266382e9f911617183f2203b545c0571b8a846812fd345273edfce8fa3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 6 Jul 2020 13:00:53 +0000 Subject: [PATCH 10/13] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=130 --- baselibs.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index ddf12ca..c16f59e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -3,8 +3,8 @@ libavdevice58_10 libavfilter7_85 libavformat58_45 libavresample4_0 - obsoletes "libavresample4 < -" - provides "libavresample4 = -" + obsoletes "libavresample4- < -" + provides "libavresample4- = -" libavutil56_51 libpostproc55_7 libswresample3_7 From 072cfd6454bd5f16f3dd8ee4b9a36f56a552c2ae49cca12a12fa4b09b96e1efa Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 7 Jul 2020 10:15:40 +0000 Subject: [PATCH 11/13] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=131 --- ffmpeg-4.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index c8e01f8..4821920 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -199,7 +199,7 @@ BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) -%if 0%{?suse_version} >= 1550 || 0%{?sle_vxersion} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 BuildRequires: pkgconfig(libmfx) %endif @@ -679,7 +679,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with lv2} --enable-lv2 \ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_vxersion} >= 150200 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200 %ifarch x86_64 --enable-libmfx \ %endif From dcc3020adf069bdb12c24ed4eaa93935129eaf7962371ee1dbebc5afd571b46a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 8 Jul 2020 12:44:59 +0000 Subject: [PATCH 12/13] sometimes baselibs supports , sometimes doesn't, feels totally arbitrary OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=132 --- baselibs.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index c16f59e..9e618c7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -3,8 +3,8 @@ libavdevice58_10 libavfilter7_85 libavformat58_45 libavresample4_0 - obsoletes "libavresample4- < -" - provides "libavresample4- = -" + obsoletes "libavresample4- < " + provides "libavresample4- = " libavutil56_51 libpostproc55_7 libswresample3_7 From 2b03c06e29151ba9fcdd45e74135386eed6c23e5dada07b5d7d3eb8713b87d16 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 12 Jul 2020 19:23:22 +0000 Subject: [PATCH 13/13] Accepting request 820567 from home:iznogood:branches:multimedia:libs - Update to version 4.3.1: * Stable bug fix release, mainly codecs and format fixes. OBS-URL: https://build.opensuse.org/request/show/820567 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=133 --- ffmpeg-4.3.1.tar.xz | 3 +++ ffmpeg-4.3.1.tar.xz.asc | 11 +++++++++++ ffmpeg-4.3.tar.xz | 3 --- ffmpeg-4.3.tar.xz.asc | 11 ----------- ffmpeg-4.changes | 6 ++++++ ffmpeg-4.spec | 2 +- 6 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 ffmpeg-4.3.1.tar.xz create mode 100644 ffmpeg-4.3.1.tar.xz.asc delete mode 100644 ffmpeg-4.3.tar.xz delete mode 100644 ffmpeg-4.3.tar.xz.asc diff --git a/ffmpeg-4.3.1.tar.xz b/ffmpeg-4.3.1.tar.xz new file mode 100644 index 0000000..7f21816 --- /dev/null +++ b/ffmpeg-4.3.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb +size 9379424 diff --git a/ffmpeg-4.3.1.tar.xz.asc b/ffmpeg-4.3.1.tar.xz.asc new file mode 100644 index 0000000..a49abc4 --- /dev/null +++ b/ffmpeg-4.3.1.tar.xz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAl8Jl1kYHGZmbXBlZy1k +ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYeqMH/0oOMa5UQJuP9w3nxjuAI1rF +AhXFU7y1IKgHhxfYafkhcZphwbm3u8lpkI4E5dfG369WyE4Svi/t0+kI0iqEXQgn +0Vxk0gr79sTjoCm8HZssngo0ourLPWAJnoip6rdxlPB7bAEh69M3qX3xuKwSklw1 +Vu3L3bpmie3lAKqqeRv7JMxkKpg6fZMeQP4f7LCWpIFYlCn93icYTTF28L5T89yB +mt8WcYIU2IO0FxEGlh6ayxrr+/ioG6N8iE1q7laBRAFVU/OsARY9M/6RHFMSrm42 +4l65+Qh+IwQVzpFsnZ/S2iRD7QCZX+noAd+EH/S4vICNn+snBxIlxuYSDL6uqF4= +=AoNS +-----END PGP SIGNATURE----- diff --git a/ffmpeg-4.3.tar.xz b/ffmpeg-4.3.tar.xz deleted file mode 100644 index 6d5f2a2..0000000 --- a/ffmpeg-4.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d0ad06484f44bcb97eba5e93c40bcb893890f9f64aeb43e46cd9bb4cbd6795d -size 9378360 diff --git a/ffmpeg-4.3.tar.xz.asc b/ffmpeg-4.3.tar.xz.asc deleted file mode 100644 index 1f0173d..0000000 --- a/ffmpeg-4.3.tar.xz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAl7nxeAYHGZmbXBlZy1k -ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYJecH/3uHwKTAMgNjUAbNE1uF/Vw7 -aoVaQrNP2faDLheLtmQ0YePDeO2jUhSUmbWylvzN2GFw1CxAXpo0LL2VjdP/JSWv -OFBxz5zjsehJNLIBvrp0yoAroQY/V5UExfsrggfr3Va0vnC/Sa3h0Kekg5Z4JHaY -7axHaQMy77a8VSr7fJjb9EWwiNKJgpJeBN/jcZ/Go8nWawIqFYOkzWA3BLwWkrNF -EH7Fpb0Al7C0mvNlYImFdWWzvlfQ0FJi/1+brrh8UIfOvFJu/eW5vhGEVYb3q0hR -/bmzcXCVQYym6qfVB/7EEijfezMBiFm8ax1+xaOEaY8cJAkjbFTfAHZod3Re6dU= -=1Fy2 ------END PGP SIGNATURE----- diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index f090ee9..e930615 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jul 12 16:08:10 UTC 2020 - Bjørn Lie + +- Update to version 4.3.1: + * Stable bug fix release, mainly codecs and format fixes. + ------------------------------------------------------------------- Sat Jul 4 22:09:51 UTC 2020 - Jan Engelhardt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 4821920..08c945a 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -92,7 +92,7 @@ %define _major_version 4 %define _major_expected 5 Name: ffmpeg-4 -Version: 4.3 +Version: 4.3.1 Release: 0 Summary: Library for working with various multimedia formats License: GPL-3.0-or-later