From patchwork Fri Jul 13 14:28:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 170904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B5D732C0363 for ; Sat, 14 Jul 2012 00:37:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 43B84A052B; Fri, 13 Jul 2012 14:37:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8V9Xcbmsa3B8; Fri, 13 Jul 2012 14:37:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3BE4FA00C1; Fri, 13 Jul 2012 14:37:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F258E8F753 for ; Fri, 13 Jul 2012 14:37:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DF1708160C for ; Fri, 13 Jul 2012 14:37:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkRYXffOVQDk for ; Fri, 13 Jul 2012 14:37:24 +0000 (UTC) X-Greylist: delayed 00:08:02 by SQLgrey-1.7.6 Received: from zose-mta15.web4all.fr (zose-mta15.web4all.fr [176.31.217.11]) by whitealder.osuosl.org (Postfix) with ESMTP id DFF6D81609 for ; Fri, 13 Jul 2012 14:37:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zose-mta15.web4all.fr (Postfix) with ESMTP id 476302C386 for ; Fri, 13 Jul 2012 16:34:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose1.web4all.fr Received: from zose-mta15.web4all.fr ([127.0.0.1]) by localhost (zose-mta15.web4all.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id itF8bDGuUFqv for ; Fri, 13 Jul 2012 16:34:10 +0200 (CEST) Received: from zose-store12.web4all.fr (zose-store-12.w4a.fr [178.33.204.48]) by zose-mta15.web4all.fr (Postfix) with ESMTP id B81A62C328 for ; Fri, 13 Jul 2012 16:34:10 +0200 (CEST) Date: Fri, 13 Jul 2012 16:28:33 +0200 (CEST) From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= To: buildroot@busybox.net Message-ID: <1655432189.1326270.1342189713400.JavaMail.root@advansee.com> In-Reply-To: <702722447.1326180.1342189637611.JavaMail.root@advansee.com> MIME-Version: 1.0 X-Originating-IP: [88.188.188.98] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Win)/7.2.0_GA_2669) Subject: [Buildroot] [PATCH] libmad: Add optimization config options X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Configuring libmad with --enable-speed compromises accuracy and can cause audio clipping in some cases (heard on ARM platform with some loud MP3s), so give users the choice of MAD optimizations. The default config corresponds to the default behavior of libmad's configure. Signed-off-by: Benoît Thébaudeau --- .../package/libmad/Config.in | 41 ++++++++++++++++++++ .../package/libmad/libmad.mk | 6 ++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git buildroot.orig/package/libmad/Config.in buildroot/package/libmad/Config.in index 4d4f930..d4d08de 100644 --- buildroot.orig/package/libmad/Config.in +++ buildroot/package/libmad/Config.in @@ -6,3 +6,44 @@ config BR2_PACKAGE_LIBMAD without a floating-point unit. http://www.underbit.com/products/mad/ + +if BR2_PACKAGE_LIBMAD + +choice + prompt "Speed vs. accuracy" + default BR2_PACKAGE_LIBMAD_SPEED_ACCURACY + +config BR2_PACKAGE_LIBMAD_SPEED + bool "Optimize for speed over accuracy" + help + Compromise accuracy for speed. + +config BR2_PACKAGE_LIBMAD_ACCURACY + bool "Optimize for accuracy over speed" + help + Compromise speed for accuracy. + +config BR2_PACKAGE_LIBMAD_SPEED_ACCURACY + bool "Optimize for both speed and accuracy" + help + Keep optimizations balanced between speed and accuracy. + +endchoice + +config BR2_PACKAGE_LIBMAD_SSO + bool "Subband synthesis optimization" + help + Use the subband synthesis optimization, with reduced accuracy. + +config BR2_PACKAGE_LIBMAD_ASO + bool "Architecture-specific optimizations" + default y + help + Use certain architecture-specific optimizations. + +config BR2_PACKAGE_LIBMAD_STRICT_ISO + bool "Strict ISO/IEC interpretations" + help + Use strict ISO/IEC interpretations. + +endif diff --git buildroot.orig/package/libmad/libmad.mk buildroot/package/libmad/libmad.mk index 6e53cf2..ce9b9f6 100644 --- buildroot.orig/package/libmad/libmad.mk +++ buildroot/package/libmad/libmad.mk @@ -30,6 +30,10 @@ LIBMAD_POST_INSTALL_TARGET_HOOKS += LIBMAD_INSTALL_TARGET_PC LIBMAD_CONF_OPT = \ --disable-debugging \ - --enable-speed + $(if $(BR2_PACKAGE_LIBMAD_SPEED),--enable-speed) \ + $(if $(BR2_PACKAGE_LIBMAD_ACCURACY),--enable-accuracy) \ + --$(if $(BR2_PACKAGE_LIBMAD_SSO),enable,disable)-sso \ + --$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso \ + --$(if $(BR2_PACKAGE_LIBMAD_STRICT_ISO),enable,disable)-strict-iso $(eval $(call AUTOTARGETS))