The patch below builds mpg123's AVX decoder code on amd64.
Do we want this?

Like the other CPU-specific optimizations this is checked at runtime
and only enabled if the CPU/OS supports it, otherwise mpg123 will
fall back to the SSE decoder on amd64.  Previously, I didn't enable
this because it pulls in additional build dependencies and the
OpenBSD kernel didn't support AVX anyway.  However, work is underway
to enable AVX on OpenBSD.

Admittedly, there is no compelling need for the optimized AVX
decoder.  CPUs that implement the AVX extension already decode MP3
at 0% load.  It is however a handy test whether AVX support works.
(Yes, it does with a preliminary kernel patch.)


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/mpg123/Makefile,v
retrieving revision 1.75
diff -u -p -r1.75 Makefile
--- Makefile    16 Oct 2014 19:49:02 -0000      1.75
+++ Makefile    8 Feb 2015 16:30:02 -0000
@@ -3,6 +3,7 @@
 COMMENT=       fast console MPEG audio player and decoder library
 
 DISTNAME=      mpg123-1.21.0
+REVISION=      0
 SHARED_LIBS=   mpg123          4.0     # 40.3
 CATEGORIES=    audio
 HOMEPAGE=      http://www.mpg123.de/
@@ -31,11 +32,9 @@ CONFIGURE_ENV=       CPPFLAGS="-I${LOCALBASE}/
 MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build
 
 .if   ${MACHINE_ARCH} == "amd64"
-## no support for AVX instructions in as(1)
-#USE_GMAKE=    Yes
-#BUILD_DEPENDS+=       devel/yasm
-## no kernel support for AVX
-CONFIGURE_ENV+=        YASM=no
+# no support for AVX instructions in as(1)
+USE_GMAKE=     Yes
+BUILD_DEPENDS+=        devel/yasm
 
 .elif ${MACHINE_ARCH} == "arm"
 CONFIGURE_ARGS+=--with-cpu=arm_nofpu
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to