[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-05-01 Thread Sam James
commit: 90cfa72c27592c0d73ec8040f621e70153c9efbc
Author: Sam James  gentoo  org>
AuthorDate: Thu May  2 05:20:31 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu May  2 05:20:31 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90cfa72c

media-video/ffmpeg: backport (serious) memory leak fix

Closes: https://bugs.gentoo.org/931059
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild  | 616 +
 .../ffmpeg/files/ffmpeg-6.1.1-memory-leak.patch| 129 +
 2 files changed, 745 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild
new file mode 100644
index ..9f5bd8424035
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild
@@ -0,0 +1,616 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=58.60.60
+
+SOC_PATCH="ffmpeg-rpi-6.1-r3.patch"
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-r3"
+   EGIT_MIN_CLONE_TYPE="single"
+   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
+fi
+
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
+HOMEPAGE="https://ffmpeg.org/;
+SRC_URI="soc? ( https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH} )"
+if [ "${PV#}" != "${PV}" ] ; then
+   :
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI+=" mirror://gentoo/${P}.tar.xz"
+else # Release
+   inherit verify-sig
+
+   SRC_URI+="
+   https://ffmpeg.org/releases/${P/_/-}.tar.xz
+   verify-sig? (
+   https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc
+   soc? ( 
https://dev.gentoo.org/~chewi/distfiles/${SOC_PATCH}.asc )
+   )
+   "
+
+   BDEPEND="
+   verify-sig? (
+   sec-keys/openpgp-keys-ffmpeg
+   soc? ( sec-keys/openpgp-keys-gentoo-developers )
+   )
+   "
+
+   src_unpack() {
+   if use verify-sig; then
+   verify-sig_verify_detached 
"${DISTDIR}"/${P/_/-}.tar.xz{,.asc} /usr/share/openpgp-keys/ffmpeg.asc
+   use soc && verify-sig_verify_detached 
"${DISTDIR}"/${SOC_PATCH}{,.asc} /usr/share/openpgp-keys/gentoo-developers.asc
+   fi
+   default
+   }
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   gmp? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   libaribb24? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc 
~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt 
+gnutls gmp
+   +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
+   openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi 
vdpau vulkan
+   X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
+   # libavdevice options
+   cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca 
openal
+   opengl
+   # indevs
+   libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
+   # decoders
+   amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 
+dav1d:libdav1d fdk:libfdk-aac
+   jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme 
gsm:libgsm
+   libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc 
librtmp ssh:libssh
+   

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-04-09 Thread Sam James
commit: 2a7ae185d12135418fee061d38e3d2e9ae497ddd
Author: germ  outlook  com>
AuthorDate: Tue Apr  9 23:13:30 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Apr 10 01:46:06 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7ae185

media-video/ffmpeg: fix build with vulkan-headers-1.3.280.0

Adds 
https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/fef22c87ada4517441701e6e61e062c9f4399c8e

[sam: Fixup commit message and add references to patch.]

Closes: https://bugs.gentoo.org/928593
Signed-off-by: germ  outlook.com>
Closes: https://github.com/gentoo/gentoo/pull/36186
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.1.1-r5.ebuild  |   2 +
 .../ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch  | 127 +
 2 files changed, 129 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r5.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1.1-r5.ebuild
index 856822a88c5b..94fe73865b5b 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.1-r5.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r5.ebuild
@@ -381,6 +381,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
"${FILESDIR}"/${PN}-6.1-gcc-14.patch
"${FILESDIR}"/${PN}-6.0.1-alignment.patch
+   "${FILESDIR}"/ffmpeg-6.1.1-vulkan-rename.patch
+
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch 
b/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch
new file mode 100644
index ..b564e3874485
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.1.1-vulkan-rename.patch
@@ -0,0 +1,127 @@
+https://bugs.gentoo.org/928593
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/fef22c87ada4517441701e6e61e062c9f4399c8e
+
+From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Jan=20Ekstr=C3=B6m?= 
+Date: Wed, 14 Feb 2024 22:40:54 +0200
+Subject: [PATCH] {avcodec,tests}: rename the bundled Mesa AV1 vulkan video
+ headers
+
+This together with adjusting the inclusion define allows for the
+build to not fail with latest Vulkan-Headers that contain the
+stabilized Vulkan AV1 decoding definitions.
+
+Compilation fails currently as the AV1 header is getting included
+via hwcontext_vulkan.h ->  -> vulkan_core.h, which
+finally includes vk_video/vulkan_video_codec_av1std.h and the decode
+header, leading to the bundled header to never defining anything
+due to the inclusion define being the same.
+
+This fix is imperfect, as it leads to additional re-definition
+warnings for things such as
+VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is
+not clear how to otherwise have the bundled version trump the
+actually standardized one for a short-term compilation fix.
+
+(cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24)
+---
+ libavcodec/Makefile   | 4 ++--
+ libavcodec/vulkan_video.h | 4 ++--
+ ...v1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} | 4 ++--
+ ..._video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} | 4 ++--
+ tests/ref/fate/source | 4 ++--
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+ rename libavcodec/{vulkan_video_codec_av1std_decode.h => 
vulkan_video_codec_av1std_decode_mesa.h} (89%)
+ rename libavcodec/{vulkan_video_codec_av1std.h => 
vulkan_video_codec_av1std_mesa.h} (99%)
+
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index ec57e53e30..eb25707ef5 100644
+--- a/libavcodec/Makefile
 b/libavcodec/Makefile
+@@ -1284,7 +1284,7 @@ SKIPHEADERS+= %_tablegen.h   
   \
+   aacenc_quantization.h \
+   aacenc_quantization_misc.h\
+   bitstream_template.h  \
+-  vulkan_video_codec_av1std.h   \
++  vulkan_video_codec_av1std_mesa.h \
+   $(ARCH)/vpx_arith.h  \
+ 
+ SKIPHEADERS-$(CONFIG_AMF)  += amfenc.h
+@@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
+ SKIPHEADERS-$(CONFIG_VAAPI)+= vaapi_decode.h vaapi_hevc.h 
vaapi_encode.h
+ SKIPHEADERS-$(CONFIG_VDPAU)+= vdpau.h vdpau_internal.h
+ SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h
+-SKIPHEADERS-$(CONFIG_VULKAN)   += vulkan.h vulkan_video.h 
vulkan_decode.h vulkan_video_codec_av1std_decode.h
++SKIPHEADERS-$(CONFIG_VULKAN)   += vulkan.h vulkan_video.h 
vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h
+ SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h 
v4l2_m2m.h
+ SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h
+ 
+diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h
+index 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-03-11 Thread Sam James
commit: 0b5305498974c036f83c71adc8fb4a40106858c7
Author: Sam James  gentoo  org>
AuthorDate: Tue Mar 12 03:35:38 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar 12 03:36:54 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b530549

media-video/ffmpeg: fix build w/ newer libjxl

Closes: https://bugs.gentoo.org/924431
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild  |   1 +
 .../ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch | 112 +
 2 files changed, 113 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild
index 8cf74299df2e..4393adc2906b 100644
--- a/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild
@@ -348,6 +348,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
"${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
"${FILESDIR}"/${PN}-6.0.1-alignment.patch
+   "${FILESDIR}"/${PN}-6.0.1-libjxl-0.9.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch 
b/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch
new file mode 100644
index ..10c216ec4c88
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.0.1-libjxl-0.9.patch
@@ -0,0 +1,112 @@
+https://bugs.gentoo.org/924431
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=75b1a555a70c178a9166629e43ec2f6250219eb2
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=ac06190a5a11f2b170e7719d769d7c0d65bff3e0
+
+From 75b1a555a70c178a9166629e43ec2f6250219eb2 Mon Sep 17 00:00:00 2001
+From: Leo Izen 
+Date: Sat, 8 Jul 2023 14:43:31 -0400
+Subject: [PATCH] avcodec/libjxldec: build against libjxl 0.9
+
+Git master libjxl changed several function signatures, so this commit
+adds some #ifdefs to handle the new signatures without breaking old
+releases. Do note that old git master development versions of libjxl
+will be broken, but no releases will be.
+
+Signed-off-by: Leo Izen 
+--- a/libavcodec/libjxldec.c
 b/libavcodec/libjxldec.c
+@@ -210,14 +210,22 @@ static int libjxl_get_icc(AVCodecContext *avctx)
+ JxlDecoderStatus jret;
+ /* an ICC profile is present, and we can meaningfully get it,
+  * because the pixel data is not XYB-encoded */
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
+ jret = JxlDecoderGetICCProfileSize(ctx->decoder, >jxl_pixfmt, 
JXL_COLOR_PROFILE_TARGET_DATA, _len);
++#else
++jret = JxlDecoderGetICCProfileSize(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, _len);
++#endif
+ if (jret == JXL_DEC_SUCCESS && icc_len > 0) {
+ av_buffer_unref(>iccp);
+ ctx->iccp = av_buffer_alloc(icc_len);
+ if (!ctx->iccp)
+ return AVERROR(ENOMEM);
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
+ jret = JxlDecoderGetColorAsICCProfile(ctx->decoder, >jxl_pixfmt, 
JXL_COLOR_PROFILE_TARGET_DATA,
+-ctx->iccp->data, icc_len);
++  ctx->iccp->data, icc_len);
++#else
++jret = JxlDecoderGetColorAsICCProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, ctx->iccp->data, icc_len);
++#endif
+ if (jret != JXL_DEC_SUCCESS) {
+ av_log(avctx, AV_LOG_WARNING, "Unable to obtain ICC Profile\n");
+ av_buffer_unref(>iccp);
+@@ -253,12 +261,21 @@ static int libjxl_color_encoding_event(AVCodecContext 
*avctx, AVFrame *frame)
+ /* set this flag if we need to fall back on wide gamut */
+ int fallback = 0;
+ 
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
+ jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, NULL, 
JXL_COLOR_PROFILE_TARGET_ORIGINAL, _color);
++#else
++jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_ORIGINAL, _color);
++#endif
+ if (jret == JXL_DEC_SUCCESS) {
+ /* enum values describe the colors of this image */
+ jret = JxlDecoderSetPreferredColorProfile(ctx->decoder, _color);
+ if (jret == JXL_DEC_SUCCESS)
+-jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
>jxl_pixfmt, JXL_COLOR_PROFILE_TARGET_DATA, _color);
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
++jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
>jxl_pixfmt,
++  
JXL_COLOR_PROFILE_TARGET_DATA, _color);
++#else
++jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, 
JXL_COLOR_PROFILE_TARGET_DATA, _color);
++#endif
+ /* if we couldn't successfully request the pixel data space, we fall 
back on wide gamut */
+ /* this code path is very unlikely to happen in practice */
+ if (jret != JXL_DEC_SUCCESS)
+-- 
+2.30.2
+
+From ac06190a5a11f2b170e7719d769d7c0d65bff3e0 Mon Sep 17 00:00:00 2001
+From: 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-03-09 Thread James Le Cuirot
commit: 9d632b7ec4dd911a86d08711082511f9dd2dd49a
Author: James Le Cuirot  gentoo  org>
AuthorDate: Sat Mar  9 22:16:19 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Sat Mar  9 22:16:19 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d632b7e

media-video/ffmpeg: Patch to fix 4.4.4 with newer glslang

Closes: https://bugs.gentoo.org/926551
Signed-off-by: James Le Cuirot  gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild  |  1 +
 .../ffmpeg/files/ffmpeg-4.4.4-glslang.patch| 25 ++
 2 files changed, 26 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild 
b/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
index 00d867dd517c..748acd8d7375 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
@@ -349,6 +349,7 @@ PATCHES=(
"${FILESDIR}"/${P}-fix-build-svt-av1-1.5.0.patch
"${FILESDIR}"/${PN}-5.1.3-binutils-2.41.patch
"${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
+   "${FILESDIR}"/${PN}-4.4.4-glslang.patch
"${WORKDIR}"/${PN}-4.4.4-texinfo.patch
 )
 

diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch 
b/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch
new file mode 100644
index ..f19bf8e47a42
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.4.4-glslang.patch
@@ -0,0 +1,25 @@
+Bug: https://bugs.gentoo.org/926551
+
+diff -Naur a/configure b/configure
+--- a/configure2024-03-09 22:07:52.005888104 +
 b/configure2024-03-09 22:08:18.634656978 +
+@@ -6374,7 +6374,7 @@
+ enabled libfontconfig && require_pkg_config libfontconfig fontconfig 
"fontconfig/fontconfig.h" FcInit
+ enabled libfreetype   && require_pkg_config libfreetype freetype2 
"ft2build.h FT_FREETYPE_H" FT_Init_FreeType
+ enabled libfribidi&& require_pkg_config libfribidi fribidi fribidi.h 
fribidi_version_info
+-enabled libglslang&& require_cpp libglslang 
glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang 
-lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen 
-lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
++enabled libglslang&& require_cpp libglslang 
glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lSPVRemapper 
-lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
+ enabled libgme&& { check_pkg_config libgme libgme gme/gme.h 
gme_new_emu ||
+require libgme gme/gme.h gme_new_emu -lgme 
-lstdc++; }
+ enabled libgsm&& { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
+diff -Naur a/libavfilter/glslang.cpp b/libavfilter/glslang.cpp
+--- a/libavfilter/glslang.cpp  2023-04-12 19:01:50.0 +0100
 b/libavfilter/glslang.cpp  2024-03-09 22:08:36.210161783 +
+@@ -17,6 +17,7 @@
+  */
+ 
+ #include 
++#include 
+ 
+ extern "C" {
+ #include "libavutil/mem.h"



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-02-28 Thread Sam James
commit: 4e4da320675b49841b4e7f477a6efe3c0413f674
Author: Sam James  gentoo  org>
AuthorDate: Thu Feb 29 05:42:04 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Feb 29 05:44:22 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e4da320

media-video/ffmpeg: fix crash when CPU_FLAGS_x86 and CFLAGS disagree

When CPU_FLAGS_X86 was set to the default for amd64 and CFLAGS was higher
with e.g. -march=native including AVX, we could get crashes because we disable
intrinsics which would otherwise adjust the alignment ffmpeg requests.

Backport an upstream patch for more sensible behaviour.

Note that the upstream patch doesn't apply to 4.4.x but I haven't tried
to backport it manually. Someone is welcome to, but 4.4.x should really be
on its way out by now.

Bug: https://trac.ffmpeg.org/ticket/10549
Bug: https://bugs.gentoo.org/915384
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild  | 607 
 media-video/ffmpeg/ffmpeg-6.1.1-r4.ebuild  | 614 +
 .../ffmpeg/files/ffmpeg-6.0.1-alignment.patch  | 114 
 3 files changed, 1335 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild
new file mode 100644
index ..53a0404e
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild
@@ -0,0 +1,607 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=58.60.60
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-r3"
+   EGIT_MIN_CLONE_TYPE="single"
+   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
+fi
+
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
+HOMEPAGE="https://ffmpeg.org/;
+if [ "${PV#}" != "${PV}" ] ; then
+   SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+   VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc
+   inherit verify-sig
+   SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz;
+   SRC_URI+=" verify-sig? ( 
https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
+
+   BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   gmp? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   libaribb24? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc 
~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt 
+gnutls gmp
+   +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
+   openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi 
vdpau vulkan
+   X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
+   # libavdevice options
+   cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca 
openal
+   opengl
+   # indevs
+   libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
+   # decoders
+   amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 
+dav1d:libdav1d fdk:libfdk-aac
+   jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme 
gsm:libgsm
+   libaribb24 mmal modplug:libmodplug opus:libopus qsv:libvpl 
libilbc librtmp ssh:libssh
+   speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
+   vorbis:libvorbis vpx:libvpx zvbi:libzvbi
+ 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-02-17 Thread James Le Cuirot
commit: ebf0a62268c4b27ffd37234cc8ed9e6054e0053c
Author: James Le Cuirot  gentoo  org>
AuthorDate: Sat Feb 17 14:51:49 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Sat Feb 17 14:52:56 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebf0a622

media-video/ffmpeg: Fix Clang and GCC 14 issues with new RPi patch

Closes: https://bugs.gentoo.org/924558
Closes: https://bugs.gentoo.org/924743
Signed-off-by: James Le Cuirot  gentoo.org>

 media-video/ffmpeg/Manifest  |  2 +-
 media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild|  3 ++-
 media-video/ffmpeg/ffmpeg-.ebuild|  2 +-
 media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch | 13 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 4175fef70c6f..46e2ae80d0e7 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -7,4 +7,4 @@ DIST ffmpeg-6.0.tar.xz 10234012 BLAKE2B 
c70884911f3a3e40fe87473f241a2a56b303f5ab
 DIST ffmpeg-6.0.tar.xz.asc 520 BLAKE2B 
be294d375108b57bca3c687620ce2517c54c99012d82dc7aa1a83d5fe6d5453bd3c8620fdfb743df780cf588983a06a66a458c4e3e454dbe535cbba9da30c48c
 SHA512 
a64cd0f8578fcea4537f5a38634c930d66c8ba4abd3e8e9dcffaeb95c3ad2e754d7bc4fbb5272409d4d32abf8180ef83f7204c6a570b52a37e635efd96cb94ed
 DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 
77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb
 SHA512 
fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5
 DIST ffmpeg-6.1.1.tar.xz.asc 520 BLAKE2B 
801cd976d10363d1f9fc302351b330cb57e609a266407627ef378172f28974f4a18435b8a77b9cc7a8ff7b75701185211739f685629bbda961c3588c15af1221
 SHA512 
0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5
-DIST ffmpeg-rpi-6.1.patch 1356823 BLAKE2B 
094404eac6d1e43ac094634fa662ce312807013b8af3f80ced03b3d85f2547f803c71181b567c4db2756b2ea54b9bbaf7516a1f72a389d0889c2531edd177275
 SHA512 
7bdb857146d01ac54ce23c0b2bf32f0255419af52217aed873036cdc82678c3c7ac0e9557ed316fd316faf41c011778bcec277cc4de4d3b7fd9f5eab4078da69
+DIST ffmpeg-rpi-6.1-r1.patch 797961 BLAKE2B 
7da7ed15098af72e1e5e659b8ce23f5f83583798ea21f1e8c968d26de660a911dd114381948885760e8192002023d1c837296e712baac34f1422e02b599c5f5b
 SHA512 
098f111d2c83e2642b53cd69378bbcb24d6f85d3bcf75f474f87cf45b5b97eb240b16960ab981a516b14b0ba3ff51075e527fe66d792d1677c6f78d608c982c0

diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild
index f512e9d9ac81..62ce17b2fbd3 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild
@@ -15,7 +15,7 @@ EAPI=8
 FFMPEG_SUBSLOT=58.60.60
 
 SOC_PATCHES=(
-   ffmpeg-rpi-6.1.patch
+   ffmpeg-rpi-6.1-r1.patch
 )
 
 SCM=""
@@ -363,6 +363,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.1-wint-conversion.patch
"${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
"${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
+   "${FILESDIR}"/${PN}-6.1-gcc-14.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-.ebuild 
b/media-video/ffmpeg/ffmpeg-.ebuild
index b5e32f2c8f88..623a4e57eb4d 100644
--- a/media-video/ffmpeg/ffmpeg-.ebuild
+++ b/media-video/ffmpeg/ffmpeg-.ebuild
@@ -15,7 +15,7 @@ EAPI=8
 FFMPEG_SUBSLOT=58.60.60
 
 SOC_PATCHES=(
-   ffmpeg-rpi-6.1.patch
+   ffmpeg-rpi-6.1-r1.patch
 )
 
 SCM=""

diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch 
b/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch
new file mode 100644
index ..0db7301f18d9
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch
@@ -0,0 +1,13 @@
+diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
+index 29fc8bd648..1f85fac7f4 100644
+--- a/libavutil/hwcontext_vaapi.c
 b/libavutil/hwcontext_vaapi.c
+@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, 
AVFrame *dst,
+ 
+ if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
+ int k;
+-unsigned long buffer_handle;
++uintptr_t buffer_handle;
+ VASurfaceAttribExternalBuffers buffer_desc;
+ VASurfaceAttrib buffer_attrs[2] = {
+ {



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-02-05 Thread Sam James
commit: 9885b8a284f8e7ca8f9bd758bf9f495ddf923aaf
Author: Sam James  gentoo  org>
AuthorDate: Tue Feb  6 04:01:03 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Feb  6 04:01:03 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9885b8a2

media-video/ffmpeg: drop 6.1-r4

Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/Manifest|   2 -
 media-video/ffmpeg/ffmpeg-6.1-r4.ebuild| 589 -
 ...-Use-av_mallocz-to-avoid-invalid-free-uni.patch |  54 --
 ...coded-fft-Fix-memory-leak-if-ctx2-is-used.patch |  26 -
 ...ode-validate-hw_frames_ctx-when-AVHWAccel.patch |  64 ---
 ...enc-only-check-canvas-size-when-it-is-act.patch |  31 --
 ...le-build-vulkan-decode-code-if-vulkan_av1.patch |  31 --
 ...6-hwcontext_vulkan-guard-unistd.h-include.patch |  33 --
 8 files changed, 830 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index c2054eb5009c..43c6764a4783 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -9,5 +9,3 @@ DIST ffmpeg-6.0.tar.xz 10234012 BLAKE2B 
c70884911f3a3e40fe87473f241a2a56b303f5ab
 DIST ffmpeg-6.0.tar.xz.asc 520 BLAKE2B 
be294d375108b57bca3c687620ce2517c54c99012d82dc7aa1a83d5fe6d5453bd3c8620fdfb743df780cf588983a06a66a458c4e3e454dbe535cbba9da30c48c
 SHA512 
a64cd0f8578fcea4537f5a38634c930d66c8ba4abd3e8e9dcffaeb95c3ad2e754d7bc4fbb5272409d4d32abf8180ef83f7204c6a570b52a37e635efd96cb94ed
 DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 
77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb
 SHA512 
fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5
 DIST ffmpeg-6.1.1.tar.xz.asc 520 BLAKE2B 
801cd976d10363d1f9fc302351b330cb57e609a266407627ef378172f28974f4a18435b8a77b9cc7a8ff7b75701185211739f685629bbda961c3588c15af1221
 SHA512 
0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5
-DIST ffmpeg-6.1.tar.xz 10455956 BLAKE2B 
5eaee0e0f72139e3b018e6ee26a102c7d6881ec8e7a70b21c51e4a515a37396ae12f19185112bb3f8b3401b85e68c08435146a83470e07ffb571d3d9bca89289
 SHA512 
72f47924806b9b128672bd268aa2c8fc2c9b8491899a772b6f82421daa2b67de45a4bdd71f6071825814e599a73adb1e42682e202a12fc055e9a224c7d5baa4a
-DIST ffmpeg-6.1.tar.xz.asc 520 BLAKE2B 
774ba20a8ad3d786368c7e6928ee0976cd943756f24e3f076dc0cc92fc0069637f0a9a92e3c5238c74148330385d040118d3c5f9af6b267d572283b8de83b286
 SHA512 
e4885270869cc6a1681bc3f76f344f77c4858c490a517e45a758d15214ce67c3c2113a1caa8ca65eb6447b68d822fa1dd730081345bcc0928faaf82bb76037ba

diff --git a/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild
deleted file mode 100644
index d462f165ce84..
--- a/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild
+++ /dev/null
@@ -1,589 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=58.60.60
-
-SCM=""
-if [ "${PV#}" != "${PV}" ] ; then
-   SCM="git-r3"
-   EGIT_MIN_CLONE_TYPE="single"
-   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
-fi
-
-inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
-
-DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
-HOMEPAGE="https://ffmpeg.org/;
-if [ "${PV#}" != "${PV}" ] ; then
-   SRC_URI=""
-elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
-   SRC_URI="mirror://gentoo/${P}.tar.xz"
-else # Release
-   VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc
-   inherit verify-sig
-   SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz;
-   SRC_URI+=" verify-sig? ( 
https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
-
-   BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
-fi
-FFMPEG_REVISION="${PV#*_p}"
-
-SLOT="0/${FFMPEG_SUBSLOT}"
-LICENSE="
-   !gpl? ( LGPL-2.1 )
-   gpl? ( GPL-2 )
-   amr? (
-   gpl? ( GPL-3 )
-   !gpl? ( LGPL-3 )
-   )
-   gmp? (
-   gpl? ( GPL-3 )
-   !gpl? ( LGPL-3 )
-   )
-   libaribb24? (
-   gpl? ( GPL-3 )
-   !gpl? ( LGPL-3 )
-   )
-   encode? (
-   amrenc? (
- 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-02-05 Thread Sam James
commit: c8e68487530e6ef184d02dfa14e4b4b358c122a4
Author: Sam James  gentoo  org>
AuthorDate: Tue Feb  6 03:51:16 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Feb  6 03:58:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e68487

media-video/ffmpeg: fix parallel build w/ USE=opencl

Closes: https://bugs.gentoo.org/782553
Thanks-to: Peter Levine  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild   |  1 +
 media-video/ffmpeg/ffmpeg-5.1.4-r2.ebuild   |  1 +
 media-video/ffmpeg/ffmpeg-6.0-r11.ebuild|  1 +
 media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild   |  1 +
 media-video/ffmpeg/ffmpeg-6.1-r4.ebuild |  1 +
 media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild   |  1 +
 media-video/ffmpeg/ffmpeg-.ebuild   |  1 +
 .../files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch  | 13 +
 .../ffmpeg/files/ffmpeg-6.1-opencl-parallel-gmake-fix.patch | 13 +
 9 files changed, 33 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild 
b/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
index e17af76cfa74..00d867dd517c 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild
@@ -348,6 +348,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-4.4.4-wint-conversion-vulkan.patch
"${FILESDIR}"/${P}-fix-build-svt-av1-1.5.0.patch
"${FILESDIR}"/${PN}-5.1.3-binutils-2.41.patch
+   "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
"${WORKDIR}"/${PN}-4.4.4-texinfo.patch
 )
 

diff --git a/media-video/ffmpeg/ffmpeg-5.1.4-r2.ebuild 
b/media-video/ffmpeg/ffmpeg-5.1.4-r2.ebuild
index 5fc9eca96bfd..698c9e33af5d 100644
--- a/media-video/ffmpeg/ffmpeg-5.1.4-r2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-5.1.4-r2.ebuild
@@ -349,6 +349,7 @@ PATCHES=(
"${FILESDIR}"/chromium-r1.patch
"${FILESDIR}"/${PN}-5.1.2-get_cabac_inline_x86-32-bit.patch
"${FILESDIR}"/${PN}-6.0-libplacebo-remove-deprecated-field.patch
+   "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-6.0-r11.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0-r11.ebuild
index 6d75a5d847db..3599c9b0aee6 100644
--- a/media-video/ffmpeg/ffmpeg-6.0-r11.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.0-r11.ebuild
@@ -348,6 +348,7 @@ PATCHES=(
"${FILESDIR}"/${P}-wint-conversion-vulkan.patch
"${FILESDIR}"/${P}-libplacebo-remove-deprecated-field.patch
"${FILESDIR}"/${P}-binutils-2.41.patch
+   "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
index 188b14013a42..675c19801444 100644
--- a/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
@@ -346,6 +346,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.1.2-get_cabac_inline_x86-32-bit.patch
"${FILESDIR}"/${PN}-6.0-libplacebo-remove-deprecated-field.patch
"${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
+   "${FILESDIR}"/${PN}-4.4.4-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild
index d3edaba40eb7..d462f165ce84 100644
--- a/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1-r4.ebuild
@@ -359,6 +359,7 @@ PATCHES=(

"${FILESDIR}"/${PN}-6.1-0004-lavc-dvdsubenc-only-check-canvas-size-when-it-is-act.patch

"${FILESDIR}"/${PN}-6.1-0005-lavc-Makefile-build-vulkan-decode-code-if-vulkan_av1.patch

"${FILESDIR}"/${PN}-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch
+   "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
index 4d42b25f4162..d82fd894afc1 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
@@ -356,6 +356,7 @@ PATCHES=(
"${FILESDIR}"/chromium-r2.patch
"${FILESDIR}"/${PN}-6.1-wint-conversion.patch
"${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
+   "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-.ebuild 
b/media-video/ffmpeg/ffmpeg-.ebuild
index 0b4ac4354fb6..461eb1559ef2 100644
--- a/media-video/ffmpeg/ffmpeg-.ebuild
+++ b/media-video/ffmpeg/ffmpeg-.ebuild
@@ -354,6 +354,7 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
"${FILESDIR}"/chromium-r2.patch
+   "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git 
a/media-video/ffmpeg/files/ffmpeg-4.4.4-opencl-parallel-gmake-fix.patch 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2024-01-24 Thread Sam James
commit: 38d66d124c45525244dfeb7b994efda5e480549b
Author: Alfred Wingate  protonmail  com>
AuthorDate: Wed Jan 24 10:19:15 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jan 24 10:57:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38d66d12

media-video/ffmpeg: add patch for fixing lto-type-mismatch

Bug: https://bugs.gentoo.org/907484
Signed-off-by: Alfred Wingate  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34986
Signed-off-by: Sam James  gentoo.org>

 ...mpeg-6.0.1-r1.ebuild => ffmpeg-6.0.1-r2.ebuild} |  1 +
 ...mpeg-6.1.1-r1.ebuild => ffmpeg-6.1.1-r2.ebuild} |  1 +
 .../files/ffmpeg-6.0-fix-lto-type-mismatch.patch   | 41 ++
 3 files changed, 43 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.0.1-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-6.0.1-r1.ebuild
rename to media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
index 654f768272b2..188b14013a42 100644
--- a/media-video/ffmpeg/ffmpeg-6.0.1-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.0.1-r2.ebuild
@@ -345,6 +345,7 @@ PATCHES=(
"${FILESDIR}"/chromium-r1.patch
"${FILESDIR}"/${PN}-5.1.2-get_cabac_inline_x86-32-bit.patch
"${FILESDIR}"/${PN}-6.0-libplacebo-remove-deprecated-field.patch
+   "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-6.1.1-r1.ebuild
rename to media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
index 73cdd4b40c76..4d42b25f4162 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.1-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.1-r2.ebuild
@@ -355,6 +355,7 @@ S=${WORKDIR}/${P/_/-}
 PATCHES=(
"${FILESDIR}"/chromium-r2.patch
"${FILESDIR}"/${PN}-6.1-wint-conversion.patch
+   "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch 
b/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch
new file mode 100644
index ..9cc2dd732016
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.0-fix-lto-type-mismatch.patch
@@ -0,0 +1,41 @@
+https://ffmpeg.org//pipermail/ffmpeg-devel/2023-November/317055.html
+https://bugs.gentoo.org/907484
+
+From 408882a387f75ae57524073385b47d68339ec486 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate 
+Date: Tue, 14 Nov 2023 13:26:47 +
+Subject: [PATCH 1/1] swscale/x86/rgb_2_rgb: Add opaque pointer to missed
+ definitions of ff_nv12ToUV
+
+Opaque parameters were previously added to the original definition of
+ff_nv12ToUV, leading to gcc noticing a type mismatch with -Wlto-type-mismatch.
+
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f2de911818fbd7e73343803626b697fd0c968121
+https://bugs.gentoo.org/907484
+
+Signed-off-by: Alfred Wingate 
+Signed-off-by: Anton Khirnov 
+--- a/libswscale/x86/rgb2rgb_template.c
 b/libswscale/x86/rgb2rgb_template.c
+@@ -1823,7 +1823,8 @@ void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
+  const uint8_t *src1,
+  const uint8_t *src2,
+  int w,
+- uint32_t *unused2);
++ uint32_t *unused2,
++ void *opq);
+ static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, 
uint8_t *dst2,
+   int width, int height, int srcStride,
+   int dst1Stride, int dst2Stride)
+@@ -1831,7 +1832,7 @@ static void RENAME(deinterleaveBytes)(const uint8_t 
*src, uint8_t *dst1, uint8_t
+ int h;
+ 
+ for (h = 0; h < height; h++) {
+-RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL);
++RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL, NULL);
+ src  += srcStride;
+ dst1 += dst1Stride;
+ dst2 += dst2Stride;
+-- 
+2.43.0
+



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2023-12-17 Thread Sam James
commit: cef2e06f2fabd2cb77dd2432a15d1a32c187813e
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec 18 04:50:05 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Dec 18 04:50:35 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cef2e06f

media-video/ffmpeg: backport fixes from 6.1 branch for 6.1

```
$ git shortlog d4ff0020b40b524a490cf62eccbd3a318f4c0e58..HEAD
Anton Khirnov (1):
  lavc/dvdsubenc: only check canvas size when it is actually set

Benjamin Cheng (1):
  hwcontext_vulkan: guard unistd.h include

Dmitry Rogozhkin (1):
  avcodec/decode: validate hw_frames_ctx when AVHWAccel.free_frame_priv is 
used

Lynne (1):
  lavc/Makefile: build vulkan decode code if vulkan_av1 has been enabled

Sebastian Ramacher (2):
  avcodec/fft: Use av_mallocz to avoid invalid free/uninit
  avcoded/fft: Fix memory leak if ctx2 is used
```

Closes: https://bugs.gentoo.org/920185
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.1-r3.ebuild| 588 +
 ...-Use-av_mallocz-to-avoid-invalid-free-uni.patch |  54 ++
 ...coded-fft-Fix-memory-leak-if-ctx2-is-used.patch |  26 +
 ...ode-validate-hw_frames_ctx-when-AVHWAccel.patch |  64 +++
 ...enc-only-check-canvas-size-when-it-is-act.patch |  31 ++
 ...le-build-vulkan-decode-code-if-vulkan_av1.patch |  31 ++
 ...6-hwcontext_vulkan-guard-unistd.h-include.patch |  33 ++
 7 files changed, 827 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.1-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-6.1-r3.ebuild
new file mode 100644
index ..b79bccb0a98f
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-6.1-r3.ebuild
@@ -0,0 +1,588 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=58.60.60
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-r3"
+   EGIT_MIN_CLONE_TYPE="single"
+   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
+fi
+
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
+HOMEPAGE="https://ffmpeg.org/;
+if [ "${PV#}" != "${PV}" ] ; then
+   SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+   VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc
+   inherit verify-sig
+   SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz;
+   SRC_URI+=" verify-sig? ( 
https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
+
+   BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   gmp? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   libaribb24? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc 
~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt 
+gnutls gmp
+   +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
+   openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi 
vdpau vulkan
+   X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
+   # libavdevice options
+   cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca 
openal
+   opengl
+   # indevs
+   libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
+   # decoders
+   amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 
+dav1d:libdav1d fdk:libfdk-aac
+   jpeg2k:libopenjpeg jpegxl:libjxl 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2023-07-23 Thread Sam James
commit: 4bc3ebaf3dc53ab956f0b21aa02a2edf1b9dca9a
Author: Sam James  gentoo  org>
AuthorDate: Mon Jul 24 01:58:02 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul 24 01:58:19 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bc3ebaf

media-video/ffmpeg: fix -Wint-conversion for 6.0

Bug: https://bugs.gentoo.org/903752
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-6.0-r3.ebuild| 603 +
 .../files/ffmpeg-6.0-wint-conversion-vulkan.patch  |  43 ++
 2 files changed, 646 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-6.0-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-6.0-r3.ebuild
new file mode 100644
index ..fe431b8716e8
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-6.0-r3.ebuild
@@ -0,0 +1,603 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=58.60.60
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-r3"
+   EGIT_MIN_CLONE_TYPE="single"
+   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
+fi
+
+inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
+HOMEPAGE="https://ffmpeg.org/;
+if [ "${PV#}" != "${PV}" ] ; then
+   SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI="mirror://gentoo/${P}.tar.xz"
+else # Release
+   VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc
+   inherit verify-sig
+   SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz;
+   SRC_URI+=" verify-sig? ( 
https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )"
+
+   BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )"
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   gmp? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   libaribb24? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc 
~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt 
+gnutls gmp
+   +gpl hardcoded-tables +iconv libxml2 lzma +network opencl
+   openssl +postproc samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi 
vdpau vulkan
+   X:xlib X:libxcb X:libxcb-shm X:libxcb-xfixes +zlib
+   # libavdevice options
+   cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca 
openal
+   opengl
+   # indevs
+   libv4l:libv4l2 pulseaudio:libpulse libdrm jack:libjack
+   # decoders
+   amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 
+dav1d:libdav1d fdk:libfdk-aac
+   jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme 
gsm:libgsm
+   libaribb24 mmal modplug:libmodplug opus:libopus qsv:libvpl 
libilbc librtmp ssh:libssh
+   speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
+   vorbis:libvorbis vpx:libvpx zvbi:libzvbi
+   # libavfilter options
+   appkit
+   bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r 
vmaf:libvmaf
+   fribidi:libfribidi fontconfig ladspa lcms:lcms2 libass 
libplacebo libtesseract lv2
+   truetype:libfreetype vidstab:libvidstab
+   rubberband:librubberband zeromq:libzmq zimg:libzimg
+   # libswresample options
+   libsoxr
+   # Threads; we only support pthread for now but ffmpeg supports 
more
+   +threads:pthreads
+)
+
+# Same as above but for encoders, 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2023-05-31 Thread Sam James
commit: 786f54b7aa322c015dd121519970eaba3e17bec1
Author: Sam James  gentoo  org>
AuthorDate: Wed May 31 18:40:25 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed May 31 18:43:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=786f54b7

media-video/ffmpeg: fix build w/ svt-av1-1.5.0

Closes: https://bugs.gentoo.org/907478
Closes: https://bugs.gentoo.org/907493
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild  |  1 +
 media-video/ffmpeg/ffmpeg-5.1.3.ebuild |  1 +
 .../ffmpeg-4.4.4-fix-build-svt-av1-1.5.0.patch | 44 
 .../ffmpeg-5.1.3-fix-build-svt-av1-1.5.0.patch | 81 ++
 4 files changed, 127 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild 
b/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
index bc0fa635b1d9..9acb849c9349 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
@@ -336,6 +336,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-4.4.3-clang-14-ff_seek_frame_binary-crash.patch
"${FILESDIR}"/${PN}-4.4.3-get_cabac_inline_x86-32-bit.patch
"${FILESDIR}"/${PN}-4.4.4-wint-conversion-vulkan.patch
+   "${FILESDIR}"/${P}-fix-build-svt-av1-1.5.0.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/ffmpeg-5.1.3.ebuild 
b/media-video/ffmpeg/ffmpeg-5.1.3.ebuild
index 7cc06a079480..f9ccdb2776aa 100644
--- a/media-video/ffmpeg/ffmpeg-5.1.3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-5.1.3.ebuild
@@ -337,6 +337,7 @@ S=${WORKDIR}/${P/_/-}
 PATCHES=(
"${FILESDIR}"/chromium-r1.patch
"${FILESDIR}"/${PN}-5.1.2-get_cabac_inline_x86-32-bit.patch
+   "${FILESDIR}"/${P}-fix-build-svt-av1-1.5.0.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git 
a/media-video/ffmpeg/files/ffmpeg-4.4.4-fix-build-svt-av1-1.5.0.patch 
b/media-video/ffmpeg/files/ffmpeg-4.4.4-fix-build-svt-av1-1.5.0.patch
new file mode 100644
index ..c9c180f06641
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.4.4-fix-build-svt-av1-1.5.0.patch
@@ -0,0 +1,44 @@
+https://bugs.gentoo.org/907478
+https://bugs.gentoo.org/907493
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=c3c8f97a9804b4234e97f13b0057ffc2c9af27c0
+
+From c3c8f97a9804b4234e97f13b0057ffc2c9af27c0 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa 
+Date: Thu, 20 Oct 2022 22:55:27 -0500
+Subject: [PATCH] avcodec/libsvtav1: remove compressed_ten_bit_format and
+ simplify alloc_buffer
+
+compressed_ten_bit_format has been deprecated upstream and has no effect
+and can be removed. Plus, technically it was never used in the first place
+since it would require the app (ffmpeg) to set it and do additional
+processing of the input frames.
+
+Also simplify alloc_buffer by removing calculations relating to the
+non-existant processing.
+
+Signed-off-by: Christopher Degawa 
+(cherry picked from commit 031f1561cd286596cdb374da32f8aa816ce3b135)
+--- a/libavcodec/libsvtav1.c
 b/libavcodec/libsvtav1.c
+@@ -120,16 +120,12 @@ static int svt_print_error(void *log_ctx, EbErrorType 
err,
+ 
+ static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
+ {
+-const intpack_mode_10bit =
+-(config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format 
== 0) ? 1 : 0;
+-const size_t luma_size_8bit  =
+-config->source_width * config->source_height * (1 << pack_mode_10bit);
+-const size_t luma_size_10bit =
+-(config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? 
luma_size_8bit : 0;
++const size_t luma_size = config->source_width * config->source_height *
++(config->encoder_bit_depth > 8 ? 2 : 1);
+ 
+ EbSvtIOFormat *in_data;
+ 
+-svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
++svt_enc->raw_size = luma_size * 3 / 2;
+ 
+ // allocate buffer for in and out
+ svt_enc->in_buf   = av_mallocz(sizeof(*svt_enc->in_buf));
+-- 
+2.30.2

diff --git 
a/media-video/ffmpeg/files/ffmpeg-5.1.3-fix-build-svt-av1-1.5.0.patch 
b/media-video/ffmpeg/files/ffmpeg-5.1.3-fix-build-svt-av1-1.5.0.patch
new file mode 100644
index ..51a8cb02d7b5
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-5.1.3-fix-build-svt-av1-1.5.0.patch
@@ -0,0 +1,81 @@
+https://bugs.gentoo.org/907478
+https://bugs.gentoo.org/907493
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=bea695d54372b66a6b9b136982fc92adb63e4745
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=3344d47a88506aba060b5fd2a214cf7785b11483
+
+From bea695d54372b66a6b9b136982fc92adb63e4745 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa 
+Date: Thu, 20 Oct 2022 22:55:28 -0500
+Subject: [PATCH] avcodec/libsvtav1: replace vbv_bufsize with
+ maximum_buffer_size_ms
+
+svt-av1 v1.2.0 has deprecated vbv_bufsize in favor of using
+- maximum_buffer_size_ms (--buf-sz)
+- starting_buffer_level_ms (--buf-initial-sz)
+- optimal_buffer_level_ms (--buf-optimal-sz)
+
+and vbv_bufsize has not been in use 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2023-04-23 Thread Sam James
commit: 2909442704716d00025aee815212245dcbed24ff
Author: Sam James  gentoo  org>
AuthorDate: Sun Apr 23 07:04:58 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Apr 23 07:04:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29094427

media-video/ffmpeg: fix -Wint-conversion for 4.4.4

Closes: https://bugs.gentoo.org/903752
Signed-off-by: Sam James  gentoo.org>

 ...mpeg-4.4.4-r1.ebuild => ffmpeg-4.4.4-r2.ebuild} |  1 +
 .../ffmpeg-4.4.4-wint-conversion-vulkan.patch  | 30 ++
 2 files changed, 31 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.4.4-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-4.4.4-r1.ebuild
rename to media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
index 66c06c476313..d98da4233b78 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.4-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.4-r2.ebuild
@@ -335,6 +335,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.0-backport-ranlib-build-fix.patch
"${FILESDIR}"/${PN}-4.4.3-clang-14-ff_seek_frame_binary-crash.patch
"${FILESDIR}"/${PN}-4.4.3-get_cabac_inline_x86-32-bit.patch
+   "${FILESDIR}"/${PN}-4.4.4-wint-conversion-vulkan.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch 
b/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch
new file mode 100644
index ..f3766bb69f50
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.4.4-wint-conversion-vulkan.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/903752
+https://git.videolan.org/?p=ffmpeg.git;a=commit;h=cc76e8340d28438c1ac56ee7dfd774d25e944264
+
+(Dropped second bit for vulkan.h as has changed significantly in >4.4.)
+
+From cc76e8340d28438c1ac56ee7dfd774d25e944264 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Kacper=20Michaj=C5=82ow?= 
+Date: Thu, 2 Mar 2023 17:27:30 +0100
+Subject: [PATCH] lavu/vulkan: fix handle type for 32-bit targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Fixes compilation with clang which errors out on Wint-conversion.
+
+Signed-off-by: Kacper Michajłow 
+Signed-off-by: Martin Storsjö 
+--- a/libavutil/hwcontext_vulkan.c
 b/libavutil/hwcontext_vulkan.c
+@@ -1149,7 +1149,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, 
VulkanExecCtx *cmd)
+ 
+ av_freep(>queues);
+ av_freep(>bufs);
+-cmd->pool = NULL;
++cmd->pool = VK_NULL_HANDLE;
+ }
+ 
+ static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, 
VulkanExecCtx *cmd)
+
+



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2023-02-13 Thread Craig Andrews
commit: b55c0c7c8699e2e51f1d861c3abf16b75204fd09
Author: Craig Andrews  gentoo  org>
AuthorDate: Mon Feb 13 13:23:37 2023 +
Commit: Craig Andrews  gentoo  org>
CommitDate: Mon Feb 13 22:43:38 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b55c0c7c

media-video/ffmpeg: fix build when USE=vulkan

Closes: https://bugs.gentoo.org/894122
Signed-off-by: Craig Andrews  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/29571
Signed-off-by: Craig Andrews  gentoo.org>

 media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild  |  3 +-
 media-video/ffmpeg/files/ffmpeg-5.1.2-vulkan.patch | 33 ++
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild
index 3467de2ac40e..ebfee785a3f4 100644
--- a/media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -336,6 +336,7 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
"${FILESDIR}"/chromium-r1.patch
+   "${FILESDIR}/${P}-vulkan.patch"
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-5.1.2-vulkan.patch 
b/media-video/ffmpeg/files/ffmpeg-5.1.2-vulkan.patch
new file mode 100644
index ..d7ce57350e4e
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-5.1.2-vulkan.patch
@@ -0,0 +1,33 @@
+From eb0455d64690eed0068e5cb202f72ecdf899837c Mon Sep 17 00:00:00 2001
+From: Lynne 
+Date: Sun, 25 Dec 2022 01:03:30 +0100
+Subject: [PATCH] hwcontext_vulkan: remove optional encode/decode extensions
+ from the list
+
+They're not currently used, so they don't need to be there.
+Vulkan stabilized the decode extensions less than a week ago, and their
+name prefixes were changed from EXT to KHR. It's a bit too soon to be
+depending on it, so rather than bumping, just remove these for now.
+---
+ libavutil/hwcontext_vulkan.c | 8 
+ 1 file changed, 8 deletions(-)
+
+diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
+index f1db1c7291f1..2a9b5f4aac62 100644
+--- a/libavutil/hwcontext_vulkan.c
 b/libavutil/hwcontext_vulkan.c
+@@ -358,14 +358,6 @@ static const VulkanOptExtension optional_device_exts[] = {
+ { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
FF_VK_EXT_EXTERNAL_WIN32_MEMORY  },
+ { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, 
FF_VK_EXT_EXTERNAL_WIN32_SEM },
+ #endif
+-
+-/* Video encoding/decoding */
+-{ VK_KHR_VIDEO_QUEUE_EXTENSION_NAME,  
FF_VK_EXT_NO_FLAG},
+-{ VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME,   
FF_VK_EXT_NO_FLAG},
+-{ VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME,   
FF_VK_EXT_NO_FLAG},
+-{ VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME,
FF_VK_EXT_NO_FLAG},
+-{ VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME,
FF_VK_EXT_NO_FLAG},
+-{ VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME,
FF_VK_EXT_NO_FLAG},
+ };
+ 
+ /* Converts return values to strings */



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2022-07-20 Thread Matt Turner
commit: 9e35ba5a1cac5c8fc188bd2effd5772ed2361067
Author: Matt Turner  gentoo  org>
AuthorDate: Thu Jul 21 02:51:18 2022 +
Commit: Matt Turner  gentoo  org>
CommitDate: Thu Jul 21 02:51:18 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e35ba5a

media-video/ffmpeg: Drop old versions

Signed-off-by: Matt Turner  gentoo.org>

 media-video/ffmpeg/Manifest|   2 -
 media-video/ffmpeg/ffmpeg-4.3.2-r1.ebuild  | 560 
 media-video/ffmpeg/ffmpeg-4.4.1-r5.ebuild  | 583 -
 .../files/ffmpeg-4.3-altivec-novsx-yuv2rgb.patch   |  23 -
 .../files/ffmpeg-4.3-fix-build-without-SSSE3.patch |  22 -
 5 files changed, 1190 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 26c660276496..66f6b189237a 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -1,8 +1,6 @@
 DIST ffmpeg-4.2.2-ppc64-altivec.patch.gz 7171 BLAKE2B 
6676dadb22d2ab4b0f5c19b418448c5b9b54fd8c803c3f0ab517c6fa7990be08098dd6f6a2b1b3e77a1bed31a069c702366aba79ef9141ff9e23cd8c1b6e2885
 SHA512 
6653975017de3f7bde420860419fbdddb50ae41dbb811b819f4b5b13807bf885a4c01736f05a684515f97b0d63bd8896d5951a3276af90cc74abfe32dc2e2407
 DIST ffmpeg-4.2.2-ppc64-gcc.patch.gz 750 BLAKE2B 
3a9cc7f0135e077c77179a7ca3da917bca3995d99d53b58221b23181a075f330132f83ea90a6110e89f90c7c3b5b2a7837559c5df414d9bd52dbb3ec166b1545
 SHA512 
701b0635e0819484a31de2062ba52d95ee03883ab56547cd75c3646a9b32bf3ecc7f719690b93f29202cfed0fdeecd26b51b9f3c66e72a999a3e8d9e97389275
 DIST ffmpeg-4.2.4.tar.bz2 10959430 BLAKE2B 
932bc0046edab5587063bbc04d6ef0149876bd1001ad185384fcabb3d0ae196c9ba591e680823b3c7b6e0ef9a0a9e9575a8b08439fdd89ef0e4dabb9d4a7f4e6
 SHA512 
5c74e3fe77ddf8ffede0e4692d574858dd0626e542380a819ab79c0f669c6c1329ffbccb872502f60306e561f10aa8bc1e61d09b2bea829870fe4a48b76460c6
-DIST ffmpeg-4.3.2.tar.bz2 11307134 BLAKE2B 
97e1e598e4abe397b06298d545c3073ea2303e11c01e98343fe09d99174e02ca94f52c4df0d389fbefe7814686221446d30f107092f00cb0b69275c8747d6f32
 SHA512 
ec5566f8684f0ceb18184d59786ea1fc166ab28c46260ebcca5b919ad53137ba7317fd0c537e97df28553572a0d5e42c558773c808cf76995d67985aec2d6d4d
-DIST ffmpeg-4.4.1.tar.bz2 11494996 BLAKE2B 
050b0501cb21f44451d59bf3b20b18d55234636b5a69a4962103d63f80ce9af172cc2cecb1e33b92334fcf635b283afddbdfa20cbd6deb526008cdb34ae01c16
 SHA512 
c41e63ffa9f5465ea3a7f4a8b255b299a2f49d5868ada4310a2344b8fea02476365c44871defd5609da55c805cbb58f34063dbdd4b203ade932cba8b3cfefc72
 DIST ffmpeg-4.4.2.tar.xz 9562968 BLAKE2B 
be044e9895acdd71a237a343a8d047c56db845c693b8c07877fc8049b630eb254e3430b6e9916330e6b3d53cbdc9f06680d80307a1fea1377bb818f4168bb276
 SHA512 
abce847c607ac6d63fe32ceff8bf8724888acf2b7db9a083cba50e3235590cdcb27feb7e0a314133d0030809fb54d474f64001fc9ab7d896a819159869c09d5a
 DIST ffmpeg-4.4.2.tar.xz.asc 520 BLAKE2B 
1ff4a886c7703a05a19499ae5b2b6207df24e05844861cb52f2c56a97f47ab4fefa5011de46a385bab9684964470697ec5e74553098392877f7521a04ffe0fc4
 SHA512 
a4df97a6328fc076b5611023bd61254f1a5043db1ec2f3426bee305206b2b0937047ede9cb51db31a3387a16218fe95a7a40296770574fa32660118938a9d301
 DIST ffmpeg-5.0.1.tar.xz 9812524 BLAKE2B 
0a37d425780f7e15836848048214411829bceb0de12bb7089803feb3dda07a077be9c8e8174b72792558ed86d92224bee9d4db20cc74690ea54312fbf2f10e83
 SHA512 
e5810c7379748a6bbe1a903bf36b4372b67cb3973179727b6af6f0118eef46f4c990155961cc37255e08a5bafdc4b4683503ad410ebb7afe7a35b891c01fa602

diff --git a/media-video/ffmpeg/ffmpeg-4.3.2-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-4.3.2-r1.ebuild
deleted file mode 100644
index 297bd22c24ca..
--- a/media-video/ffmpeg/ffmpeg-4.3.2-r1.ebuild
+++ /dev/null
@@ -1,560 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=56.58.58
-
-SCM=""
-if [ "${PV#}" != "${PV}" ] ; then
-   SCM="git-r3"
-   EGIT_MIN_CLONE_TYPE="single"
-   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
-fi
-
-inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
-
-DESCRIPTION="Complete solution to record/convert/stream audio and video. 
Includes libavcodec"
-HOMEPAGE="https://ffmpeg.org/;
-if [ "${PV#}" != "${PV}" ] ; then
-   SRC_URI=""
-elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
-   SRC_URI="mirror://gentoo/${P}.tar.bz2"
-else # Release
-   

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2022-03-26 Thread Joonas Niilola
commit: 7c480f3e6a065304cd0f27474f15488dac6c0925
Author: Adel KARA SLIMANE  zegrapher  com>
AuthorDate: Sat Mar 26 10:58:25 2022 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sat Mar 26 14:15:04 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c480f3e

media-video/ffmpeg: amf: add media-video/amdgpu-pro-amf as rdep

And change VK_ICD_FILENAMES env var so amf can be used more easily

Closes: https://bugs.gentoo.org/834974

Signed-off-by: Adel KARA SLIMANE  zegrapher.com>
Signed-off-by: Joonas Niilola  gentoo.org>

 .../ffmpeg/{ffmpeg-4.4.1-r3.ebuild => ffmpeg-4.4.1-r4.ebuild}| 9 ++---
 media-video/ffmpeg/ffmpeg-.ebuild| 9 ++---
 media-video/ffmpeg/files/amf-env-vulkan-override | 1 +
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/media-video/ffmpeg/ffmpeg-4.4.1-r3.ebuild 
b/media-video/ffmpeg/ffmpeg-4.4.1-r4.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-4.4.1-r3.ebuild
rename to media-video/ffmpeg/ffmpeg-4.4.1-r4.ebuild
index f7b57d1b616c..21ef722d958d 100644
--- a/media-video/ffmpeg/ffmpeg-4.4.1-r3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4.1-r4.ebuild
@@ -172,6 +172,7 @@ IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
 
 RDEPEND="
alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+   amf? ( media-video/amdgpu-pro-amf )
amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
@@ -188,8 +189,8 @@ RDEPEND="
rav1e? ( >=media-video/rav1e-0.4:=[capi] )
snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
theora? (
-   >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
>=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+   >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
)
twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
@@ -249,10 +250,10 @@ RDEPEND="
gnome-base/librsvg:2=[${MULTILIB_USEDEP}]
x11-libs/cairo[${MULTILIB_USEDEP}]
)
+   nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1[${MULTILIB_USEDEP}] )
svt-av1? ( >=media-libs/svt-av1-0.8.4[${MULTILIB_USEDEP}] )
truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
vaapi? ( >=x11-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] )
-   nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1[${MULTILIB_USEDEP}] )
vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] )
vmaf? ( media-libs/libvmaf[${MULTILIB_USEDEP}] )
@@ -268,11 +269,11 @@ RDEPEND="
>=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
>=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}]
)
+   postproc? ( !media-libs/libpostproc )
zeromq? ( >=net-libs/zeromq-4.1.6 )
zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] )
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
-   postproc? ( !media-libs/libpostproc )
 "
 
 RDEPEND="${RDEPEND}
@@ -563,4 +564,6 @@ multilib_src_install() {
 multilib_src_install_all() {
dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
[ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
+
+   use amf && doenvd "${FILESDIR}"/amf-env-vulkan-override
 }

diff --git a/media-video/ffmpeg/ffmpeg-.ebuild 
b/media-video/ffmpeg/ffmpeg-.ebuild
index 97bebae910d4..c1066349c4f8 100644
--- a/media-video/ffmpeg/ffmpeg-.ebuild
+++ b/media-video/ffmpeg/ffmpeg-.ebuild
@@ -172,6 +172,7 @@ IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
 
 RDEPEND="
alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
+   amf? ( media-video/amdgpu-pro-amf )
amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
@@ -188,8 +189,8 @@ RDEPEND="
rav1e? ( >=media-video/rav1e-0.4:=[capi] )
snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] )
theora? (
-   >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
>=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
+   >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
)
twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
@@ -249,10 +250,10 @@ RDEPEND="

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2020-12-24 Thread Sam James
commit: f2bb4173add20c89953f7c2f7f42f5f81d67bf45
Author: Sam James  gentoo  org>
AuthorDate: Fri Dec 25 02:35:38 2020 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 25 02:35:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2bb4173

media-video/ffmpeg: fix USE=srt with >=net-libs/srt-1.4.2

Closes: https://bugs.gentoo.org/756859
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Sam James  gentoo.org>

 media-video/ffmpeg/ffmpeg-4.3.1.ebuild |  1 +
 .../files/ffmpeg-4.3.1-srt-1.4.2-build.patch   | 52 ++
 2 files changed, 53 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild 
b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
index ad1f9fb2b88..cd228d62314 100644
--- a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild
@@ -328,6 +328,7 @@ PATCHES=(
"${FILESDIR}"/chromium-r1.patch
"${FILESDIR}"/${PN}-4.3-fix-build-without-SSSE3.patch
"${FILESDIR}"/${PN}-4.3-altivec-novsx-yuv2rgb.patch
+   "${FILESDIR}"/${PN}-4.3.1-srt-1.4.2-build.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch 
b/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch
new file mode 100644
index 000..691314cbacb
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch
@@ -0,0 +1,52 @@
+http://git.videolan.org/?p=ffmpeg.git;a=patch;h=7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315
+https://bugs.gentoo.org/756859
+From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001
+From: Jun Zhao 
+Date: Sun, 12 Jul 2020 13:48:48 +0800
+Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1
+
+libsrt changed the:
+SRTO_SMOOTHER   -> SRTO_CONGESTION
+SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION
+and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC)
+in the header, it's lead to build fail
+
+fix #8760
+
+Signed-off-by: Jun Zhao 
+---
+ libavformat/libsrt.c | 8 
+ 1 file changed, 8 insertions(+)
+
+diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
+index 4de575b37c..4719ce0d4b 100644
+--- a/libavformat/libsrt.c
 b/libavformat/libsrt.c
+@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
+ (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, 
"SRTO_PBKEYLEN", >pbkeylen, sizeof(s->pbkeylen)) < 0) ||
+ (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, 
"SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
+ #if SRT_VERSION_VALUE >= 0x010302
++#if SRT_VERSION_VALUE >= 0x010401
++(s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, 
SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", >enforced_encryption, 
sizeof(s->enforced_encryption)) < 0) ||
++#else
+ /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for 
compatibility, we used SRTO_STRICTENC */
+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, 
SRTO_STRICTENC, "SRTO_STRICTENC", >enforced_encryption, 
sizeof(s->enforced_encryption)) < 0) ||
++#endif
+ (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, 
SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", >kmrefreshrate, 
sizeof(s->kmrefreshrate)) < 0) ||
+ (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, 
SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", >kmpreannounce, 
sizeof(s->kmpreannounce)) < 0) ||
+ #endif
+@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
+ (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, 
"SRTO_LOSSMAXTTL", >lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
+ (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, 
"SRTO_MINVERSION", >minversion, sizeof(s->minversion)) < 0) ||
+ (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, 
"SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
++#if SRT_VERSION_VALUE >= 0x010401
++(s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, 
"SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
++#else
+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, 
"SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
++#endif
+ (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, 
"SRTO_MESSAGEAPI", >messageapi, sizeof(s->messageapi)) < 0) ||
+ (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, 
"SRTO_PAYLOADSIZE", >payload_size, sizeof(s->payload_size)) < 0) ||
+ ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, 
SRTO_SENDER, "SRTO_SENDER", , sizeof(yes)) < 0)) {
+-- 
+2.20.1
+



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2019-09-02 Thread Alexis Ballier
commit: 587ca78f0114a1718bd803ebc8a18e322510efdd
Author: Alexis Ballier  gentoo  org>
AuthorDate: Mon Sep  2 10:46:00 2019 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Mon Sep  2 11:59:49 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=587ca78f

media-video/ffmpeg: remove old

Package-Manager: Portage-2.3.73, Repoman-2.3.17
Signed-off-by: Alexis Ballier  gentoo.org>

 media-video/ffmpeg/Manifest|   5 -
 media-video/ffmpeg/ffmpeg-3.2.6.ebuild | 457 ---
 media-video/ffmpeg/ffmpeg-3.2.7.ebuild | 457 ---
 media-video/ffmpeg/ffmpeg-3.3.4.ebuild | 505 -
 media-video/ffmpeg/ffmpeg-3.3.6.ebuild | 505 -
 media-video/ffmpeg/ffmpeg-3.3.8.ebuild | 505 -
 media-video/ffmpeg/files/ffmpeg32-openjpeg22.patch | 106 -
 media-video/ffmpeg/files/openjpeg22.patch  | 106 -
 media-video/ffmpeg/files/openjpeg23.patch  | 109 -
 media-video/ffmpeg/metadata.xml|   6 -
 10 files changed, 2761 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 125dc130555..e9f02b9e227 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -1,8 +1,3 @@
-DIST ffmpeg-3.2.6.tar.bz2 9623111 BLAKE2B 
76ed10d969ec5e85c0ad23fee1118ccfd66689b07062dc51526fca5427507124751d957b57b1a002ba585b9d35afc80cc6f3113c559b160b2751fc526b3d304f
 SHA512 
eca75524374003eac78033bd2a744b459a4dc631c59150b6c9291e06a693bdd14e0b11cae9c800446f0648edccc066480c2b869bcb456a74eeabb91ab41f8285
-DIST ffmpeg-3.2.7.tar.bz2 9622391 BLAKE2B 
7d6f094ca0bd5e2cab02e051acc8e554873bca2d165fc9326de0b12e145ec939567aed95c01589c47291970a89fb3462c75d32db1c4c2c8cf6d4a14956cd8a79
 SHA512 
a5b6df77d2d4ede0cc2f398b763d7405f43f43e37c11a596ec1a2a8921714875fd8fa9ffbcff84355854780872ab7313c859a4a19bf419298b4d3bc797ad8ac4
-DIST ffmpeg-3.3.4.tar.bz2 9944256 BLAKE2B 
72d42a16396882b30641fb057bb597f8e98ecfa482a087ece48189acba8a80a72e931e70ad961db8c01c93a556f619ebdecb39bae9d4559cc504d0f7eabf15a7
 SHA512 
d2257a71f9ae7856390b807d70bf643d4360fe4f2ad7c76af3ac5332cda353a1a543cdcdea0c510dbb6141f7a3a36ffbf26ae87b0ffc9ce4b3b7641814a40e3a
-DIST ffmpeg-3.3.6.tar.bz2 9943322 BLAKE2B 
2526fdf9580045131426e554a9bf44fdc6567c12213ea4d5b78aa27f14513f14e07f38b8380183686fa1a62440fe4108eaecddca96f4dec3c74c410b1f90ee03
 SHA512 
1305760fa981bcb43c8fcb5dd1bf7dd8d3f405a124975f062062b741d49e12386e4d3eec3de6a032fc93cd7f6086d939275a669a9997ffa400f70c20f7eb3d23
-DIST ffmpeg-3.3.8.tar.bz2 9953307 BLAKE2B 
edd3c2ce9730494455a05ec9d81b6c2ceb0ebf526124f95a530214cdb113ffe91aa13b80a66501aefa4f571c5b8f2eedb97f8086370d08e3b4e2a98d517eb92b
 SHA512 
a793f6d0a06ff5244a580d9e54e1252d3ac88e2513dad4d137081103327ae4440ebe9b0d60a13f93536cb6b35097982ea76acc4056bfa31683063eef5c211ede
 DIST ffmpeg-3.4.5.tar.bz2 10183082 BLAKE2B 
f72157baefcd6a0ca8f389309bbe947ad21996e0f2eb3c46c6bfc90f1ebbb14bfd007d001e46ea51efef5db5f9fcee24b1a90b6862136aeebecdc95bb61b23a5
 SHA512 
e12707d47404a9ce02790b77d2852fc1a1573c8108e980c7355fa48ba891d1649464d4fe4d08394ecd6d871f651ac4388486b7654cb54a7aaeedaf05c55513ec
 DIST ffmpeg-3.4.6.tar.bz2 10190001 BLAKE2B 
4c7842900171cf871f8524f08f435797b1a168faa11877100fe74c3ecd4a2c2e004a5110dc23bda818f69b0a484f63d8f34c7904c4827c88894d877cdd70c6fe
 SHA512 
0228751b288096e368f9049854936930b7c1fd89aac31a5382f5de78d3282b4e86a6f562c79833d1635222f0ad56b2e5401a150574714e1b7e0ab4f5d8939812
 DIST ffmpeg-4.1.1.tar.bz2 10686360 BLAKE2B 
47f4716d7e184d7318eb1a99ab1cdc188009464e973162e583f7ca4ae79fa3b103f9d5329c8993b72d20667e42e5a749123709a4640f07762568300b5c3c897f
 SHA512 
0241c44e1dffd0d890a3d30a1b2387ea167d578bb39ba0c804fb417e132d343a9e43da9247b205e18b893d8cf75d8528e9971569be67ac380b88618ef0a75ed4

diff --git a/media-video/ffmpeg/ffmpeg-3.2.6.ebuild 
b/media-video/ffmpeg/ffmpeg-3.2.6.ebuild
deleted file mode 100644
index a6291d34e90..000
--- a/media-video/ffmpeg/ffmpeg-3.2.6.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=55.57.57
-
-SCM=""
-if [ "${PV#}" != "${PV}" ] ; then
-   SCM="git-r3"
-   EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
-fi
-
-inherit eutils flag-o-matic multilib multilib-minimal 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2019-07-07 Thread Thomas Deutschmann
commit: 9b24462db729d65cacbfb73c625de323dd674f2c
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Sun Jul  7 18:58:21 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sun Jul  7 18:58:41 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b24462d

media-video/ffmpeg: fix building with >=media-libs/fdk-aac-2

Closes: https://bugs.gentoo.org/682890
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann  gentoo.org>

 media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild  | 489 +
 ...mpeg-3.4.6-fix-building-against-fdk-aac-2.patch |  74 
 2 files changed, 563 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild
new file mode 100644
index 000..6343c597721
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild
@@ -0,0 +1,489 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=55.57.57
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-r3"
+   EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. 
Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/;
+if [ "${PV#}" != "${PV}" ] ; then
+   SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+   SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2;
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   gmp? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 
~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~x64-solaris ~x86-solaris"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt gnutls 
gmp
+   +gpl +hardcoded-tables +iconv lzma +network opencl openssl 
+postproc
+   samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau X:xlib 
xcb:libxcb
+   xcb:libxcb-shm xcb:libxcb-xfixes +zlib
+   # libavdevice options
+   cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca 
openal
+   opengl
+   # indevs
+   libv4l:libv4l2 pulseaudio:libpulse libdrm
+   # decoders
+   amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
+   jpeg2k:libopenjpeg bluray:libbluray gme:libgme gsm:libgsm
+   mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh
+   speex:libspeex svg:librsvg vorbis:libvorbis
+   vpx:libvpx zvbi:libzvbi
+   # libavfilter options
+   appkit
+   bs2b:libbs2b chromaprint flite:libflite frei0r
+   fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype
+   rubberband:librubberband zeromq:libzmq zimg:libzimg
+   # libswresample options
+   libsoxr
+   # Threads; we only support pthread for now but ffmpeg supports 
more
+   +threads:pthreads
+)
+
+# Same as above but for encoders, i.e. they do something only with USE=encode.
+FFMPEG_ENCODER_FLAG_MAP=(
+   amrenc:libvo-amrwbenc mp3:libmp3lame
+   kvazaar:libkvazaar nvenc:nvenc
+   openh264:libopenh264 snappy:libsnappy theora:libtheora 
twolame:libtwolame
+   wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
+)
+
+IUSE="
+   alsa chromium doc +encode jack oss pic static-libs test v4l
+   ${FFMPEG_FLAG_MAP[@]%:*}
+   ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
+"
+

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2019-02-13 Thread Alexis Ballier
commit: bbef43a06aa93bf7a6bd3cfd4c5694e51183724e
Author: Alexis Ballier  gentoo  org>
AuthorDate: Wed Feb 13 15:08:13 2019 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Wed Feb 13 15:18:57 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbef43a0

media-video/ffmpeg: Remove old

Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Alexis Ballier  gentoo.org>

 media-video/ffmpeg/Manifest|   3 -
 media-video/ffmpeg/ffmpeg-4.0.2.ebuild | 522 
 media-video/ffmpeg/ffmpeg-4.0.3.ebuild | 523 
 media-video/ffmpeg/ffmpeg-4.1.ebuild   | 528 -
 .../ffmpeg/files/ffmpeg-4.1-vaapi-tools.patch  |  27 --
 5 files changed, 1603 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index ea1b277291f..dac93f02dbb 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -4,7 +4,4 @@ DIST ffmpeg-3.3.4.tar.bz2 9944256 BLAKE2B 
72d42a16396882b30641fb057bb597f8e98ecf
 DIST ffmpeg-3.3.6.tar.bz2 9943322 BLAKE2B 
2526fdf9580045131426e554a9bf44fdc6567c12213ea4d5b78aa27f14513f14e07f38b8380183686fa1a62440fe4108eaecddca96f4dec3c74c410b1f90ee03
 SHA512 
1305760fa981bcb43c8fcb5dd1bf7dd8d3f405a124975f062062b741d49e12386e4d3eec3de6a032fc93cd7f6086d939275a669a9997ffa400f70c20f7eb3d23
 DIST ffmpeg-3.3.8.tar.bz2 9953307 BLAKE2B 
edd3c2ce9730494455a05ec9d81b6c2ceb0ebf526124f95a530214cdb113ffe91aa13b80a66501aefa4f571c5b8f2eedb97f8086370d08e3b4e2a98d517eb92b
 SHA512 
a793f6d0a06ff5244a580d9e54e1252d3ac88e2513dad4d137081103327ae4440ebe9b0d60a13f93536cb6b35097982ea76acc4056bfa31683063eef5c211ede
 DIST ffmpeg-3.4.5.tar.bz2 10183082 BLAKE2B 
f72157baefcd6a0ca8f389309bbe947ad21996e0f2eb3c46c6bfc90f1ebbb14bfd007d001e46ea51efef5db5f9fcee24b1a90b6862136aeebecdc95bb61b23a5
 SHA512 
e12707d47404a9ce02790b77d2852fc1a1573c8108e980c7355fa48ba891d1649464d4fe4d08394ecd6d871f651ac4388486b7654cb54a7aaeedaf05c55513ec
-DIST ffmpeg-4.0.2.tar.bz2 10424065 BLAKE2B 
0d3e072fa31bfae37722d8113f9c9cfd2071067b2a29ed5c7332ae49b388b91e8646b6bc8a816517bcebcdcc8d923d1e8b5a080dbdc63ea2a153aea8ecfb2af9
 SHA512 
92a3bedcd070df72b26dbe3ebf4a3faea0a02289fbefdb6a6c73d65801cf60a7e11cd832d29ab46b7749a1ffd0a31505cf75bb46bd01ea06423b454ca04e9b7b
-DIST ffmpeg-4.0.3.tar.bz2 10425117 BLAKE2B 
1517d66d5a0c931b866df5206ae660a01daf49d375f7750a7b027ce62ab7dc8131fc02b8a6320e5ff7295b9bccdafbbaf25e206c55fad420ea206c1b9638e777
 SHA512 
8d600adf55f2fc1574a7013700129766a4a3db83bb33ec32fe07759310f1d8804c00e74b58fd1fcbdd91efec214764e4b2fadf7b01c948dc2ccdcd1b4d56e303
 DIST ffmpeg-4.1.1.tar.bz2 10686360 BLAKE2B 
47f4716d7e184d7318eb1a99ab1cdc188009464e973162e583f7ca4ae79fa3b103f9d5329c8993b72d20667e42e5a749123709a4640f07762568300b5c3c897f
 SHA512 
0241c44e1dffd0d890a3d30a1b2387ea167d578bb39ba0c804fb417e132d343a9e43da9247b205e18b893d8cf75d8528e9971569be67ac380b88618ef0a75ed4
-DIST ffmpeg-4.1.tar.bz2 10687291 BLAKE2B 
07293af1b13c6c6cad72e368207db21bdbc4b991931166c24ff40b00c3b3c8e1242be1876af8e3f154cc840fcd90d87b762fe77faccf06936dd096478d5d074b
 SHA512 
ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417

diff --git a/media-video/ffmpeg/ffmpeg-4.0.2.ebuild 
b/media-video/ffmpeg/ffmpeg-4.0.2.ebuild
deleted file mode 100644
index 4cb26fd9047..000
--- a/media-video/ffmpeg/ffmpeg-4.0.2.ebuild
+++ /dev/null
@@ -1,522 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# Subslot: libavutil major.libavcodec major.libavformat major
-# Since FFmpeg ships several libraries, subslot is kind of limited here.
-# Most consumers will use those three libraries, if a "less used" library
-# changes its soname, consumers will have to be rebuilt the old way
-# (preserve-libs).
-# If, for example, a package does not link to libavformat and only libavformat
-# changes its ABI then this package will be rebuilt needlessly. Hence, such a
-# package is free _not_ to := depend on FFmpeg but I would strongly encourage
-# doing so since such a case is unlikely.
-FFMPEG_SUBSLOT=56.58.58
-
-SCM=""
-if [ "${PV#}" != "${PV}" ] ; then
-   SCM="git-r3"
-   EGIT_MIN_CLONE_TYPE="single"
-   EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git;
-fi
-
-inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
-
-DESCRIPTION="Complete solution to record, convert and stream audio and video. 
Includes libavcodec"
-HOMEPAGE="http://ffmpeg.org/;
-if [ "${PV#}" != "${PV}" ] ; then
-   SRC_URI=""
-elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
-   SRC_URI="mirror://gentoo/${P}.tar.bz2"
-else # Release
-   SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2;
-fi
-FFMPEG_REVISION="${PV#*_p}"
-
-SLOT="0/${FFMPEG_SUBSLOT}"
-LICENSE="
-   !gpl? ( LGPL-2.1 )
-   gpl? ( GPL-2 )
-   amr? (
-   

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2018-11-15 Thread Craig Andrews
commit: 63eea8c23f690957d95bd26086f3502993024d22
Author: Craig Andrews  gentoo  org>
AuthorDate: Thu Nov 15 16:16:37 2018 +
Commit: Craig Andrews  gentoo  org>
CommitDate: Thu Nov 15 16:16:37 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63eea8c2

media-video/ffmpeg: Fix building tools with vaapi

Patch from ffmpeg git master

Closes: https://bugs.gentoo.org/670712
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Craig Andrews  gentoo.org>

 media-video/ffmpeg/ffmpeg-4.1.ebuild   |  1 +
 .../ffmpeg/files/ffmpeg-4.1-vaapi-tools.patch  | 27 ++
 2 files changed, 28 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-4.1.ebuild 
b/media-video/ffmpeg/ffmpeg-4.1.ebuild
index 2a10fdca948..34b08d7a8e2 100644
--- a/media-video/ffmpeg/ffmpeg-4.1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.1.ebuild
@@ -304,6 +304,7 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
"${FILESDIR}"/chromium-r1.patch
+   "${FILESDIR}/${P}-vaapi-tools.patch"
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/ffmpeg-4.1-vaapi-tools.patch 
b/media-video/ffmpeg/files/ffmpeg-4.1-vaapi-tools.patch
new file mode 100644
index 000..e55917471fb
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-4.1-vaapi-tools.patch
@@ -0,0 +1,27 @@
+From 4f1e07090a9f6064078cac694f1d7148f86176c3 Mon Sep 17 00:00:00 2001
+From: Mark Thompson 
+Date: Wed, 14 Nov 2018 22:56:18 +
+Subject: [PATCH] configure: Add missing xlib dependency for VAAPI X11 code
+
+Fixes #7538.
+
+(cherry picked from commit 2ce3a48f30fe3cec7153aa3f18a1012a366aca3a)
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index e79dae896c..a70c5f9e9e 100755
+--- a/configure
 b/configure
+@@ -2812,6 +2812,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder 
ID3D11VideoContext"
+ dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
+ ffnvcodec_deps_any="libdl LoadLibrary"
+ nvdec_deps="ffnvcodec"
++vaapi_x11_deps="xlib"
+ videotoolbox_hwaccel_deps="videotoolbox pthreads"
+ videotoolbox_hwaccel_extralibs="-framework QuartzCore"
+ xvmc_deps="X11_extensions_XvMClib_h"
+-- 
+2.11.0
+



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2018-07-19 Thread Alexis Ballier
commit: 2dacc4667f7237c6ab6da9039b125af8bc5fc441
Author: Alexis Ballier  gentoo  org>
AuthorDate: Wed Jul 18 18:01:17 2018 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Thu Jul 19 11:08:48 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dacc466

media-video/ffmpeg: bump to 3.4.4

Package-Manager: Portage-2.3.43, Repoman-2.3.10

 media-video/ffmpeg/Manifest|  2 +-
 ...{ffmpeg-3.4.3-r1.ebuild => ffmpeg-3.4.4.ebuild} |  1 -
 media-video/ffmpeg/files/imgc.patch| 29 --
 3 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index c2e98a37877..7473ea549db 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -2,5 +2,5 @@ DIST ffmpeg-3.2.6.tar.bz2 9623111 BLAKE2B 
76ed10d969ec5e85c0ad23fee1118ccfd66689
 DIST ffmpeg-3.2.7.tar.bz2 9622391 BLAKE2B 
7d6f094ca0bd5e2cab02e051acc8e554873bca2d165fc9326de0b12e145ec939567aed95c01589c47291970a89fb3462c75d32db1c4c2c8cf6d4a14956cd8a79
 SHA512 
a5b6df77d2d4ede0cc2f398b763d7405f43f43e37c11a596ec1a2a8921714875fd8fa9ffbcff84355854780872ab7313c859a4a19bf419298b4d3bc797ad8ac4
 DIST ffmpeg-3.3.4.tar.bz2 9944256 BLAKE2B 
72d42a16396882b30641fb057bb597f8e98ecfa482a087ece48189acba8a80a72e931e70ad961db8c01c93a556f619ebdecb39bae9d4559cc504d0f7eabf15a7
 SHA512 
d2257a71f9ae7856390b807d70bf643d4360fe4f2ad7c76af3ac5332cda353a1a543cdcdea0c510dbb6141f7a3a36ffbf26ae87b0ffc9ce4b3b7641814a40e3a
 DIST ffmpeg-3.3.6.tar.bz2 9943322 BLAKE2B 
2526fdf9580045131426e554a9bf44fdc6567c12213ea4d5b78aa27f14513f14e07f38b8380183686fa1a62440fe4108eaecddca96f4dec3c74c410b1f90ee03
 SHA512 
1305760fa981bcb43c8fcb5dd1bf7dd8d3f405a124975f062062b741d49e12386e4d3eec3de6a032fc93cd7f6086d939275a669a9997ffa400f70c20f7eb3d23
-DIST ffmpeg-3.4.3.tar.bz2 10183483 BLAKE2B 
144811663ab32db05577e262e2fcf9087528544b2f27fb6c551317d4916d399ee2d6e70f6f5ce6351ba78f6f51609b2455eef6170b3e339699c9f2486a459194
 SHA512 
924838d334d905de23c950634ad905bc55ae4435e135afdea93639a598ad522c020165f4528c66560448c136c28770c3fd3311328c2307bb232bc1d0914af964
+DIST ffmpeg-3.4.4.tar.bz2 10181822 BLAKE2B 
1b15d389576cbbe6d375e8934aac20a1d7ee5854c711aa90cc831201e5b1f42ed8b2c2b277ddde33060cda8fcd605dc6f3fa5e95ab8dff9125515de2d5bf8579
 SHA512 
6803ede26d403dd38835491e0b66c23856d62312a32520ad98866ebd4468d1d50723060c45101481282285711790bcf810c5012bc067e54568fc1954d361e620
 DIST ffmpeg-4.0.2.tar.bz2 10424065 BLAKE2B 
0d3e072fa31bfae37722d8113f9c9cfd2071067b2a29ed5c7332ae49b388b91e8646b6bc8a816517bcebcdcc8d923d1e8b5a080dbdc63ea2a153aea8ecfb2af9
 SHA512 
92a3bedcd070df72b26dbe3ebf4a3faea0a02289fbefdb6a6c73d65801cf60a7e11cd832d29ab46b7749a1ffd0a31505cf75bb46bd01ea06423b454ca04e9b7b

diff --git a/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild 
b/media-video/ffmpeg/ffmpeg-3.4.4.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
rename to media-video/ffmpeg/ffmpeg-3.4.4.ebuild
index cfc053565cd..aa8b226963b 100644
--- a/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.4.4.ebuild
@@ -290,7 +290,6 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
"${FILESDIR}"/chromium.patch
-   "${FILESDIR}"/imgc.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/imgc.patch 
b/media-video/ffmpeg/files/imgc.patch
deleted file mode 100644
index 793299ad703..000
--- a/media-video/ffmpeg/files/imgc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-commit c1e172c2e14ef059dac632f7c67f081dfecd30dc
-Author: Simon Thelen 
-Date:   Tue Apr 3 14:41:33 2018 +0200
-
-avcodec/imgconvert: fix possible null pointer dereference
-
-regression since 354b26a3945eadd4ed8fcd801dfefad2566241de
-
-(cherry picked from commit 8c2c97403baf95d0facb53f03e468f023eb943e1)
-
-diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
-index 7b0005b308..1fd636c83d 100644
 a/libavcodec/imgconvert.c
-+++ b/libavcodec/imgconvert.c
-@@ -72,11 +72,12 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const 
enum AVPixelFormat *p
- int loss;
- 
- for (i=0; pix_fmt_list[i] != AV_PIX_FMT_NONE; i++) {
--loss = *loss_ptr;
-+loss = loss_ptr ? *loss_ptr : 0;
- best = avcodec_find_best_pix_fmt_of_2(best, pix_fmt_list[i], 
src_pix_fmt, has_alpha, );
- }
- 
--*loss_ptr = loss;
-+if (loss_ptr)
-+*loss_ptr = loss;
- return best;
- }
- 



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2018-07-17 Thread Alexis Ballier
commit: 6d10649f4bd5343beaaab6c57638df2df3a3b3e7
Author: Alexis Ballier  gentoo  org>
AuthorDate: Tue Jul 17 07:31:16 2018 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Tue Jul 17 07:33:25 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d10649f

media-video/ffmpeg: bp us patch to fix mpv crash regression

Closes: https://bugs.gentoo.org/661220
Package-Manager: Portage-2.3.43, Repoman-2.3.10

 ...{ffmpeg-3.4.3.ebuild => ffmpeg-3.4.3-r1.ebuild} |  1 +
 media-video/ffmpeg/files/imgc.patch| 29 ++
 2 files changed, 30 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.4.3.ebuild 
b/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-3.4.3.ebuild
rename to media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
index aa8b226963b..cfc053565cd 100644
--- a/media-video/ffmpeg/ffmpeg-3.4.3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
@@ -290,6 +290,7 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
"${FILESDIR}"/chromium.patch
+   "${FILESDIR}"/imgc.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/imgc.patch 
b/media-video/ffmpeg/files/imgc.patch
new file mode 100644
index 000..793299ad703
--- /dev/null
+++ b/media-video/ffmpeg/files/imgc.patch
@@ -0,0 +1,29 @@
+commit c1e172c2e14ef059dac632f7c67f081dfecd30dc
+Author: Simon Thelen 
+Date:   Tue Apr 3 14:41:33 2018 +0200
+
+avcodec/imgconvert: fix possible null pointer dereference
+
+regression since 354b26a3945eadd4ed8fcd801dfefad2566241de
+
+(cherry picked from commit 8c2c97403baf95d0facb53f03e468f023eb943e1)
+
+diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
+index 7b0005b308..1fd636c83d 100644
+--- a/libavcodec/imgconvert.c
 b/libavcodec/imgconvert.c
+@@ -72,11 +72,12 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const 
enum AVPixelFormat *p
+ int loss;
+ 
+ for (i=0; pix_fmt_list[i] != AV_PIX_FMT_NONE; i++) {
+-loss = *loss_ptr;
++loss = loss_ptr ? *loss_ptr : 0;
+ best = avcodec_find_best_pix_fmt_of_2(best, pix_fmt_list[i], 
src_pix_fmt, has_alpha, );
+ }
+ 
+-*loss_ptr = loss;
++if (loss_ptr)
++*loss_ptr = loss;
+ return best;
+ }
+ 



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2018-01-18 Thread James Le Cuirot
commit: 4ee1f92d3a83a75687e14feb178eb5748d9a0957
Author: James Le Cuirot  gentoo  org>
AuthorDate: Thu Jan 18 22:00:00 2018 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Thu Jan 18 22:01:05 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ee1f92d

media-video/ffmpeg: Revert chromium.patch change and add -r1 for 

My change to fix  in 31be70b4de8dc1f3627765a4a35a4b5cf90a170f
broke all versions when ffmpeg is not already installed. I have
reverted this change for earlier versions and introduced a new patch
with a different approach for .

Closes: https://bugs.gentoo.org/643750
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 media-video/ffmpeg/ffmpeg-.ebuild  | 2 +-
 media-video/ffmpeg/files/{chromium.patch => chromium-r1.patch} | 2 +-
 media-video/ffmpeg/files/chromium.patch| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/media-video/ffmpeg/ffmpeg-.ebuild 
b/media-video/ffmpeg/ffmpeg-.ebuild
index f78260745ad..bae322e21e7 100644
--- a/media-video/ffmpeg/ffmpeg-.ebuild
+++ b/media-video/ffmpeg/ffmpeg-.ebuild
@@ -291,7 +291,7 @@ RESTRICT="
 S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
-   "${FILESDIR}"/chromium.patch
+   "${FILESDIR}"/chromium-r1.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/chromium.patch 
b/media-video/ffmpeg/files/chromium-r1.patch
similarity index 94%
copy from media-video/ffmpeg/files/chromium.patch
copy to media-video/ffmpeg/files/chromium-r1.patch
index 307f31f4a3a..cfe06a7aec8 100644
--- a/media-video/ffmpeg/files/chromium.patch
+++ b/media-video/ffmpeg/files/chromium-r1.patch
@@ -14,7 +14,7 @@ index 000..992cf3c
 +LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic 
-Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) 
-o $(LIBFFMPEG)
 +
 +libffmpeg-: libavcodec/$(LIBPREF)avcodec$(LIBSUF) 
libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) 
libswresample/$(LIBPREF)swresample$(LIBSUF)
-+  $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive 
$(FF_EXTRALIBS)
++  $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive 
$(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) 
$(EXTRALIBS-swresample)
 +
 +libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) 
libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
 +  $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil

diff --git a/media-video/ffmpeg/files/chromium.patch 
b/media-video/ffmpeg/files/chromium.patch
index 307f31f4a3a..60a3e5d6cb9 100644
--- a/media-video/ffmpeg/files/chromium.patch
+++ b/media-video/ffmpeg/files/chromium.patch
@@ -14,7 +14,7 @@ index 000..992cf3c
 +LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic 
-Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) 
-o $(LIBFFMPEG)
 +
 +libffmpeg-: libavcodec/$(LIBPREF)avcodec$(LIBSUF) 
libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) 
libswresample/$(LIBPREF)swresample$(LIBSUF)
-+  $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive 
$(FF_EXTRALIBS)
++  $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive 
$(FFEXTRALIBS)
 +
 +libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) 
libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
 +  $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2017-08-27 Thread James Le Cuirot
commit: 836efa98efe86a14eb8d82e19f3d2814dc09f749
Author: James Le Cuirot  gentoo  org>
AuthorDate: Sun Aug 27 19:17:32 2017 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Sun Aug 27 19:17:32 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=836efa98

media-video/ffmpeg: Add chromium include manually for easier patching

This makes the patch apply against any version. The include line will
work just as well at the end of the Makefile.

Package-Manager: Portage-2.3.8, Repoman-2.3.2

 media-video/ffmpeg/ffmpeg-.ebuild   |  1 +
 media-video/ffmpeg/files/chromium.patch | 15 +++
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/media-video/ffmpeg/ffmpeg-.ebuild 
b/media-video/ffmpeg/ffmpeg-.ebuild
index 55572458a50..ac3d4666a00 100644
--- a/media-video/ffmpeg/ffmpeg-.ebuild
+++ b/media-video/ffmpeg/ffmpeg-.ebuild
@@ -302,6 +302,7 @@ src_prepare() {
export revision=git-N-${FFMPEG_REVISION}
fi
default
+   echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
 }
 
 multilib_src_configure() {

diff --git a/media-video/ffmpeg/files/chromium.patch 
b/media-video/ffmpeg/files/chromium.patch
index bc8b8d38698..60a3e5d6cb9 100644
--- a/media-video/ffmpeg/files/chromium.patch
+++ b/media-video/ffmpeg/files/chromium.patch
@@ -1,18 +1,9 @@
 Allow libffmpeg to be built for Chromium-based browsers
 https://patchwork.ffmpeg.org/patch/4500/
 
-diff --git a/Makefile b/Makefile
-index 29870d7..1e267e7 100644
 a/Makefile
-+++ b/Makefile
-@@ -65,6 +65,7 @@ all: all-yes
- 
- include $(SRC_PATH)/tools/Makefile
- include $(SRC_PATH)/ffbuild/common.mak
-+include $(SRC_PATH)/ffbuild/libffmpeg.mak
- 
- FF_EXTRALIBS := $(FFEXTRALIBS)
- FF_DEP_LIBS  := $(DEP_LIBS)
+NOTE: This patch lacks the Makefile include line. We append it
+manually instead to make patching across different versions easier.
+
 diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
 new file mode 100644
 index 000..992cf3c



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2017-08-26 Thread Alexis Ballier
commit: 904d190b4714c2d7a2ca9637f45d817a13e69125
Author: Alexis Ballier  gentoo  org>
AuthorDate: Sat Aug 26 13:40:52 2017 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Sat Aug 26 13:40:58 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=904d190b

media-video/ffmpeg: Backport upstream patches to build with openjpeg 2.2, bugs 
#628302 and #627562

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 media-video/ffmpeg/ffmpeg-3.2.6.ebuild |   2 +
 media-video/ffmpeg/ffmpeg-3.2.7.ebuild |   2 +
 media-video/ffmpeg/ffmpeg-3.3.3.ebuild |   2 +
 media-video/ffmpeg/files/ffmpeg32-openjpeg22.patch | 106 +
 media-video/ffmpeg/files/openjpeg22.patch  | 106 +
 5 files changed, 218 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.2.6.ebuild 
b/media-video/ffmpeg/ffmpeg-3.2.6.ebuild
index 0969268ce8f..74d37e876a7 100644
--- a/media-video/ffmpeg/ffmpeg-3.2.6.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.2.6.ebuild
@@ -287,6 +287,8 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
 )
 
+PATCHES=( "${FILESDIR}/ffmpeg32-openjpeg22.patch" )
+
 src_prepare() {
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
export revision=git-N-${FFMPEG_REVISION}

diff --git a/media-video/ffmpeg/ffmpeg-3.2.7.ebuild 
b/media-video/ffmpeg/ffmpeg-3.2.7.ebuild
index d7e03bf5fdf..15961769e9c 100644
--- a/media-video/ffmpeg/ffmpeg-3.2.7.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.2.7.ebuild
@@ -287,6 +287,8 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
 )
 
+PATCHES=( "${FILESDIR}/ffmpeg32-openjpeg22.patch" )
+
 src_prepare() {
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
export revision=git-N-${FFMPEG_REVISION}

diff --git a/media-video/ffmpeg/ffmpeg-3.3.3.ebuild 
b/media-video/ffmpeg/ffmpeg-3.3.3.ebuild
index fb789614634..a6548ccc453 100644
--- a/media-video/ffmpeg/ffmpeg-3.3.3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.3.3.ebuild
@@ -307,6 +307,8 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
 )
 
+PATCHES=( "${FILESDIR}/openjpeg22.patch" )
+
 src_prepare() {
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
export revision=git-N-${FFMPEG_REVISION}

diff --git a/media-video/ffmpeg/files/ffmpeg32-openjpeg22.patch 
b/media-video/ffmpeg/files/ffmpeg32-openjpeg22.patch
new file mode 100644
index 000..0ee648641be
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg32-openjpeg22.patch
@@ -0,0 +1,106 @@
+commit 078322f33ced4b2db6ac3e5002f98233d6fbf643
+Author: Reino17 
+Date:   Fri Jun 23 23:49:31 2017 +0200
+
+Add support for LibOpenJPEG v2.2/git
+
+Signed-off-by: Michael Bradshaw 
+
+Index: ffmpeg-3.2.7/configure
+===
+--- ffmpeg-3.2.7.orig/configure
 ffmpeg-3.2.7/configure
+@@ -1831,6 +1831,7 @@ HEADERS_LIST="
+ machine_ioctl_meteor_h
+ malloc_h
+ opencv2_core_core_c_h
++openjpeg_2_2_openjpeg_h
+ openjpeg_2_1_openjpeg_h
+ openjpeg_2_0_openjpeg_h
+ openjpeg_1_5_openjpeg_h
+@@ -5721,7 +5722,9 @@ enabled libopencv && { check_hea
+  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
+ enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
+-enabled libopenjpeg   && { { check_lib2 openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++enabled libopenjpeg   && { { check_lib2 openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++   check_lib2 openjpeg-2.2/openjpeg.h opj_version 
-lopenjp2 ||
++   { check_lib2 openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+check_lib2 openjpeg-2.1/openjpeg.h opj_version 
-lopenjp2 ||
+{ check_lib2 openjpeg-2.0/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+{ check_lib2 openjpeg-1.5/openjpeg.h 
opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+Index: ffmpeg-3.2.7/libavcodec/libopenjpegdec.c
+===
+--- ffmpeg-3.2.7.orig/libavcodec/libopenjpegdec.c
 ffmpeg-3.2.7/libavcodec/libopenjpegdec.c
+@@ -34,7 +34,9 @@
+ #include "internal.h"
+ #include "thread.h"
+ 
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++#  include 
++#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
+ #  include 
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ #  include 
+@@ -44,7 +46,7 @@
+ #  include 
+ 

[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2017-02-07 Thread Alexis Ballier
commit: 2550cb9a9478bebfe3fa141f7a2278448694c666
Author: Alexis Ballier  gentoo  org>
AuthorDate: Tue Feb  7 09:45:37 2017 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Tue Feb  7 09:45:37 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2550cb9a

media-video/ffmpeg: Bump to 3.2.3

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 media-video/ffmpeg/Manifest|  2 +-
 .../{ffmpeg-3.2.2.ebuild => ffmpeg-3.2.3.ebuild}   |  2 --
 media-video/ffmpeg/files/chromaprint14.patch   | 24 --
 3 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 4994b85..27c2e2a 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -1,2 +1,2 @@
 DIST ffmpeg-2.8.10.tar.bz2 8585304 SHA256 
d1ce1a73503dce6e2b1e208cb93a2a8a7e89f9c64357ddc3e4da3cab33dea9c9 SHA512 
1ca8b0060361c49de201afc463bcd7c9340f09bbd116dff2539653bc36411d60cdf667874d2ec51664e141ee7a7be8bebc94e158687cb97db6bdfa40f00ec193
 WHIRLPOOL 
4ff9271290c138ad5caa50835da9fd6685fabf5a589cb6c068cfff6698ded948d93e9d40656dca3b516f9e591119d204e6283d57f7d2f0747a4f7ef9b322ebce
-DIST ffmpeg-3.2.2.tar.bz2 9611373 SHA256 
0b129a56d1b8d06101b1fcbfaa9f4f5eee3182d1ad6e44f511a84c12113a366b SHA512 
7cb61684081bbe905ef324f60d259fd543e8be1ed2593167beb9324bec8bbc012cccff40a73e8be0ccc6bb0a20acd98a3dbac0d1d39403016cb381c1410b45db
 WHIRLPOOL 
fe43df569f88b79d5bfaab1d16929d3f3eaf7deecd3ca42a922d67cd971d8ac0a17b2dfc6db75b706a93da7e877887dcc75a38609e62e2ea4781b9363292a872
+DIST ffmpeg-3.2.3.tar.bz2 9614810 SHA256 
e9a41be04e8a7f62f83d0ff5ecaa9c82a857f9200f61b02ef5f304a16fb9b072 SHA512 
97f44497b2b9beccbefe8c28e1f82629e74537a585720323adc60620af2782d376498fd3558ddf0d39b9010cbddc3fb62907e3c214ccac72ec1fcbd64baf4b0f
 WHIRLPOOL 
1b45cdc6e0eac48d65105fe04b3eea1ae6ae719abbfa5700d4e103e061e69a47caab544f71de8fce3d8c3aa83bba2e452b1b4a06c8e2c0aad3ec5f6bf34ff249

diff --git a/media-video/ffmpeg/ffmpeg-3.2.2.ebuild 
b/media-video/ffmpeg/ffmpeg-3.2.3.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-3.2.2.ebuild
rename to media-video/ffmpeg/ffmpeg-3.2.3.ebuild
index 0bd671e..576150b 100644
--- a/media-video/ffmpeg/ffmpeg-3.2.2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.2.3.ebuild
@@ -284,8 +284,6 @@ RESTRICT="
 
 S=${WORKDIR}/${P/_/-}
 
-PATCHES=( "${FILESDIR}/chromaprint14.patch" )
-
 MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
 )

diff --git a/media-video/ffmpeg/files/chromaprint14.patch 
b/media-video/ffmpeg/files/chromaprint14.patch
deleted file mode 100644
index d166247..
--- a/media-video/ffmpeg/files/chromaprint14.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit 581f93f37ef2e7a00662828ed0348d1edb9041fe
-Author: Georgi D. Sotirov 
-Date:   Tue Dec 6 21:07:59 2016 +0100
-
-lavf/chromaprint: Update for version 1.4
-
-Fixes ticket #5997.
-
-diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
-index 8c9a6c0111..4da02bef76 100644
 a/libavformat/chromaprint.c
-+++ b/libavformat/chromaprint.c
-@@ -39,7 +39,11 @@ typedef struct ChromaprintMuxContext {
- int silence_threshold;
- int algorithm;
- FingerprintFormat fp_format;
-+#if CPR_VERSION_INT >= AV_VERSION_INT(1, 4, 0)
-+ChromaprintContext *ctx;
-+#else
- ChromaprintContext ctx;
-+#endif
- } ChromaprintMuxContext;
- 
- static void cleanup(ChromaprintMuxContext *cpr)



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2016-12-24 Thread Alexis Ballier
commit: 3564e7dbe3136e473df37de148f2449301032c30
Author: Alexis Ballier  gentoo  org>
AuthorDate: Sat Dec 24 10:33:11 2016 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Sat Dec 24 10:33:25 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3564e7db

media-video/ffmpeg: backport upstream patch to build with chromaprint 1.4.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 media-video/ffmpeg/ffmpeg-3.2.2.ebuild   |  2 ++
 media-video/ffmpeg/files/chromaprint14.patch | 24 
 2 files changed, 26 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.2.2.ebuild 
b/media-video/ffmpeg/ffmpeg-3.2.2.ebuild
index 38429b2..9b30ce4 100644
--- a/media-video/ffmpeg/ffmpeg-3.2.2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.2.2.ebuild
@@ -284,6 +284,8 @@ RESTRICT="
 
 S=${WORKDIR}/${P/_/-}
 
+PATCHES=( "${FILESDIR}/chromaprint14.patch" )
+
 MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
 )

diff --git a/media-video/ffmpeg/files/chromaprint14.patch 
b/media-video/ffmpeg/files/chromaprint14.patch
new file mode 100644
index ..d166247
--- /dev/null
+++ b/media-video/ffmpeg/files/chromaprint14.patch
@@ -0,0 +1,24 @@
+commit 581f93f37ef2e7a00662828ed0348d1edb9041fe
+Author: Georgi D. Sotirov 
+Date:   Tue Dec 6 21:07:59 2016 +0100
+
+lavf/chromaprint: Update for version 1.4
+
+Fixes ticket #5997.
+
+diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
+index 8c9a6c0111..4da02bef76 100644
+--- a/libavformat/chromaprint.c
 b/libavformat/chromaprint.c
+@@ -39,7 +39,11 @@ typedef struct ChromaprintMuxContext {
+ int silence_threshold;
+ int algorithm;
+ FingerprintFormat fp_format;
++#if CPR_VERSION_INT >= AV_VERSION_INT(1, 4, 0)
++ChromaprintContext *ctx;
++#else
+ ChromaprintContext ctx;
++#endif
+ } ChromaprintMuxContext;
+ 
+ static void cleanup(ChromaprintMuxContext *cpr)



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2016-09-29 Thread Alexis Ballier
commit: 6f1595fb23b828b52ad4e8dbe60efb3f9decbfec
Author: Alexis Ballier  gentoo  org>
AuthorDate: Thu Sep 29 16:32:51 2016 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Thu Sep 29 16:33:02 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f1595fb

media-video/ffmpeg: add patch to build with latest openjpeg, bug #595318

Package-Manager: portage-2.3.1

 media-video/ffmpeg/ffmpeg-3.1.3.ebuild   |  1 +
 media-video/ffmpeg/files/openjpeg2.patch | 39 
 2 files changed, 40 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.1.3.ebuild 
b/media-video/ffmpeg/ffmpeg-3.1.3.ebuild
index 19db1ed..03b2cf4 100644
--- a/media-video/ffmpeg/ffmpeg-3.1.3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.1.3.ebuild
@@ -294,6 +294,7 @@ src_prepare() {
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
export revision=git-N-${FFMPEG_REVISION}
fi
+   epatch "${FILESDIR}/openjpeg2.patch" #595318
default
 }
 

diff --git a/media-video/ffmpeg/files/openjpeg2.patch 
b/media-video/ffmpeg/files/openjpeg2.patch
new file mode 100644
index ..e203e61
--- /dev/null
+++ b/media-video/ffmpeg/files/openjpeg2.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/show_bug.cgi?id=595318
+https://trac.ffmpeg.org/ticket/5694
+
+diff -rupN ffmpeg-3.1.1/configure ffmpeg-3.1.1-new/configure
+--- ffmpeg-3.1.1/configure 2016-06-27 01:54:28.0 +0200
 ffmpeg-3.1.1-new/configure 2016-07-27 22:25:36.585141648 +0200
+@@ -5669,7 +5669,7 @@ enabled libopencv && { check_hea
+  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
+ enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
+-enabled libopenjpeg   && { check_lib openjpeg-2.1/openjpeg.h opj_version 
-lopenjp2 -DOPJ_STATIC ||
++enabled libopenjpeg   && { check_lib openjpeg-2.1/openjpeg.h opj_version 
-lopenjp2 ||
+check_lib openjpeg-2.0/openjpeg.h opj_version 
-lopenjp2 -DOPJ_STATIC ||
+check_lib openjpeg-1.5/openjpeg.h opj_version 
-lopenjpeg -DOPJ_STATIC ||
+check_lib openjpeg.h opj_version -lopenjpeg 
-DOPJ_STATIC ||
+diff -rupN ffmpeg-3.1.1/libavcodec/libopenjpegdec.c 
ffmpeg-3.1.1-new/libavcodec/libopenjpegdec.c
+--- ffmpeg-3.1.1/libavcodec/libopenjpegdec.c   2016-06-27 01:54:29.0 
+0200
 ffmpeg-3.1.1-new/libavcodec/libopenjpegdec.c   2016-07-27 
22:25:45.509327071 +0200
+@@ -24,8 +24,6 @@
+  * JPEG 2000 decoder using libopenjpeg
+  */
+
+-#define  OPJ_STATIC
+-
+ #include "libavutil/common.h"
+ #include "libavutil/imgutils.h"
+ #include "libavutil/intreadwrite.h"
+diff -rupN ffmpeg-3.1.1/libavcodec/libopenjpegenc.c 
ffmpeg-3.1.1-new/libavcodec/libopenjpegenc.c
+--- ffmpeg-3.1.1/libavcodec/libopenjpegenc.c   2016-06-27 01:54:29.0 
+0200
 ffmpeg-3.1.1-new/libavcodec/libopenjpegenc.c   2016-07-27 
22:25:40.298218807 +0200
+@@ -24,8 +24,6 @@
+  * JPEG 2000 encoder using libopenjpeg
+  */
+
+-#define  OPJ_STATIC
+-
+ #include "libavutil/avassert.h"
+ #include "libavutil/common.h"
+ #include "libavutil/imgutils.h"



[gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/files/, media-video/ffmpeg/

2015-11-12 Thread Alexis Ballier
commit: 432addcb0d1934705424e9712cdb3d735c15ac5d
Author: Alexis Ballier  gentoo  org>
AuthorDate: Thu Nov 12 11:10:54 2015 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Thu Nov 12 11:46:43 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=432addcb

media-video/ffmpeg: bump to 2.8.2 and backport upstream fix to build with 
libvpx 1.5

Package-Manager: portage-2.2.24
Signed-off-by: Alexis Ballier  gentoo.org>

 media-video/ffmpeg/Manifest |   1 +
 media-video/ffmpeg/ffmpeg-2.8.2.ebuild  | 456 
 media-video/ffmpeg/files/libvpx15.patch |  36 +++
 3 files changed, 493 insertions(+)

diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 8e0bc3c..8eb4930 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -2,3 +2,4 @@ DIST ffmpeg-2.6.3.tar.bz2 7803314 SHA256 
59eb98c1b5896ac29abc0385f7c875d1b4942d6
 DIST ffmpeg-2.6.4.tar.bz2 7811925 SHA256 
184f49e6b359426c398ad6c67d89abd362558373a43d3d92f86e554571655a5d SHA512 
76c8bb3b23f2d2bac73b1561ef31bb3d1da49b2e182d84a13bf0bf49ea84cd0d64566c9dfafc4ac9d660aa4cecc0f08272b9ee284d1d09776e4599b87920c308
 WHIRLPOOL 
2d68715fb284979d703905919289c897c5cb002c3d466aca6c9759ca9f93443b749a24747cf218d005d728680ad137990880ec99210b6fb49038587966dd79f4
 DIST ffmpeg-2.7.2.tar.bz2 8157217 SHA256 
7ceb7550ad628c526fa6c9ff23fdfb687a62f54d90c4a730998d8c2b417b9ef2 SHA512 
cce58c63ae14dcbd3bdc4758af8427e18ac589f8bd4f2701e54b5e0e61669d5aab212e5829feb67a0fd33bc52b2d64adff93729c0696c44a0f6064a0752433dd
 WHIRLPOOL 
dd286393427b89be266ad2b122138dab578843d16bdf9b989b9546734f489c8c5c3d1ab0443ff5039b440a8430802ffe24f0fc38553688ec80984a1cce2ba2a3
 DIST ffmpeg-2.8.1.tar.bz2 8564488 SHA256 
e2ed5ab28dee1af94336739173eb0019afc21a54e38a96f4e3208e94a07866e2 SHA512 
5c493f1eb84dd916f12a709a77ca0317a03ce88caaa1ee5e06b4e03c60ef4520ba58c8972841de25dcadb0da42e88592e6a87c3aca18dba62e246256c33fcf91
 WHIRLPOOL 
f0f26375960dff80055fe257b63f11a1cc598bef9450d0da4a619bfc61ba6df185ea0dcf9c566810c7917159bb193d30a1009051c5b32ea1d746b289c782b8aa
+DIST ffmpeg-2.8.2.tar.bz2 8573586 SHA256 
830ec647f7ad774fc0caf17ba47774bf5dee7a89cbd65894f364a87ba3ad21b2 SHA512 
15c1c09d7d4bb8cc7babff4c782e4bf6621ed86d6b02bffb5468bdcd294a1144bf56a8a758d2801200bb89c26ce8f5a086d818affb473364424f94f701cbf749
 WHIRLPOOL 
83ae9a00cba7bc906672f55d796b044d3f4baad9a56804f6482e7c27b9f526d1364dfddaa22ef32b921e5dcd0158222897935544a34c1d1e7c3b9d681067d2e0

diff --git a/media-video/ffmpeg/ffmpeg-2.8.2.ebuild 
b/media-video/ffmpeg/ffmpeg-2.8.2.ebuild
new file mode 100644
index 000..2db9b73
--- /dev/null
+++ b/media-video/ffmpeg/ffmpeg-2.8.2.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Subslot: libavutil major.libavcodec major.libavformat major
+# Since FFmpeg ships several libraries, subslot is kind of limited here.
+# Most consumers will use those three libraries, if a "less used" library
+# changes its soname, consumers will have to be rebuilt the old way
+# (preserve-libs).
+# If, for example, a package does not link to libavformat and only libavformat
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage
+# doing so since such a case is unlikely.
+FFMPEG_SUBSLOT=54.56.56
+
+SCM=""
+if [ "${PV#}" != "${PV}" ] ; then
+   SCM="git-2"
+   EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
+
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. 
Includes libavcodec"
+HOMEPAGE="http://ffmpeg.org/;
+if [ "${PV#}" != "${PV}" ] ; then
+   SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+   SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+   SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2;
+fi
+FFMPEG_REVISION="${PV#*_p}"
+
+SLOT="0/${FFMPEG_SUBSLOT}"
+LICENSE="
+   !gpl? ( LGPL-2.1 )
+   gpl? ( GPL-2 )
+   amr? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   encode? (
+   aac? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   amrenc? (
+   gpl? ( GPL-3 )
+   !gpl? ( LGPL-3 )
+   )
+   )
+   samba? ( GPL-3 )
+"
+if [ "${PV#}" = "${PV}" ] ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd 
~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+# Options to use as use_enable in the foo[:bar] form.
+# This will feed configure with $(use_enable foo bar)
+# or $(use_enable foo foo) if no :bar is set.
+# foo is added to IUSE.
+FFMPEG_FLAG_MAP=(
+   +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls 
+gpl
+