Skip to content

Commit

Permalink
Merge pull request openwrt#5048 from diizzyy/patch-104
Browse files Browse the repository at this point in the history
sound/lame: Add optional experimental optimization
  • Loading branch information
thess authored Nov 1, 2017
2 parents bcb8c71 + 28aa5e1 commit 20a576a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sound/lame/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
menu "Configuration"
depends on PACKAGE_lame-lib

config LAME-LIB_OPTIMIZE_SPEED
bool "Optimize for speed"
default n
help
This enables additional experimental
optmization and increases performance
considerably at the expense of binary size.

endmenu
11 changes: 11 additions & 0 deletions sound/lame/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ PKG_MAINTAINER:=Ted Hess <[email protected]>
PKG_LICENSE:=LGPL-2.0
PKG_LICENSE_FILES:=COPYING LICENSE

PKG_CONFIG_DEPENDS:= CONFIG_LAME-LIB_OPTIMIZE_SPEED

include $(INCLUDE_DIR)/package.mk

PKG_INSTALL=1
Expand All @@ -43,6 +45,10 @@ define Package/lame/description
lame mp3 encoder
endef

define Package/lame-lib/config
source "$(SOURCE)/Config.in"
endef

define Package/lame-lib
$(call Package/lame/Default)
TITLE:=lame-lib
Expand All @@ -56,6 +62,11 @@ ifeq ($(ARCH),i386)
TARGET_CFLAGS+=-msse
endif

ifeq ($(CONFIG_LAME-LIB_OPTIMIZE_SPEED),y)
TARGET_CFLAGS += $(TARGET_CFLAGS) -O3 -fomit-frame-pointer -ffast-math -fschedule-insns2
TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS))
endif

CONFIGURE_ARGS += --disable-gtktest --disable-static

define Package/lame/install
Expand Down

0 comments on commit 20a576a

Please sign in to comment.