From ae21d28d72b0dae5fbab878b9a064737bb1a3115 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 6 Oct 2017 23:22:51 +0300 Subject: [PATCH 1/2] ffmpeg: enable rpi-omx codecs where applicable --- package/ffmpeg/ffmpeg.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk index 7b98c2b001..98f4100504 100644 --- a/package/ffmpeg/ffmpeg.mk +++ b/package/ffmpeg/ffmpeg.mk @@ -26,7 +26,6 @@ FFMPEG_CONF_OPTS = \ --enable-avdevice \ --enable-avcodec \ --enable-avformat \ - --disable-x11grab \ --enable-network \ --disable-gray \ --enable-swscale-alpha \ @@ -39,7 +38,6 @@ FFMPEG_CONF_OPTS = \ --disable-dxva2 \ --enable-runtime-cpudetect \ --disable-hardcoded-tables \ - --disable-memalign-hack \ --disable-mipsdsp \ --disable-mipsdspr2 \ --disable-msa \ @@ -473,6 +471,11 @@ else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) endif +ifeq ($(BR2_PACKAGE_FFMPEG_RPI_HW_CODECS),y) +FFMPEG_DEPENDENCIES += rpi-userland +FFMPEG_CONF_OPTS += --enable-omx --enable-omx-rpi --enable-mmal --extra-cflags=-I../../staging/usr/include/IL/ +endif + FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) From 123846b8f5e1f3e86c641de9654230117043bd40 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 8 Oct 2017 16:18:15 +0300 Subject: [PATCH 2/2] ffmpeg: update to latest buildroot version --- board/common/overlay/etc/version | 2 +- package/ffmpeg/ffmpeg.mk | 44 ++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/board/common/overlay/etc/version b/board/common/overlay/etc/version index c120d3ab0a..b2ddc0852c 100644 --- a/board/common/overlay/etc/version +++ b/board/common/overlay/etc/version @@ -1,4 +1,4 @@ os_name="thingOS" os_short_name="thingos" os_prefix="thing" -os_version="20170218" +os_version="20171008" diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk index 98f4100504..801615c077 100644 --- a/package/ffmpeg/ffmpeg.mk +++ b/package/ffmpeg/ffmpeg.mk @@ -9,10 +9,10 @@ FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz FFMPEG_SITE = http://ffmpeg.org/releases FFMPEG_INSTALL_STAGING = YES -FFMPEG_LICENSE = LGPLv2.1+, libjpeg license +FFMPEG_LICENSE = LGPL-2.1+, libjpeg license FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1 ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) -FFMPEG_LICENSE += and GPLv2+ +FFMPEG_LICENSE += and GPL-2.0+ FFMPEG_LICENSE_FILES += COPYING.GPLv2 endif @@ -42,6 +42,9 @@ FFMPEG_CONF_OPTS = \ --disable-mipsdspr2 \ --disable-msa \ --enable-hwaccels \ + --disable-cuda \ + --disable-cuvid \ + --disable-nvenc \ --disable-avisynth \ --disable-frei0r \ --disable-libopencore-amrnb \ @@ -157,12 +160,18 @@ endif ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y) FFMPEG_CONF_OPTS += --enable-indevs +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +FFMPEG_DEPENDENCIES += alsa-lib +endif else FFMPEG_CONF_OPTS += --disable-indevs endif ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y) FFMPEG_CONF_OPTS += --enable-outdevs +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +FFMPEG_DEPENDENCIES += alsa-lib +endif else FFMPEG_CONF_OPTS += --disable-outdevs endif @@ -245,6 +254,14 @@ else FFMPEG_CONF_OPTS += --disable-vdpau endif +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE)$(BR2_PACKAGE_RPI_USERLAND),yy) +FFMPEG_CONF_OPTS += --enable-mmal --enable-omx --enable-omx-rpi \ + --extra-cflags=-I$(STAGING_DIR)/usr/include/IL +FFMPEG_DEPENDENCIES += rpi-firmware rpi-userland +else +FFMPEG_CONF_OPTS += --disable-mmal --disable-omx --disable-omx-rpi +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) @@ -362,11 +379,6 @@ ifeq ($(BR2_X86_CPU_HAS_MMX),y) FFMPEG_CONF_OPTS += --enable-yasm FFMPEG_DEPENDENCIES += host-yasm else -ifeq ($(BR2_x86_i586),y) -# Needed to work around a bug with gcc 5.x: -# error: 'asm' operand has impossible constraints -FFMPEG_CONF_OPTS += --disable-inline-asm -endif FFMPEG_CONF_OPTS += --disable-yasm FFMPEG_CONF_OPTS += --disable-mmx endif @@ -437,6 +449,8 @@ FFMPEG_CONF_OPTS += --disable-vfp endif ifeq ($(BR2_ARM_CPU_HAS_NEON),y) FFMPEG_CONF_OPTS += --enable-neon +else ifeq ($(BR2_aarch64),y) +FFMPEG_CONF_OPTS += --enable-neon else FFMPEG_CONF_OPTS += --disable-neon endif @@ -455,6 +469,11 @@ else FFMPEG_CONF_OPTS += --disable-altivec endif +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +FFMPEG_CONF_OPTS += --extra-libs=-latomic +endif + ifeq ($(BR2_STATIC_LIBS),) FFMPEG_CONF_OPTS += --enable-pic else @@ -471,12 +490,6 @@ else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) endif -ifeq ($(BR2_PACKAGE_FFMPEG_RPI_HW_CODECS),y) -FFMPEG_DEPENDENCIES += rpi-userland -FFMPEG_CONF_OPTS += --enable-omx --enable-omx-rpi --enable-mmal --extra-cflags=-I../../staging/usr/include/IL/ -endif - - FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) # Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others @@ -499,4 +512,9 @@ define FFMPEG_CONFIGURE_CMDS ) endef +define FFMPEG_REMOVE_EXAMPLE_SRC_FILES + rm -rf $(TARGET_DIR)/usr/share/ffmpeg/examples +endef +FFMPEG_POST_INSTALL_TARGET_HOOKS += FFMPEG_REMOVE_EXAMPLE_SRC_FILES + $(eval $(autotools-package))