Skip to contentSkip to conversation

x264: new package

PATCH Superseded David du Colombier 2 participants 4 messages Oct 2, 2014 – Oct 3, 2014

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 x264: new package

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

---
 package/Config.in      |  1 +
 package/x264/Config.in |  9 +++++++++
 package/x264/x264.mk   | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+)
 create mode 100644 package/x264/Config.in
 create mode 100644 package/x264/x264.mk
package/Config.in +1 -0
index 2ad72bc..532dd11 100644
@@ -755,6 +755,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/Config.in new file +9 -0
new file mode 100644
index 0000000..6ad2495
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_X264
+	bool "x264"
+	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
package/x264/x264.mk new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
1.9.3
#1 lore raw

PATCH v2 2/2 ffmpeg: enable x264 support

---
 package/ffmpeg/ffmpeg.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/ffmpeg/ffmpeg.mk +7 -0
index 5b7fa20..0185749 100644
@@ -229,6 +229,13 @@ else
 FFMPEG_CONF_OPT += --disable-libvpx
 endif
 
+ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy)
+FFMPEG_CONF_OPT += --enable-libx264
+FFMPEG_DEPENDENCIES += x264
+else
+FFMPEG_CONF_OPT += --disable-libx264
+endif
+
 ifeq ($(BR2_X86_CPU_HAS_MMX),y)
 FFMPEG_CONF_OPT += --enable-yasm
 FFMPEG_DEPENDENCIES += host-yasm
Signature · 1 line
1.9.3
#2 lore raw

PATCH v2 1/2 x264: new package

In reply to David du Colombier
Quoted 4 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.

Thanks! There still seems to be some issues though:

If you build with a toolchain without BR2_LARGEFILE then:

In file included from /home/peko/source/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/stdio.h:72:0,

                 from ./common/osdep.h:33,
                 from ./common/common.h:117,
                 from ./encoder/lookahead.c:39:

/home/peko/source/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_stdio.h:61:2: error: #error Sorry... uClibc was built without large file support!

And with one with:
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-as -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -Wall -I. -I. -std=gnu99 -mcpu=cortex-a8 -mfpu=neon -c -DSTACK_ALIGNMENT=16 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S /home/peko/source/buildroot/output/host/usr/bin/arm-linux-as: unrecognized option '-_LARGEFILE_SOURCE'
Makefile:182: recipe for target 'common/arm/cpu-a.o' failed
make[1]: *** [common/arm/cpu-a.o] Error 1

From the configure output I see:

- Platform specific / ASM, so there probably needs to be some architecture dependencies

- I see a reference to threads, so it needs to depend on BR2_TOOLCHAIN_HAS_THREADS

- It would be good with an option to enable the cli interface

- Stripping is done on a global level if needed, the individual packages shouldn't strip

platform:      ARM
system:        LINUX
cli:           no
libx264:       internal
shared:        yes
static:        yes
asm:           yes
interlaced:    yes
avs:           avxsynth
lavf:          no
ffms:          no
mp4:           no
gpl:           yes
thread:        posix
opencl:        yes
filters:       crop select_every 
debug:         no
gprof:         no
strip:         yes
PIC:           yes
bit depth:     8
chroma format: all
Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 1/2 x264: new package

Thanks for the review.

Quoted 1 line

If you build with a toolchain without BR2_LARGEFILE then:

Done.
The package now depends on BR2_LARGEFILE.

Quoted 2 lines

- Platform specific / ASM, so there probably needs to be some architecture dependencies

Done.
Now, the "--disable-asm" option is set only when the target isn't one of arm/powerpc/x86.

Quoted 2 lines

- I see a reference to threads, so it needs to depend on BR2_TOOLCHAIN_HAS_THREADS

Done.
Alternatively, I chose to set the "--disable-thread" option when the toolchain has been built without thread support.

Quoted 1 line

- It would be good with an option to enable the cli interface

Done.

Quoted 2 lines

- Stripping is done on a global level if needed, the individual packages shouldn't strip

Done.

I'll send a v3 of the patch.

Signature · 1 line
David du Colombier