LAME 3.98 is finally available at http://lame.sf.net and offers some great improvements: http://lame.cvs.sourceforge.net/*checkout*/lame/lame/doc/html/history.html This should be in portage! :) Reproducible: Always
Created attachment 159689 [details] lame-3.98.ebuild Ebuild proposal. Changes: - inherit "versionator" eclass - don't use lame-3.96.1-asneeded.patch as the -lm issue seems fixed - patch gtk paths, otherwise eautoreconf fails
Created attachment 159690 [details, diff] lame-3.98-shared-frontend.patch Updated patch, old one didn't work anymore.
Created attachment 159692 [details, diff] lame-3.98-gtk-path.patch This is the gtk paths part from the (now apparently obsolete) lame-3.96.1-asneeded.patch.
Created attachment 159696 [details] lame-3.98.ebuild This ebuild forcefully enables nasm for x86 and amd64. nasm isn't enabled by default, not even when nasm is installed. Compared to the Windows binary from rarewares (admittedly a non-gcc compile; they used the Intel compiler) the non-nasm lame is slow: lame 3.98 native linux binary without nasm support: 154.8 kbps real 0m27.791s user 0m27.580s sys 0m0.110s lame 3.98 windows binary (executed within Wine!): 155.3 kbps real 0m21.575s user 0m20.940s sys 0m0.100s lame 3.98 native linux binary with nasm support: 154.8 kbps real 0m23.689s user 0m23.480s sys 0m0.110s On the other hand with nasm enabled I get text relocations and executable stacks in /usr/lib/libmp3lame.so.0.0.0, so there's a tradeoff between quality and speed. But the speed gain is huge! As far as I know we'd be able to force nasm usage on amd64 and x86. If there's no real issue with text relocations and executable stacks on these arches I'd suggest we'd go for the speed.
Have you looked at http://www.gentoo.org/proj/en/hardened/gnu-stack.xml Wonder if a simple -Wa,--noexecstack would "fix" it and what performance impact that would have
bumped, thanks! for the nasm stuff, please see bug #93279. Unfortunately it cannot be included like that :(
(In reply to comment #6) > for the nasm stuff, please see bug #93279. Unfortunately it cannot be included > like that :( Thanks to the PaX Team, we now have a pic fix. Could you please test it by using: EXTRA_ECONF=--enable-nasm emerge lame so that I'm sure it's good to be added as an mmx useflag ;) exec stacks fix will follow soon, but the difficult part it the textrels.
(In reply to comment #7) > Thanks to the PaX Team, we now have a pic fix. Could you please test it by > using: > EXTRA_ECONF=--enable-nasm emerge lame > so that I'm sure it's good to be added as an mmx useflag ;) i'd also be interested in seeing benchmarks.
(In reply to comment #8) > i'd also be interested in seeing benchmarks. some absolutely irrelevant benchs on a single wav file: mmx: real 0m23.841s user 0m19.705s sys 0m0.204s non mmx: real 0m22.770s user 0m21.177s sys 0m0.148s
(In reply to comment #9) > (In reply to comment #8) > > i'd also be interested in seeing benchmarks. > > > some absolutely irrelevant benchs on a single wav file: i'd actually be more interested in the pic vs. non-pic numbers ;)
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #8) > > > i'd also be interested in seeing benchmarks. > > > > > > some absolutely irrelevant benchs on a single wav file: > > i'd actually be more interested in the pic vs. non-pic numbers ;) Then I don't notice any noticeable slowdown: for 20 runs on the same file, 6m37 for the pic version vs 6m36 for the non pic one. Though it's hard to get real benchs on a desktop that does many other things at the same time.
That's great news. I already had a patch for the exec stack issue but accidentally deleted it. I'll recreate it right now.
Ah, the exec stack fix is already served. Anyway, regarding the PIC fix. It segfaults here: time lame --nohist --vbr-new -V 4 --noreplaygain -q 2 --id3v2-only 12.\ You\ Could\ Be\ Mine.wav LAME 3.98 32bits (http://www.mp3dev.org/) CPU features: MMX (ASM used), SSE (ASM used), SSE2 Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz Encoding 12. You Could Be Mine.wav to 12. You Could Be Mine.wav.mp3 Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=4) Frame | CPU time/estim | REAL time/estim | play/CPU | ETA 0/13159 ( 0%)| 0:00/ 0:00| 0:00/ 0:00| 0.0000x| 0:00 Speicherzugriffsfehler real 0m0.038s user 0m0.030s sys 0m0.000s Syslog: lame[27240]: segfault at bffe0008 ip b7f6b305 sp bfebe098 error 4 in libmp3lame.so.0.0.0[b7f3d000+42000] emerge --info Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26 i686) ================================================================= System uname: 2.6.26 i686 Intel(R) Pentium(R) M processor 1400MHz Timestamp of tree: Wed, 16 Jul 2008 17:17:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-lang/python: 2.4.4-r13 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer" DISTDIR="/home/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://ftp.heanet.ie/pub/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.tiscali.nl/ http://mirror.switch.ch/ftp/mirror/gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="-Wl,-O1" LINGUAS="en de es" MAKEOPTS="-j2" PKGDIR="/home/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/home" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X bzip2 cups cxx fontconfig gdbm gif gnutls gs iconv jpeg kde kdeenablefinal kpathsea lcms logrotate mmx ncurses nls nptl pccts pch pcre perl png ppds python qt3 readline spell sse sse2 ssl svg threads tiff truetype unicode x86 xml xorg xpm zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="route adpcm alaw copy dshare dsnoop extplug file hooks ladspa lfloat linear meter mulaw multi null rate share shm asym dmix empty iec958 ioplug plug softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="synaptics mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de es" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
gdb /usr/bin/lame GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) set args --nohist --vbr-new -V 4 --noreplaygain -q 2 --id3v2-only 12.\ You\ Could\ Be\ Mine.wav (gdb) run Starting program: /usr/bin/lame --nohist --vbr-new -V 4 --noreplaygain -q 2 --id3v2-only 12.\ You\ Could\ Be\ Mine.wav LAME 3.98 32bits (http://www.mp3dev.org/) CPU features: MMX (ASM used), SSE (ASM used), SSE2 Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz Encoding 12. You Could Be Mine.wav to 12. You Could Be Mine.wav.mp3 Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=4) Frame | CPU time/estim | REAL time/estim | play/CPU | ETA 0/13159 ( 0%)| 0:00/ 0:00| 0:00/ 0:00| 0.0000x| 0:00 Program received signal SIGSEGV, Segmentation fault. 0xb7efeb6c in fht_SSE.lp20 () from /usr/lib/libmp3lame.so.0 (gdb) set logging file backtrace.log (gdb) set logging on Copying output to backtrace.log. (gdb) bt #0 0xb7efeb6c in fht_SSE.lp20 () from /usr/lib/libmp3lame.so.0 #1 0x000001f8 in ?? () #2 0xbfe50ff8 in ?? () #3 0x08532948 in ?? () #4 0xb7f16100 in ?? () from /usr/lib/libmp3lame.so.0 #5 0xb7f14ff4 in ?? () from /usr/lib/libmp3lame.so.0 #6 0xb7ee01b0 in fft_long (gfc=0xb7f6c090, x=0xb7efdbb0, chn=-1209191158, buffer=0xb7ef6830) at fft.c:286 Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) set logging off Done logging to backtrace.log. (gdb) quit The program is running. Exit anyway? (y or n) y
(In reply to comment #13) > Ah, the exec stack fix is already served. > > Anyway, regarding the PIC fix. It segfaults here: i posted a new patch, can you try it please?
I'd be happy to, but where is it posted?
bug #93279(In reply to comment #16) > I'd be happy to, but where is it posted? bug #93279, you should probably post problems there, benchmarks here in fact.