Skip to contentSkip to conversation

package/ffmpeg: bump version to 2.6

PATCH Superseded Bernd Kuhls 2 participants 8 messages Mar 15, 2015 – Mar 23, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 package/ffmpeg: bump version to 2.6

Dump two Kodi-specific patches according to
https://github.com/xbmc/xbmc/pull/6636
and update two new patches to improve hevc handling with Kodi Isengard.

---
v2: updated hash (Baruch)

 package/ffmpeg/0002-asf-hacks.patch                |   42 -------
 ...add-public-version-of-ff_read_frame_flush.patch |   54 --------
 package/ffmpeg/0013-fix-ff-thread-get-format.patch |  131 ++++++++++++++++++++
 .../ffmpeg/0014-hevc-avoid-unnecessary-calls.patch |   69 +++++++++++
 package/ffmpeg/ffmpeg.hash                         |    2 +-
 package/ffmpeg/ffmpeg.mk                           |    2 +-
 6 files changed, 202 insertions(+), 98 deletions(-)
 delete mode 100644 package/ffmpeg/0002-asf-hacks.patch
 delete mode 100644 package/ffmpeg/0013-add-public-version-of-ff_read_frame_flush.patch
 create mode 100644 package/ffmpeg/0013-fix-ff-thread-get-format.patch
 create mode 100644 package/ffmpeg/0014-hevc-avoid-unnecessary-calls.patch
package/ffmpeg/0002-asf-hacks.patch deleted +0 -42
deleted file mode 100644
index d0fbb2e..0000000
@@ -1,42 +0,0 @@
-From fbd0b8b0239d3786b941adc89322b8e49e4c768e Mon Sep 17 00:00:00 2001
-From: Joakim Plate <[email protected]>
-Date: Mon, 12 Sep 2011 21:37:17 +0200
-Subject: [PATCH 02/13] asf hacks
-
-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/asfdec.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
-index 7f7bb4d..8911987 100644
---- a/libavformat/asfdec.c
-+++ b/libavformat/asfdec.c
-@@ -1549,9 +1549,20 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
-     AVStream *st    = s->streams[stream_index];
-     int ret = 0;
- 
-+    if (pts == 0) {
-+      // this is a hack since av_gen_search searches the entire file in this case
-+      av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", s->data_offset);
-+      if (avio_seek(s->pb, s->data_offset, SEEK_SET) < 0)
-+          return -1;
-+      return 0;
-+    }
-+
-     if (s->packet_size <= 0)
-         return -1;
- 
-+    if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
-+        return -1;
-+
-     /* Try using the protocol's read_seek if available */
-     if (s->pb) {
-         int ret = avio_seek_time(s->pb, stream_index, pts, flags);
--- 
-2.1.0
-
package/ffmpeg/0013-add-public-version-of-ff_read_frame_flush.patch deleted +0 -54

54 lines not on this page · raw message

package/ffmpeg/0013-fix-ff-thread-get-format.patch new file +131 -0

131 lines not on this page · raw message

package/ffmpeg/0014-hevc-avoid-unnecessary-calls.patch new file +69 -0

69 lines not on this page · raw message

package/ffmpeg/ffmpeg.hash +1 -1
index c39174f..237d497 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256  cc91c166c2b0ad9aacc533e4d5637912df583b43834c68aeec12ded7e082a286  ffmpeg-2.5.4.tar.bz2
+sha256	23c38ecc0dd6cae5e9a3c5c2c967b10480dc4f7159d094ade13b0775d1fd4791	ffmpeg-2.6.tar.bz2
package/ffmpeg/ffmpeg.mk +1 -1
index 68a28a2..419808b 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FFMPEG_VERSION = 2.5.4
+FFMPEG_VERSION = 2.6
 FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2
 FFMPEG_SITE = http://ffmpeg.org/releases
 FFMPEG_INSTALL_STAGING = YES
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 2/3 package/mesa3d: bump version to 10.5.1

Dropped several dependencies because the "distribution tarball has been renamed and now contains all the generated sources."
http://lists.freedesktop.org/archives/mesa-announce/2015-March/000145.html

---
v2: updated hash (Baruch), added note about dependency changes (Thomas)

 .../0002-Fix-runtime-error-with-uClibc.patch       |   58 ++++++++++++++++++++
 package/mesa3d/mesa3d.hash                         |    4 +-
 package/mesa3d/mesa3d.mk                           |   12 ++--
 3 files changed, 65 insertions(+), 9 deletions(-)
 create mode 100644 package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch
package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch new file +58 -0
new file mode 100644
index 0000000..6fca65f
@@ -0,0 +1,58 @@
+Fix runtime error with uClibc
+
+Patch sent upstream:
+http://lists.freedesktop.org/archives/mesa-dev/2015-March/079431.html
+
+
+From b1dae3cae9df36d9c4f64c342cfe7c106e34ec72 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sun, 15 Mar 2015 12:23:26 +0100
+Subject: [PATCH 1/1] Fix runtime error with uClibc
+
+Patch inspired by
+https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
+http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
+
+Starting an app using mesa3d 10.5.x, Kodi for example, fails:
+
+/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
+libGL error: unable to load driver: i965_dri.so
+libGL error: driver pointer missing
+libGL error: failed to load driver: i965
+libGL error: unable to load driver: swrast_dri.so
+libGL error: failed to load driver: swrast
+
+Here is some background information about the fminf/fmaxf situation in uClibc:
+http://thread.gmane.org/gmane.comp.lib.uclibc.general/24189
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/glsl/nir/nir_constant_expressions.py |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
+index 22bc4f0..139c25a 100644
+--- a/src/glsl/nir/nir_constant_expressions.py
++++ b/src/glsl/nir/nir_constant_expressions.py
+@@ -50,6 +50,18 @@ static double copysign(double x, double y)
+ }
+ #endif
+ 
++#ifdef __UCLIBC__
++float fmaxf(float a, float b)
++{
++	return (a > b) ? a : b;
++}
++
++float fminf(float a, float b)
++{
++	return (a < b) ? a : b;
++}
++#endif
++
+ /**
+  * Evaluate one component of packSnorm4x8.
+  */
+-- 
+1.7.10.4
+
package/mesa3d/mesa3d.hash +2 -2
index 9d193dc..f562469 100644
@@ -1,2 +1,2 @@
-# From http://lists.freedesktop.org/archives/mesa-announce/2015-March/000144.html
-sha256	d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735	MesaLib-10.4.6.tar.bz2
+# From http://lists.freedesktop.org/archives/mesa-announce/2015-March/000146.html
+sha256	ffc51943d15c6812ee7611d053d8980a683fbd6a4986cff567b12cc66637d679	mesa-10.5.1.tar.xz
package/mesa3d/mesa3d.mk +5 -7
index 811a1ef..23cc331 100644
@@ -5,8 +5,8 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 10.4.6
-MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
+MESA3D_VERSION = 10.5.1
+MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
 MESA3D_LICENSE = MIT, SGI, Khronos
 MESA3D_LICENSE_FILES = docs/license.html
@@ -18,11 +18,8 @@ MESA3D_PROVIDES =
 
 MESA3D_DEPENDENCIES = \
 	expat \
-	host-bison \
-	host-flex \
 	host-gettext \
-	host-python \
-	host-xutil_makedepend \
+	host-python-mako \
 	libdrm
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
@@ -35,7 +32,7 @@ MESA3D_DEPENDENCIES += \
 	xlib_libXdamage \
 	xlib_libXfixes \
 	libxcb
-MESA3D_CONF_OPTS += --enable-glx
+MESA3D_CONF_OPTS += --enable-glx --disable-mangling
 # quote from mesa3d configure "Building xa requires@least one non swrast gallium driver."
 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
 MESA3D_CONF_OPTS += --enable-xa
@@ -92,6 +89,7 @@ MESA3D_PROVIDES += libgl
 MESA3D_CONF_OPTS += \
 	--enable-dri \
 	--enable-shared-glapi \
+	--enable-driglx-direct \
 	--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
 endif
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/3 package/mesa3d: bump version to 10.5.1

Dear Bernd Kuhls,

Quoted 7 lines · Bernd Kuhls

Dropped several dependencies because the "distribution tarball has been renamed and now contains all the generated sources."
http://lists.freedesktop.org/archives/mesa-announce/2015-March/000145.html

---
v2: updated hash (Baruch), added note about dependency changes (Thomas)

Thanks for the additional explanation, makes a lot more sense now. I've applied your patch. I however have a comment:

Quoted 2 lines

++#ifdef __UCLIBC__
++float fmaxf(float a, float b)

This is really a crappy solution. I know we use it in various places, but it simply does not work properly: if a new version of uClibc is released with an implementation of fmaxf(), then __UCLIBC__ will still be true, but we'll have a duplicated implementation of fmaxf().

http://autobuild.buildroot.org/results/6f6/6f62dffec0e299a36755184338524e107a932b16/build-end.log
is an excellent demonstration of why using __UCLIBC__ is bad. This build failure is caused by the patch package/freerdp/0001-add-support-for-uclibc.patch, wihch just like yours adds replacement function if __UCLIBC__ is defined.

Now, enters uClibc-ng, which does implement eventfd_read() and eventfd_write(), and bang, it fails.

Solution: use a proper autoconf test to see if fmax() is available or not, or provide an alternate implementation only if it's not already provided.

Since we're doing this __UCLIBC__ trick in lots of places, I've nonetheless applied your patch, but it'd be good to use proper solutions in the future.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/3 package/mesa3d: bump version to 10.5.1

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150317233027.1aee93ce at free-electrons.com:

Quoted 10 lines

Thanks for the additional explanation, makes a lot more sense now. I've applied your patch. I however have a comment:

Quoted 2 lines

++#ifdef __UCLIBC__
++float fmaxf(float a, float b)

This is really a crappy solution. I know we use it in various places, but it simply does not work properly: if a new version of uClibc is released with an implementation of fmaxf(), then __UCLIBC__ will still be true, but we'll have a duplicated implementation of fmaxf().

Hi,

uclibc added fmaxf upstream: http://git.uclibc.org/uClibc/commit/?id=
6c4538905e65ceb203f59aaa9a61728e81c6bc0a

mesa3d/0002-Fix-runtime-error-with-uClibc.patch can be removed when the forementioned patch is used in buildroot, a local run-time test was positive. Let?s hope uclibc will make a new release soon ;)

Regards, Bernd

#4 lore raw

PATCH v2 2/3 package/mesa3d: bump version to 10.5.1

In reply to Bernd Kuhls

Dear Bernd Kuhls,

package/mesa3d/mesa3d.mk MESA3D_PROVIDES = · line 22

Quoted 8 lines · Bernd Kuhls

MESA3D_DEPENDENCIES = \

package/mesa3d/mesa3d.mk +1 -4
 	expat \
-	host-bison \
-	host-flex \
 	host-gettext \
-	host-python \
-	host-xutil_makedepend \
+	host-python-mako \

This is apparently not working well in some cases, see
http://autobuild.buildroot.net/results/1ce/1ce2509c8abb7483397c7d0f21c299095e94a254/.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v2 2/3 package/mesa3d: bump version to 10.5.1

[posted and mailed]

Thomas Petazzoni <[email protected]> wrote in news:20150321095905.0e24d32c at free-electrons.com:

Quoted 3 lines

This is apparently not working well in some cases, see
http://autobuild.buildroot.net/results/1ce/1ce2509c8abb7483397c7d0f21c299
095e94a254/.

Hi Thomas,

this seems to be a python2 <-> python3 problem:

$ grep -i "ge_python \|ge_python3=" .config
# BR2_PACKAGE_PYTHON is not set
BR2_PACKAGE_PYTHON3=y

host-python is compiled as

$ ls -la output/build/ | grep host-py
drwxr-xr-x 17 fli4l fli4l  4096 M?r 21 10:48 host-python3-3.4.2
drwxr-xr-x  9 fli4l fli4l  4096 M?r 21 10:48 host-python-mako-1.0.1

but mesa3d checks for python2 first which picks up /usr/bin/python on my machine

$ grep PYTHON2 output/build/mesa3d-10.5.1/config.log
ac_cv_prog_PYTHON2=python2
PYTHON2='python2'

due to "AC_CHECK_PROGS([PYTHON2], [python2 python])" in mesa3d/configure.ac

Adding

MESA3D_CONF_ENV += ac_cv_prog_PYTHON2=$(HOST_DIR)/usr/bin/python

to mesa3d.mk forcing the usage of host-python3 does not help either:

checking if module mako in python is installed... Traceback (most recent call last):
File "<stdin>", line 10, in <module>
TypeError: unorderable types: map() > map()
configure: error: mako 0.3.4 or later is required.
make: *** [/home/fli4l/br3/output/build/mesa3d-10.5.1/.stamp_configured] Fehler 1

Please note that mesa3d does not need the target version of python, only host-python 2.x.

Is it possible to compile host-python2 parallel to host-python3 or should I add a "depends on !BR2_PACKAGE_PYTHON3" to mesa3d/Config.in?

Regards, Bernd

#6 lore raw

PATCH v2 3/3 package/mesa3d-headers: bump version to 10.5.1

In reply to Bernd Kuhls

---
v2: no changes

 package/mesa3d-headers/mesa3d-headers.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/mesa3d-headers/mesa3d-headers.mk +2 -2
index 5e113ce..0708a0f 100644
@@ -12,8 +12,8 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 10.4.6
-MESA3D_HEADERS_SOURCE = MesaLib-$(MESA3D_HEADERS_VERSION).tar.bz2
+MESA3D_HEADERS_VERSION = 10.5.1
+MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
 MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION)
 MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
 MESA3D_HEADERS_LICENSE_FILES = docs/license.html
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v2 3/3 package/mesa3d-headers: bump version to 10.5.1

Dear Bernd Kuhls,

Quoted 2 lines · Bernd Kuhls

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com