package/ffmpeg: bump to version 3.1.2
PATCH v5 1/6 package/ffmpeg: bump to version 3.1.2
From: Vicente Olivert Riera <[email protected]>
- Remove non-existing configure options:
- --disable-mips32r2
- --disable-libvo-aacenc
- --enable-libdcadec
(https://github.com/FFmpeg/FFmpeg/commit/e259dc86a80398d56d1aabcf6203f80616a4d04d)
- Amend renamed configure options:
- --disable-mipsdspr1 has been renamed to --disable-mipsdsp
Remove all Kodi-related patches according to upstream repo:
https://github.com/xbmc/FFmpeg/commits/release/3.1-xbmc
Kodi now uses an unpatched ffmpeg.
---
v5: bump to version 3.1.2
v4: bump to version 3.1.1
v3: bump to version 3.0.2
v2: bump to version 3.0.1
...-dvdsub-palette-as-stored-on-normal-dvd-s.patch | 63 ------------- ...packet-returns-AVERROR_IO-we-are-done.-ff.patch | 32 ------- ...t-7187-TV-Teletext-support-for-DVB-EBU-Te.patch | 47 --------- ...on-t-accept-mpegts-PMT-that-isn-t-current.patch | 46 --------- ...parse-PMT-unless-it-s-version-has-changed.patch | 48 ---------- ...mestamps-as-well-as-PCR-timestamps-to-fin.patch | 105 --------------------- ...Get-stream-durations-using-read_timestamp.patch | 74 --------------- ...ow-4-second-skew-between-streams-in-mov-b.patch | 33 ------- ...ak-in-mpegts-demuxer-on-some-malformed-mp.patch | 44 --------- .../0011-Speed-up-mpegts-av_find_stream_info.patch | 30 ------ ...ix-dxva-playback-of-streams-that-don-t-st.patch | 77 --------------- package/ffmpeg/ffmpeg.hash | 2 +- package/ffmpeg/ffmpeg.mk | 20 +--- 13 files changed, 3 insertions(+), 618 deletions(-) delete mode 100644 package/ffmpeg/0001-Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s.patch delete mode 100644 package/ffmpeg/0003-if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff.patch delete mode 100644 package/ffmpeg/0004-added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te.patch delete mode 100644 package/ffmpeg/0005-Don-t-accept-mpegts-PMT-that-isn-t-current.patch delete mode 100644 package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch delete mode 100644 package/ffmpeg/0007-Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin.patch delete mode 100644 package/ffmpeg/0008-Get-stream-durations-using-read_timestamp.patch delete mode 100644 package/ffmpeg/0009-changed-allow-4-second-skew-between-streams-in-mov-b.patch delete mode 100644 package/ffmpeg/0010-fixed-memleak-in-mpegts-demuxer-on-some-malformed-mp.patch delete mode 100644 package/ffmpeg/0011-Speed-up-mpegts-av_find_stream_info.patch delete mode 100644 package/ffmpeg/0012-dxva-h264-Fix-dxva-playback-of-streams-that-don-t-st.patch
package/ffmpeg/0001-Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s.patch deleted +0 -63
@@ -1,63 +0,0 @@ -From 74f1c9b43b191a9d6b494e90a4a11677fca33c13 Mon Sep 17 00:00:00 2001 -From: Joakim Plate <[email protected]> -Date: Sun, 11 Sep 2011 19:04:51 +0200 -Subject: [PATCH 01/13] Support raw dvdsub palette as stored on normal dvd's - -This is how the palette is stored on dvd's. Currently -only xbmc passes the palette information to libavcodec -this way. - -Patch part of the XBMC patch set for ffmpeg, downloaded from -https://github.com/xbmc/FFmpeg/. - -Signed-off-by: Bernd Kuhls <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c -index 39604f3..a711e16 100644 ---- a/libavcodec/dvdsubdec.c -+++ b/libavcodec/dvdsubdec.c -@@ -64,6 +64,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t * - } - } - -+static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values) -+{ -+ uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; -+ uint8_t r, g, b; -+ int i, y, cb, cr, a; -+ int r_add, g_add, b_add; -+ -+ for (i = num_values; i > 0; i--) { -+ a = *ayvu++; -+ y = *ayvu++; -+ cr = *ayvu++; -+ cb = *ayvu++; -+ YUV_TO_RGB1_CCIR(cb, cr); -+ YUV_TO_RGB2_CCIR(r, g, b, y); -+ *argb++ = (a << 24) | (r << 16) | (g << 8) | b; -+ } -+} -+ - static int decode_run_2bit(GetBitContext *gb, int *color) - { - unsigned int v, t; -@@ -697,6 +715,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx) - parse_ifo_palette(ctx, ctx->ifo_str); - if (ctx->palette_str) - parse_palette(ctx, ctx->palette_str); -+ -+ if (!ctx->has_palette && avctx->extradata_size == 64) { -+ ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16); -+ ctx->has_palette = 1; -+ } -+ - if (ctx->has_palette) { - int i; - av_log(avctx, AV_LOG_DEBUG, "palette:"); --- -2.1.0 -
package/ffmpeg/0003-if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From 54200b3e6009c6870e33c02c8bbcf023fcd92cac Mon Sep 17 00:00:00 2001 -From: Cory Fields <[email protected]> -Date: Mon, 28 Jun 2010 01:55:31 -0400 -Subject: [PATCH 03/13] if av_read_packet returns AVERROR_IO, we are done. - ffmpeg's codecs might or might not handle returning any completed demuxed - packets correctly - -Patch part of the XBMC patch set for ffmpeg, downloaded from -https://github.com/xbmc/FFmpeg/. - -Signed-off-by: Bernd Kuhls <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - libavformat/utils.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libavformat/utils.c b/libavformat/utils.c -index ae6347a..3e8af50 100644 ---- a/libavformat/utils.c -+++ b/libavformat/utils.c -@@ -1304,6 +1304,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) - if (ret < 0) { - if (ret == AVERROR(EAGAIN)) - return ret; -+ if (ret == AVERROR(EIO)) -+ return ret; - /* flush the parsers */ - for (i = 0; i < s->nb_streams; i++) { - st = s->streams[i]; --- -2.1.0 -
package/ffmpeg/0004-added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te.patch deleted +0 -47
47 lines not on this page · raw message
package/ffmpeg/0005-Don-t-accept-mpegts-PMT-that-isn-t-current.patch deleted +0 -46
46 lines not on this page · raw message
package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch deleted +0 -48
48 lines not on this page · raw message
package/ffmpeg/0007-Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin.patch deleted +0 -105
105 lines not on this page · raw message
package/ffmpeg/0008-Get-stream-durations-using-read_timestamp.patch deleted +0 -74
74 lines not on this page · raw message
package/ffmpeg/0009-changed-allow-4-second-skew-between-streams-in-mov-b.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From 4bcec3ef0042244b0ade00d132368d0872f73c72 Mon Sep 17 00:00:00 2001 -From: Joakim Plate <[email protected]> -Date: Wed, 8 Dec 2010 14:03:43 +0000 -Subject: [PATCH 09/13] changed: allow 4 second skew between streams in mov - before attempting to seek - -Patch part of the XBMC patch set for ffmpeg, downloaded from -https://github.com/xbmc/FFmpeg/. - -Signed-off-by: Bernd Kuhls <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - libavformat/mov.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavformat/mov.c b/libavformat/mov.c -index 8d66c0a..127ffd9 100644 ---- a/libavformat/mov.c -+++ b/libavformat/mov.c -@@ -4028,8 +4028,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) - if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) || - (s->pb->seekable && - ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && -- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) || -- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) { -+ ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) || -+ (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) { - sample = current_sample; - best_dts = dts; - *st = avst; --- -2.1.0 -
package/ffmpeg/0010-fixed-memleak-in-mpegts-demuxer-on-some-malformed-mp.patch deleted +0 -44
44 lines not on this page · raw message
package/ffmpeg/0011-Speed-up-mpegts-av_find_stream_info.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From c315a758a292200c22925603682e259849d6d558 Mon Sep 17 00:00:00 2001 -From: Joakim Plate <[email protected]> -Date: Mon, 28 Jun 2010 21:26:54 +0000 -Subject: [PATCH 11/13] Speed up mpegts av_find_stream_info - -Patch part of the XBMC patch set for ffmpeg, downloaded from -https://github.com/xbmc/FFmpeg/. - -Signed-off-by: Bernd Kuhls <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - libavformat/mpegts.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index e070f1f..dd9e129 100644 ---- a/libavformat/mpegts.c -+++ b/libavformat/mpegts.c -@@ -994,7 +994,7 @@ static int mpegts_push_data(MpegTSFilter *filter, - goto skip; - - /* stream not present in PMT */ -- if (!pes->st) { -+ if (ts->auto_guess && !pes->st) { - if (ts->skip_changes) - goto skip; - --- -2.1.0 -
package/ffmpeg/0012-dxva-h264-Fix-dxva-playback-of-streams-that-don-t-st.patch deleted +0 -77
77 lines not on this page · raw message
package/ffmpeg/ffmpeg.hash +1 -1
@@ -1,2 +1,2 @@ # Locally calculated -sha256 97be8a6c1cab2c52015544f76d40f6fd0babcb1b40cf601b4e57fb818564157c ffmpeg-2.8.7.tar.xz +sha256 58d2a2b69f0f46fe8aacd45e582c62e380ba611b5baf6a4dfcf2906eb2b9bd61 ffmpeg-3.1.2.tar.xz
package/ffmpeg/ffmpeg.mk +2 -18
@@ -4,7 +4,7 @@ # ################################################################################ -FFMPEG_VERSION = 2.8.7 +FFMPEG_VERSION = 3.1.2 FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz FFMPEG_SITE = http://ffmpeg.org/releases FFMPEG_INSTALL_STAGING = YES
@@ -40,7 +40,7 @@ FFMPEG_CONF_OPTS = \ --enable-runtime-cpudetect \ --disable-hardcoded-tables \ --disable-memalign-hack \ - --disable-mipsdspr1 \ + --disable-mipsdsp \ --disable-mipsdspr2 \ --disable-msa \ --enable-hwaccels \
@@ -57,7 +57,6 @@ FFMPEG_CONF_OPTS = \ --disable-libnut \ --disable-libopenjpeg \ --disable-libschroedinger \ - --disable-libvo-aacenc \ --disable-libvo-amrwbenc \ --disable-symver \ --disable-doc
@@ -217,13 +216,6 @@ FFMPEG_CONF_OPTS += --disable-openssl endif endif -ifeq ($(BR2_PACKAGE_LIBDCADEC),y) -FFMPEG_CONF_OPTS += --enable-libdcadec -FFMPEG_DEPENDENCIES += libdcadec -else -FFMPEG_CONF_OPTS += --disable-libdcadec -endif - ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBEBUR128),yy) FFMPEG_DEPENDENCIES += libebur128 endif
@@ -445,14 +437,6 @@ else FFMPEG_CONF_OPTS += --enable-mipsfpu endif -ifeq ($(BR2_mips_32r2),y) -FFMPEG_CONF_OPTS += \ - --enable-mips32r2 -else -FFMPEG_CONF_OPTS += \ - --disable-mips32r2 -endif - ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) FFMPEG_CONF_OPTS += --enable-altivec else
Signature · 1 line
2.8.1
PATCH v5 2/6 package/ffmpeg: default to --cpu=generic for MIPS architecture
From: Vicente Olivert Riera <[email protected]>
This option is needed to prevent this message from configure:
WARNING: unknown CPU. Disabling all MIPS optimizations.
---
v5: no changes
v4: no changes
v3: no changes
v2: no changes
package/ffmpeg/ffmpeg.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/ffmpeg/ffmpeg.mk +5 -0
@@ -455,6 +455,11 @@ else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) endif +# Default to --cpu=generic for MIPS architecture +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +FFMPEG_CONF_OPTS += --cpu=generic +endif + FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) # Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
Signature · 1 line
2.8.1
PATCH v5 2/6 package/ffmpeg: default to --cpu=generic for MIPS architecture
Hello,
package/ffmpeg/ffmpeg.mk else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) · line 461
Quoted 12 lines · Bernd Kuhls
package/ffmpeg/ffmpeg.mk +4
-0@@ -455,6 +455,11 @@ else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) endif +# Default to --cpu=generic for MIPS architecture +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +FFMPEG_CONF_OPTS += --cpu=generic +endif
The conditionals above were already adding a --cpu option. Even though the last option probably wins, it isn't that nice, so I've changed the code to:
# Default to --cpu=generic for MIPS architecture, in order to avoid a
# warning from ffmpeg's configure script. ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) FFMPEG_CONF_OPTS += --cpu=generic else ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU) else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) endif
However, the configure script makes it pretty clear that not all BR2_GCC_TARGET_{CPU,ARCH} values might be valid, so maybe this is something we should revisit at some point.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v5 3/6 package/ffmpeg: re-enable for mips64r2 and mips64r6
In reply to Bernd Kuhlsffmpeg 3 fixed support for mips64r2 and mips64r6, for details see
http://patchwork.ozlabs.org/patch/626756/
---
v5: no changes
v4: no changes
v3: no changes
v2: no changes
package/ffmpeg/Config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/ffmpeg/Config.in +1 -2
@@ -1,8 +1,7 @@ config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS bool # fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 - # ffmpeg's configure script only supports mips64 (r1) variant - default y if !BR2_nios2 && !BR2_mips_64r2 && !BR2_mips_64r6 + default y if !BR2_nios2 menuconfig BR2_PACKAGE_FFMPEG bool "ffmpeg"
Signature · 1 line
2.8.1
Thomas Petazzoni
AppliedPATCH v5 3/6 package/ffmpeg: re-enable for mips64r2 and mips64r6
Hello,
Quoted 9 lines · Bernd Kuhls
ffmpeg 3 fixed support for mips64r2 and mips64r6, for details see
http://patchwork.ozlabs.org/patch/626756/Signed-off-by Bernd Kuhls <[email protected]>---
v5: no changes
v4: no changes
v3: no changes
v2: no changes
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 4/6 package/ffmpeg: add optional support for opencv
In reply to Bernd Kuhlsffmpeg only needs the imgproc module of opencv:
https://github.com/FFmpeg/FFmpeg/commit/15708f13477aaf2effdc0d7fc727507bc468335a
---
v5: no changes
v4: first release
package/ffmpeg/ffmpeg.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
package/ffmpeg/ffmpeg.mk +9 -1
@@ -48,7 +48,6 @@ FFMPEG_CONF_OPTS = \ --disable-frei0r \ --disable-libopencore-amrnb \ --disable-libopencore-amrwb \ - --disable-libopencv \ --disable-libcdio \ --disable-libdc1394 \ --disable-libfaac \
@@ -249,6 +248,15 @@ else FFMPEG_CONF_OPTS += --disable-vdpau endif +# To avoid a circular dependency only use opencv if opencv itself does +# not depend on ffmpeg. +ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx) +FFMPEG_CONF_OPTS += --enable-libopencv +FFMPEG_DEPENDENCIES += opencv +else +FFMPEG_CONF_OPTS += --disable-libopencv +endif + ifeq ($(BR2_PACKAGE_OPUS),y) FFMPEG_CONF_OPTS += --enable-libopus FFMPEG_DEPENDENCIES += opus
Signature · 1 line
2.8.1
PATCH v5 4/6 package/ffmpeg: add optional support for opencv
Hello,
Quoted 4 lines · Bernd Kuhls
ffmpeg only needs the imgproc module of opencv:
https://github.com/FFmpeg/FFmpeg/commit/15708f13477aaf2effdc0d7fc727507bc468335aSigned-off-by Bernd Kuhls <[email protected]>
Applied to next. However: what about opencv3 support?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v5 4/6 package/ffmpeg: add optional support for opencv
Am Fri, 26 Aug 2016 21:46:51 +0200 schrieb Thomas Petazzoni:
Quoted 9 lines
Hello,
Quoted 4 lines · Bernd Kuhls
ffmpeg only needs the imgproc module of opencv:
https://github.com/FFmpeg/FFmpeg/commit/15708f13477aaf2effdc0d7fc727507bc468335aSigned-off-by Bernd Kuhls <[email protected]>Applied to next. However: what about opencv3 support?
Hi Thomas,
according to ffmpeg/configure it only checks for opencv2:
Regards, Bernd
PATCH v5 5/6 package/tvheadend: remove compat patch for ffmpeg < 3.x
In reply to Bernd Kuhls---
v5: no changes
v4: no changes
v3: no changes
v2: no changes
...g-revert-minimum-required-version-numbers.patch | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 package/tvheadend/0002-ffmpeg-revert-minimum-required-version-numbers.patch
package/tvheadend/0002-ffmpeg-revert-minimum-required-version-numbers.patch deleted +0 -51
@@ -1,51 +0,0 @@ -From 78a7b7365a67fa2f5394c6b4ca39de01b00416dc Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <[email protected]> -Date: Sat, 2 Apr 2016 19:05:52 +0200 -Subject: [PATCH 1/1] ffmpeg: revert minimum required version numbers - -This commit reverts the minimum version numbers required by configure to -the values before -https://github.com/tvheadend/tvheadend/commit/1359effe28a0381b8c9cbd362d6e144fb87b00fc#diff-e2d5a00791bce9a01f99bc6fd613a39dL486 -in order to allow compilation with older versions of ffmpeg again. - -Please note that the previous version numbers of all ffmpeg libs, with -the exception of libavfilter, are those of ffmpeg 2.0.7: -https://ffmpeg.org/olddownload.html - -Therefore I synced the minimum version number required for libavfilter to -3.79.101 and not to 4.0.0 as previous in tvheadend's configure script. - -Signed-off-by: Bernd Kuhls <[email protected]> -[Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/838] ---- - configure | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/configure b/configure -index be3d2e2..2ffd280 100755 ---- a/configure -+++ b/configure -@@ -512,13 +512,13 @@ else - if enabled_or_auto libav; then - has_libav=true - -- check_pkg libavfilter ">=6.31.100" || has_libav=false -- check_pkg libswresample ">=2.0.101" || has_libav=false -- check_pkg libavresample ">=3.0.0" || has_libav=false -- check_pkg libswscale ">=4.0.100" || has_libav=false -- check_pkg libavformat ">=57.25.100" || has_libav=false -- check_pkg libavcodec ">=57.24.102" || has_libav=false -- check_pkg libavutil ">=55.17.103" || has_libav=false -+ check_pkg libavfilter ">=3.79.101" || has_libav=false -+ check_pkg libswresample ">=0.17.102" || has_libav=false -+ check_pkg libavresample ">=1.1.0" || has_libav=false -+ check_pkg libswscale ">=2.3.100" || has_libav=false -+ check_pkg libavformat ">=55.12.100" || has_libav=false -+ check_pkg libavcodec ">=55.18.102" || has_libav=false -+ check_pkg libavutil ">=52.38.100" || has_libav=false - - if $has_libav; then - enable libav --- -2.8.0.rc3 -
Signature · 1 line
2.8.1
Thomas Petazzoni
AppliedPATCH v5 5/6 package/tvheadend: remove compat patch for ffmpeg < 3.x
Hello,
Quoted 6 lines · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>---
v5: no changes
v4: no changes
v3: no changes
v2: no changes
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 6/6 package/vlc: add support for ffmpeg 3.0
In reply to Bernd Kuhls---
v5: first release
instead of bumping vlc to git master (no vlc 3.x release yet) we use a patch from deb-multimedia.org which provides the necessary changes for ffmpeg 3.x support to vlc 2.2, compile-tested using this defconfig:
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_FFMPEG=y
BR2_PACKAGE_FFMPEG_GPL=y
BR2_PACKAGE_FFMPEG_POSTPROC=y
BR2_PACKAGE_FFMPEG_SWSCALE=y
BR2_PACKAGE_VLC=y
This patch can be removed when vlc is bumped to 3.x.
package/vlc/0008-ffmpeg-3.0.patch | 283 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 package/vlc/0008-ffmpeg-3.0.patch
package/vlc/0008-ffmpeg-3.0.patch new file +283 -0
@@ -0,0 +1,283 @@ +Changes for ffmpeg 3.0 + +This file is a copy of debian/patches/04_ffmpeg-3.0.diff, to be found in +http://www.deb-multimedia.org/pool/main/v/vlc-dmo/vlc-dmo_2.2.4.orig.tar.gz + +Signed-off-by: Bernd Kuhls <[email protected]> + +--- a/configure.ac ++++ b/configure.ac +@@ -2324,7 +2324,7 @@ AC_ARG_ENABLE(avcodec, + AS_IF([test "${enable_avcodec}" != "no"], [ + PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [ + PKG_CHECK_EXISTS([libavutil < 55],, [ +- AC_MSG_ERROR([libavutil versions 55 and later are not supported.]) ++ AC_MSG_WARN([libavutil versions 55 and later are not supported.]) + ]) + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" +@@ -2334,7 +2334,7 @@ AS_IF([test "${enable_avcodec}" != "no"] + VLC_RESTORE_FLAGS + have_avcodec="yes" + ],[ +- AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.]) ++ AC_MSG_WARN([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.]) + ]) + ], [ + have_avcodec="no" +@@ -2383,7 +2383,7 @@ AS_IF([test "${have_vaapi}" = "yes" -a " + case "${avfork}" in + ffmpeg) + PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [ +- AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.]) ++ AC_MSG_WARN([VA API requires FFmpeg libavcodec < 57.10 or libav.]) + ]) + ;; + esac +@@ -2417,7 +2417,7 @@ AS_IF([test "${enable_dxva2}" != "no"], + case "${avfork}" in + ffmpeg) + PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [ +- AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.]) ++ AC_MSG_WARN([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.]) + ]) + ;; + esac +@@ -2509,7 +2509,7 @@ AS_IF([test "${enable_avformat}" != "no" + ]) + VLC_RESTORE_FLAGS + ],[ +- AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.]) ++ AC_MSG_WARN([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.]) + ]) + ]) + AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"]) +@@ -2538,7 +2538,7 @@ then + ]) + VLC_RESTORE_FLAGS + ],[ +- AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.]) ++ AC_MSG_WARN([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.]) + ]) + fi + +@@ -3181,7 +3181,7 @@ AS_IF([test "${have_vdpau}" = "yes" -a " + libav) av_vdpau_ver="55.26.0" ;; + ffmpeg) av_vdpau_ver="55.42.100" + PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [ +- AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.]) ++ AC_MSG_WARN([VDPAU requires FFmpeg libavcodec < 57.10 or libav.]) + ]) + ;; + esac +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -39,7 +39,7 @@ + #include <libavcodec/avcodec.h> + #include <libavutil/mem.h> + +-#include <libavutil/audioconvert.h> ++#include <libavutil/channel_layout.h> + + #include "avcodec.h" + +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC + static int ffmpeg_GetFrameBuf ( struct AVCodecContext *, AVFrame * ); + static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * ); + #endif +-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *, +- const enum PixelFormat * ); ++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *, ++ const enum AVPixelFormat * ); + + static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc ) + { +@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo + p_sys->p_codec = p_codec; + p_sys->i_codec_id = i_codec_id; + p_sys->psz_namecodec = psz_namecodec; +- p_sys->p_ff_pic = avcodec_alloc_frame(); ++ p_sys->p_ff_pic = av_frame_alloc(); + p_sys->b_delayed_open = true; + p_sys->p_va = NULL; + vlc_sem_init( &p_sys->sem_mt, 0 ); +@@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo + if( ffmpeg_OpenCodec( p_dec ) < 0 ) + { + msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec ); +- avcodec_free_frame( &p_sys->p_ff_pic ); ++ av_frame_free( &p_sys->p_ff_pic ); + vlc_sem_destroy( &p_sys->sem_mt ); + free( p_sys ); + return VLC_EGENERIC; +@@ -826,7 +826,7 @@ void EndVideoDec( decoder_t *p_dec ) + wait_mt( p_sys ); + + if( p_sys->p_ff_pic ) +- avcodec_free_frame( &p_sys->p_ff_pic ); ++ av_frame_free( &p_sys->p_ff_pic ); + + if( p_sys->p_va ) + vlc_va_Delete( p_sys->p_va ); +@@ -1313,8 +1313,8 @@ static void ffmpeg_ReleaseFrameBuf( stru + } + #endif + +-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, +- const enum PixelFormat *pi_fmt ) ++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, ++ const enum AVPixelFormat *pi_fmt ) + { + decoder_t *p_dec = p_context->opaque; + decoder_sys_t *p_sys = p_dec->p_sys; +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -41,7 +41,7 @@ + #include <vlc_cpu.h> + + #include <libavcodec/avcodec.h> +-#include <libavutil/audioconvert.h> ++#include <libavutil/channel_layout.h> + + #include "avcodec.h" + #include "avcommon.h" +@@ -311,7 +311,7 @@ int OpenEncoder( vlc_object_t *p_this ) + else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id, + &psz_namecodec ) ) + { +- if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE ) ++ if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE ) + return VLC_EGENERIC; /* handed chroma output */ + + i_cat = VIDEO_ES; +@@ -555,7 +555,7 @@ int OpenEncoder( vlc_object_t *p_this ) + + if( p_codec->pix_fmts ) + { +- const enum PixelFormat *p = p_codec->pix_fmts; ++ const enum AVPixelFormat *p = p_codec->pix_fmts; + for( ; *p != -1; p++ ) + { + if( *p == p_context->pix_fmt ) break; +@@ -1017,7 +1017,7 @@ errmsg: + } + } + +- p_sys->frame = avcodec_alloc_frame(); ++ p_sys->frame = av_frame_alloc(); + if( !p_sys->frame ) + { + goto error; +@@ -1048,7 +1048,7 @@ static void vlc_av_packet_Release(block_ + { + vlc_av_packet_t *b = (void *) block; + +- av_free_packet(&b->packet); ++ av_packet_unref(&b->packet); + free(b); + } + +@@ -1088,7 +1088,7 @@ static block_t *EncodeVideo( encoder_t * + AVFrame *frame = NULL; + if( likely(p_pict) ) { + frame = p_sys->frame; +- avcodec_get_frame_defaults( frame ); ++ av_frame_unref( frame ); + for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ ) + { + p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels; +@@ -1188,7 +1188,7 @@ static block_t *EncodeVideo( encoder_t * + av_pkt.duration / p_sys->p_context->time_base.den, p_sys->p_context ); + if( unlikely(p_block == NULL) ) + { +- av_free_packet( &av_pkt ); ++ av_packet_unref( &av_pkt ); + return NULL; + } + +@@ -1329,7 +1329,7 @@ static block_t *handle_delay_buffer( enc + //How much we need to copy from new packet + const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes; + +- avcodec_get_frame_defaults( p_sys->frame ); ++ av_frame_unref( p_sys->frame ); + p_sys->frame->format = p_sys->p_context->sample_fmt; + p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay; + +@@ -1451,7 +1451,7 @@ static block_t *EncodeAudio( encoder_t * + while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) || + ( p_sys->b_variable && p_aout_buf->i_nb_samples ) ) + { +- avcodec_get_frame_defaults( p_sys->frame ); ++ av_frame_unref( p_sys->frame ); + if( p_sys->b_variable ) + p_sys->frame->nb_samples = p_aout_buf->i_nb_samples; + else +@@ -1514,7 +1514,7 @@ void CloseEncoder( vlc_object_t *p_this + encoder_t *p_enc = (encoder_t *)p_this; + encoder_sys_t *p_sys = p_enc->p_sys; + +- /*FIXME: we should use avcodec_free_frame, but we don't require so new avcodec that has it*/ ++ /*FIXME: we should use av_frame_free, but we don't require so new avcodec that has it*/ + av_freep( &p_sys->frame ); + + vlc_avcodec_lock(); +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -734,14 +734,14 @@ static int Demux( demux_t *p_demux ) + } + if( pkt.stream_index < 0 || pkt.stream_index >= p_sys->i_tk ) + { +- av_free_packet( &pkt ); ++ av_packet_unref( &pkt ); + return 1; + } + const AVStream *p_stream = p_sys->ic->streams[pkt.stream_index]; + if( p_stream->time_base.den <= 0 ) + { + msg_Warn( p_demux, "Invalid time base for the stream %d", pkt.stream_index ); +- av_free_packet( &pkt ); ++ av_packet_unref( &pkt ); + return 1; + } + if( p_stream->codec->codec_id == AV_CODEC_ID_SSA ) +@@ -749,7 +749,7 @@ static int Demux( demux_t *p_demux ) + p_frame = BuildSsaFrame( &pkt, p_sys->i_ssa_order++ ); + if( !p_frame ) + { +- av_free_packet( &pkt ); ++ av_packet_unref( &pkt ); + return 1; + } + } +@@ -757,7 +757,7 @@ static int Demux( demux_t *p_demux ) + { + if( ( p_frame = block_Alloc( pkt.size ) ) == NULL ) + { +- av_free_packet( &pkt ); ++ av_packet_unref( &pkt ); + return 0; + } + memcpy( p_frame->p_buffer, pkt.data, pkt.size ); +@@ -838,7 +838,7 @@ static int Demux( demux_t *p_demux ) + else + block_Release( p_frame ); + +- av_free_packet( &pkt ); ++ av_packet_unref( &pkt ); + return 1; + } + +--- a/modules/codec/avcodec/vaapi.c ++++ b/modules/codec/avcodec/vaapi.c +@@ -595,7 +595,7 @@ static int Create( vlc_va_t *p_va, AVCod + return err; + + /* Only VLD supported */ +- p_va->pix_fmt = PIX_FMT_VAAPI_VLD; ++ p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD; + p_va->setup = Setup; + p_va->get = Get; + p_va->release = Release;
Signature · 1 line
2.8.1
PATCH v5 6/6 package/vlc: add support for ffmpeg 3.0
Hello,
Quoted 16 lines · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>---
v5: first release
instead of bumping vlc to git master (no vlc 3.x release yet) we use a patch from deb-multimedia.org which provides the necessary changes for ffmpeg 3.x support to vlc 2.2, compile-tested using this defconfig:BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_FFMPEG=y
BR2_PACKAGE_FFMPEG_GPL=y
BR2_PACKAGE_FFMPEG_POSTPROC=y
BR2_PACKAGE_FFMPEG_SWSCALE=y
BR2_PACKAGE_VLC=y
Quoted 1 line
This patch can be removed when vlc is bumped to 3.x.
Why is this very useful explanation below the "---" and the commit log empty? It's a bit sad to write such a useful explanation, and lose it when the patch is applied.
So I've moved this explanation up in the commit log, and applied to next. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH v5 1/6 package/ffmpeg: bump to version 3.1.2
In reply to Bernd KuhlsHello,
Quoted 16 lines · Bernd Kuhls
From: Vicente Olivert Riera <[email protected]>
- Remove non-existing configure options:
- --disable-mips32r2
- --disable-libvo-aacenc
- --enable-libdcadec(https://github.com/FFmpeg/FFmpeg/commit/e259dc86a80398d56d1aabcf6203f80616a4d04d)- Amend renamed configure options:
- --disable-mipsdspr1 has been renamed to --disable-mipsdspRemove all Kodi-related patches according to upstream repo:
https://github.com/xbmc/FFmpeg/commits/release/3.1-xbmcKodi now uses an unpatched ffmpeg.
Quoted 7 lines
Signed-off-by Vicente Olivert Riera <[email protected]>Signed-off-by Bernd Kuhls <[email protected]>---
v5: bump to version 3.1.2
v4: bump to version 3.1.1
v3: bump to version 3.0.2
v2: bump to version 3.0.1
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com