ffmpeg: disable x86 asm for old CPU types
authorRosen Penev <rosenp@gmail.com>
Sun, 16 Feb 2020 06:24:21 +0000 (22:24 -0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 17 Feb 2020 03:33:08 +0000 (19:33 -0800)
This is a workaround for NASM being totally broken.

I have two patches, one for master and another for 19.07 that upstream is
not merging.

https://patchwork.ozlabs.org/patch/1221696/
https://patchwork.ozlabs.org/patch/1221697/

Signed-off-by: Rosen Penev <rosenp@gmail.com>
multimedia/ffmpeg/Config.in
multimedia/ffmpeg/Makefile

index 766a4b7fad2a5ea513eef4bd373b6994ad85b018..3a405c34ed117679333bcf00161b051c82ffce18 100644 (file)
@@ -1,3 +1,11 @@
+config FFMPEG_X86ASM
+       bool "Compile x86 ASM"
+       depends on (x86_64 || (i386 && !(TARGET_x86_geode || TARGET_x86_legacy)))
+       help
+               This compiles ffmpeg with x86 assembly optimizations. This option is needed as NASM is
+               totally broken with CPU_TYPE=pentium.
+       default y
+
 if PACKAGE_libffmpeg-custom
 
 comment "Build Licensing"
index 296515a1fa5d4320e47a33ecfe3aa50ed1acb295..16bbb343bb61b191443e87bdb3ad89a071a38eef 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
 PKG_VERSION:=3.4.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://ffmpeg.org/releases/
@@ -482,13 +482,11 @@ ifeq ($(ARCH),x86_64)
        FFMPEG_CONFIGURE+= --enable-lto
 endif
 
-ifneq ($(CONFIG_TARGET_x86),)
-ifeq ($(CONFIG_NASM),y)
+ifeq ($(CONFIG_FFMPEG_X86ASM),y)
   FFMPEG_CONFIGURE += --enable-x86asm
 else
   FFMPEG_CONFIGURE += --disable-x86asm
 endif
-endif
 
 ifeq ($(BUILD_VARIANT),full)