Skip to contentSkip to conversation

x264: new package

PATCH New David du Colombier 3 participants 6 messages Oct 5, 2014 – Oct 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 x264: new package

This package is based on an earlier package
proposed by Ayaka in December 2013.

---
Changes v3 -> v4:
- suggestions by Thomas Petazzoni
- explicitly depend on yasm on x86

Changes v2 -> v3:
- suggestions by Peter Korsgaard

Changes v1 -> v2:
- suggestions by Thomas Petazzoni

---
 package/Config.in                                  |  1 +
 .../0001-arm-do-not-append-CFLAGS-to-ASFLAGS.patch | 34 +++++++++++++
 package/x264/Config.in                             | 23 +++++++++
 package/x264/x264.mk                               | 57 ++++++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 package/x264/0001-arm-do-not-append-CFLAGS-to-ASFLAGS.patch
 create mode 100644 package/x264/Config.in
 create mode 100644 package/x264/x264.mk
package/Config.in +1 -0
index f488728..686d10d 100644
@@ -756,6 +756,7 @@ menu "Multimedia"
 	source "package/libtheora/Config.in"
 	source "package/live555/Config.in"
 	source "package/mediastreamer/Config.in"
+	source "package/x264/Config.in"
 endmenu
 
 menu "Networking"
package/x264/0001-arm-do-not-append-CFLAGS-to-ASFLAGS.patch new file +34 -0
new file mode 100644
index 0000000..3d40507
@@ -0,0 +1,34 @@
+From 716ee56d0b35e512e8e0ae1a3e71f26e65e86be3 Mon Sep 17 00:00:00 2001
+From: Janne Grunau <[email protected]>
+Date: Sun, 20 Jul 2014 12:55:53 +0200
+Subject: [PATCH 01/24] arm: do not append CFLAGS to ASFLAGS
+
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 0a4cb94..a50f8d5 100755
+--- a/configure
++++ b/configure
+@@ -296,7 +296,7 @@ opencl="yes"
+ CFLAGS="$CFLAGS -Wall -I. -I\$(SRCPATH)"
+ LDFLAGS="$LDFLAGS"
+ LDFLAGSCLI="$LDFLAGSCLI"
+-ASFLAGS="$ASFLAGS"
++ASFLAGS="$ASFLAGS -I. -I\$(SRCPATH)"
+ RCFLAGS="$RCFLAGS"
+ HAVE_GETOPT_LONG=1
+ cross_prefix=""
+@@ -752,7 +752,7 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
+     if  cc_check '' '' '__asm__("rev ip, ip");' ; then      define HAVE_ARMV6
+         cc_check '' '' '__asm__("movt r0, #0");'         && define HAVE_ARMV6T2
+         cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
+-        ASFLAGS="$ASFLAGS $CFLAGS -c"
++        ASFLAGS="$ASFLAGS -c"
+     else
+         echo "You specified a pre-ARMv6 or Thumb-1 CPU in your CFLAGS."
+         echo "If you really want to run on such a CPU, configure with --disable-asm."
+-- 
+1.8.3.1
+
package/x264/Config.in new file +23 -0
new file mode 100644
index 0000000..5e614b5
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_X264
+	bool "x264"
+	depends on BR2_LARGEFILE
+	help
+	  x264 is a free software library and application for
+	  encoding video streams into the H.264/MPEG-4 AVC
+	  compression format, and is released under the terms
+	  of the GNU GPL.
+
+	  https://www.videolan.org/developers/x264.html
+
+if BR2_PACKAGE_X264
+
+config BR2_PACKAGE_X264_CLI
+	bool "CLI"
+	help
+	  Command-line tool to encode video streams into the
+	  H.264/MPEG-4 AVC compression format.
+
+endif
+
+comment "x264 needs a toolchain w/ largefile"
+	depends on !BR2_LARGEFILE
package/x264/x264.mk new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v4 2/2 ffmpeg: enable x264 support

---
Changes v1 -> v4:
- s/FFMPEG_CONF_OPT/FFMPEG_CONF_OPTS/

---
 package/ffmpeg/ffmpeg.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/ffmpeg/ffmpeg.mk +7 -0
index 41b06a7..6b5711c 100644
@@ -229,6 +229,13 @@ else
 FFMPEG_CONF_OPTS += --disable-libvpx
 endif
 
+ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy)
+FFMPEG_CONF_OPTS += --enable-libx264
+FFMPEG_DEPENDENCIES += x264
+else
+FFMPEG_CONF_OPTS += --disable-libx264
+endif
+
 ifeq ($(BR2_X86_CPU_HAS_MMX),y)
 FFMPEG_CONF_OPTS += --enable-yasm
 FFMPEG_DEPENDENCIES += host-yasm
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH v4 1/2 x264: new package

In reply to David du Colombier
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"David" == David du Colombier <[email protected]> writes:

This package is based on an earlier package
proposed by Ayaka in December 2013.

---
Changes v3 -> v4:
- suggestions by Thomas Petazzoni
- explicitly depend on yasm on x86

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v4 1/2 x264: new package

In reply to David du Colombier

Dear David du Colombier,

package/x264/x264.mk line 19

Quoted 5 lines · David du Colombier
package/x264/x264.mk new file +5 -0
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+	FFMPEG_DEPENDENCIES += host-yasm
+else
+	X264_CONF_OPTS += --disable-asm
+endif

Well, I still believe this is suboptimal since there is some assembly code for ARM that is available, but only for ARMv6+. But oh well, it can always be implemented as a followup improvement.

Thanks,

Thomas

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

PATCH v4 1/2 x264: new package

Quoted 3 lines

Well, I still believe this is suboptimal since there is some assembly code for ARM that is available, but only for ARMv6+. But oh well, it can always be implemented as a followup improvement.

Yes, I finally enabled assembly files on ARMv7 platforms.

It seems the ARMv6 processors (ARM1136JF-S, ARM1176JZ-S and ARM1176JZF-S) are not supported:

common/arm/pixel-a.S:1281: Error: selected processor does not support ARM mode movw ip,#:lower16:235963' common/arm/pixel-a.S:1281: Error: selected processor does not support ARM mode movt ip,#:upper16:235963'

I'll send a patch soon.

Signature · 1 line
David du Colombier