* [Buildroot] [PATCH v2 1/2] x264: new package
@ 2014-10-02 10:49 David du Colombier
2014-10-02 10:49 ` [Buildroot] [PATCH v2 2/2] ffmpeg: enable x264 support David du Colombier
2014-10-02 20:17 ` [Buildroot] [PATCH v2 1/2] x264: new package Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: David du Colombier @ 2014-10-02 10:49 UTC (permalink / raw)
To: buildroot
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
diff --git a/package/Config.in b/package/Config.in
index 2ad72bc..532dd11 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/x264/Config.in b/package/x264/Config.in
new file mode 100644
index 0000000..6ad2495
--- /dev/null
+++ b/package/x264/Config.in
@@ -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
diff --git a/package/x264/x264.mk b/package/x264/x264.mk
new file mode 100644
index 0000000..bdbb2c1
--- /dev/null
+++ b/package/x264/x264.mk
@@ -0,0 +1,45 @@
+###############################################################
+#
+# x264
+#
+###############################################################
+
+X264_VERSION = 20140930-2245-stable
+X264_SOURCE = x264-snapshot-$(X264_VERSION).tar.bz2
+X264_SITE = ftp://ftp.videolan.org/pub/videolan/x264/snapshots
+X264_LICENSE = GPLv2+
+X264_DEPENDENCIES = host-pkgconf
+X264_LICENSE_FILES = COPYING
+X264_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PREFER_STATIC_LIB),)
+X264_CONF_OPTS = --enable-pic --enable-shared
+endif
+
+# the configure script is not generated by autoconf
+define X264_CONFIGURE_CMDS
+ (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure \
+ --prefix=/usr \
+ --host="$(GNU_TARGET_NAME)" \
+ --cross-prefix="$(TARGET_CROSS)" \
+ --enable-strip \
+ --disable-ffms \
+ --disable-cli \
+ --enable-static \
+ $(X264_CONF_OPTS) \
+ )
+endef
+
+define X264_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define X264_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
+endef
+
+define X264_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
+endef
+
+$(eval $(generic-package))
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 2/2] ffmpeg: enable x264 support
2014-10-02 10:49 [Buildroot] [PATCH v2 1/2] x264: new package David du Colombier
@ 2014-10-02 10:49 ` David du Colombier
2014-10-02 20:17 ` [Buildroot] [PATCH v2 1/2] x264: new package Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: David du Colombier @ 2014-10-02 10:49 UTC (permalink / raw)
To: buildroot
---
package/ffmpeg/ffmpeg.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 5b7fa20..0185749 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -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
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 1/2] x264: new package
2014-10-02 10:49 [Buildroot] [PATCH v2 1/2] x264: new package David du Colombier
2014-10-02 10:49 ` [Buildroot] [PATCH v2 2/2] ffmpeg: enable x264 support David du Colombier
@ 2014-10-02 20:17 ` Peter Korsgaard
2014-10-03 8:53 ` David du Colombier
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2014-10-02 20:17 UTC (permalink / raw)
To: buildroot
>>>>> "David" == David du Colombier <0intro@gmail.com> 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
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 1/2] x264: new package
2014-10-02 20:17 ` [Buildroot] [PATCH v2 1/2] x264: new package Peter Korsgaard
@ 2014-10-03 8:53 ` David du Colombier
0 siblings, 0 replies; 4+ messages in thread
From: David du Colombier @ 2014-10-03 8:53 UTC (permalink / raw)
To: buildroot
Thanks for the review.
> If you build with a toolchain without BR2_LARGEFILE then:
Done.
The package now depends on BR2_LARGEFILE.
> - 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.
> - 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.
> - It would be good with an option to enable the cli interface
Done.
> - Stripping is done on a global level if needed, the individual packages
> shouldn't strip
Done.
I'll send a v3 of the patch.
--
David du Colombier
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-03 8:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02 10:49 [Buildroot] [PATCH v2 1/2] x264: new package David du Colombier
2014-10-02 10:49 ` [Buildroot] [PATCH v2 2/2] ffmpeg: enable x264 support David du Colombier
2014-10-02 20:17 ` [Buildroot] [PATCH v2 1/2] x264: new package Peter Korsgaard
2014-10-03 8:53 ` David du Colombier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.